#include <component_v2.h>
Definition at line 56 of file component_v2.h.
◆ TerminationCallback
◆ ~ComponentV2()
| flutter_runner::ComponentV2::~ComponentV2 |
( |
| ) |
|
|
default |
◆ Create()
| ActiveComponentV2 flutter_runner::ComponentV2::Create |
( |
TerminationCallback |
termination_callback, |
|
|
fuchsia::component::runner::ComponentStartInfo |
start_info, |
|
|
std::shared_ptr< sys::ServiceDirectory > |
runner_incoming_services, |
|
|
fidl::InterfaceRequest< fuchsia::component::runner::ComponentController > |
controller |
|
) |
| |
|
static |
Definition at line 129 of file component_v2.cc.
134 {
135 auto thread = std::make_unique<fml::Thread>();
136 std::unique_ptr<ComponentV2> component;
137
139 thread->GetTaskRunner()->PostTask([&]() mutable {
140 component.reset(
141 new ComponentV2(std::move(termination_callback), std::move(start_info),
142 runner_incoming_services, std::move(controller)));
144 });
145
147 return {.platform_thread = std::move(thread),
148 .component = std::move(component)};
149}
References fml::AutoResetWaitableEvent::Signal(), and fml::AutoResetWaitableEvent::Wait().
◆ GetDebugLabel()
| const std::string & flutter_runner::ComponentV2::GetDebugLabel |
( |
| ) |
const |
◆ handle_unknown_method()
| void flutter_runner::ComponentV2::handle_unknown_method |
( |
uint64_t |
ordinal, |
|
|
bool |
method_has_response |
|
) |
| |
|
override |
Definition at line 664 of file component_v2.cc.
665 {
666 FML_LOG(ERROR) <<
"Unknown method called on ComponentV2. Ordinal: "
667 << ordinal;
668}
#define FML_LOG(severity)
References FML_LOG.
◆ ParseProgramMetadata()
| ProgramMetadata flutter_runner::ComponentV2::ParseProgramMetadata |
( |
const fuchsia::data::Dictionary & |
program_metadata | ) |
|
|
static |
Parses the program metadata that was provided for the component.
|old_gen_heap_size| will be set to -1 if no value was specified.
Definition at line 107 of file component_v2.cc.
108 {
109 ProgramMetadata result;
110
111 for (const auto& entry : program_metadata.entries()) {
112 if (entry.key.compare(kDataKey) == 0 && entry.value != nullptr) {
113 result.data_path = "pkg/" + entry.value->str();
114 } else if (entry.key.compare(kAssetsKey) == 0 && entry.value != nullptr) {
115 result.assets_path = "pkg/" + entry.value->str();
116 }
else if (entry.key.compare(
kArgsKey) == 0 && entry.value !=
nullptr) {
117 ParseArgs(entry.value->str_vec(), &result);
118 }
119 }
120
121
122 if (result.assets_path.empty()) {
123 result.assets_path = result.data_path;
124 }
125
126 return result;
127}
static constexpr char kArgsKey[]
References flutter_runner::ProgramMetadata::assets_path, flutter_runner::ProgramMetadata::data_path, and kArgsKey.
◆ WriteProfileToTrace()
| void flutter_runner::ComponentV2::WriteProfileToTrace |
( |
| ) |
const |
The documentation for this class was generated from the following files: