Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
root_inspect_node.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "
flutter/shell/platform/fuchsia/runtime/dart/utils/root_inspect_node.h
"
6
7
#include <lib/async/default.h>
8
9
namespace
dart_utils
{
10
11
std::unique_ptr<inspect::ComponentInspector> RootInspectNode::inspector_;
12
std::mutex RootInspectNode::mutex_;
13
14
void
RootInspectNode::Initialize
(sys::ComponentContext* context) {
15
std::lock_guard<std::mutex> lock(mutex_);
16
if
(!inspector_) {
17
inspector_ = std::make_unique<inspect::ComponentInspector>(
18
async_get_default_dispatcher(), inspect::PublishOptions{});
19
}
20
}
21
22
inspect::Node
RootInspectNode::CreateRootChild
(
const
std::string&
name
) {
23
std::lock_guard<std::mutex> lock(mutex_);
24
return
inspector_->inspector().GetRoot().CreateChild(
name
);
25
}
26
27
inspect::Inspector*
RootInspectNode::GetInspector
() {
28
return
&inspector_->inspector();
29
}
30
31
}
// namespace dart_utils
dart_utils::RootInspectNode::GetInspector
static inspect::Inspector * GetInspector()
Definition
root_inspect_node.cc:27
dart_utils::RootInspectNode::Initialize
static void Initialize(sys::ComponentContext *context)
Definition
root_inspect_node.cc:14
dart_utils::RootInspectNode::CreateRootChild
static inspect::Node CreateRootChild(const std::string &name)
Definition
root_inspect_node.cc:22
name
const char * name
Definition
fuchsia.cc:50
dart_utils
Definition
build_info.h:10
root_inspect_node.h
shell
platform
fuchsia
runtime
dart
utils
root_inspect_node.cc
Generated on Mon May 25 2026 06:07:40 for Flutter Engine Uber Docs by
1.9.8