Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
8cdfd674
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
8cdfd674
编写于
3月 16, 2018
作者:
A
Alhaad Gokhale
提交者:
GitHub
3月 16, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[fuchsia] Rename 'namespace app' to 'namespace component'. (#4806)
上级
1348ab5b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
42 addition
and
42 deletion
+42
-42
content_handler/accessibility_bridge.cc
content_handler/accessibility_bridge.cc
+1
-1
content_handler/accessibility_bridge.h
content_handler/accessibility_bridge.h
+1
-1
content_handler/app.cc
content_handler/app.cc
+6
-6
content_handler/app.h
content_handler/app.h
+7
-7
content_handler/application_controller_impl.cc
content_handler/application_controller_impl.cc
+7
-7
content_handler/application_controller_impl.h
content_handler/application_controller_impl.h
+9
-9
content_handler/runtime_holder.cc
content_handler/runtime_holder.cc
+6
-6
content_handler/runtime_holder.h
content_handler/runtime_holder.h
+5
-5
未找到文件。
content_handler/accessibility_bridge.cc
浏览文件 @
8cdfd674
...
...
@@ -16,7 +16,7 @@
namespace
flutter_runner
{
AccessibilityBridge
::
AccessibilityBridge
(
app
::
ApplicationContext
*
context
)
AccessibilityBridge
::
AccessibilityBridge
(
component
::
ApplicationContext
*
context
)
:
writer_
(
context
->
ConnectToEnvironmentService
<
maxwell
::
ContextWriter
>
())
{}
void
AccessibilityBridge
::
UpdateSemantics
(
...
...
content_handler/accessibility_bridge.h
浏览文件 @
8cdfd674
...
...
@@ -17,7 +17,7 @@ namespace flutter_runner {
// with the Context Service.
class
AccessibilityBridge
{
public:
explicit
AccessibilityBridge
(
app
::
ApplicationContext
*
context
);
explicit
AccessibilityBridge
(
component
::
ApplicationContext
*
context
);
// Update the internal representation of the semantics nodes, and write the
// semantics to Context Service.
...
...
content_handler/app.cc
浏览文件 @
8cdfd674
...
...
@@ -38,7 +38,7 @@ std::string GetLabelFromURL(const std::string& url) {
App
::
App
()
{
g_app
=
this
;
context_
=
app
::
ApplicationContext
::
CreateFromStartupInfo
();
context_
=
component
::
ApplicationContext
::
CreateFromStartupInfo
();
gpu_thread_
=
std
::
make_unique
<
fsl
::
Thread
>
();
io_thread_
=
std
::
make_unique
<
fsl
::
Thread
>
();
...
...
@@ -79,8 +79,8 @@ App::App() {
sk_make_sp
<
txt
::
FuchsiaFontManager
>
(
std
::
move
(
font_provider
)));
}
context_
->
outgoing_services
()
->
AddService
<
app
::
ApplicationRunner
>
(
[
this
](
f1dl
::
InterfaceRequest
<
app
::
ApplicationRunner
>
request
)
{
context_
->
outgoing_services
()
->
AddService
<
component
::
ApplicationRunner
>
(
[
this
](
f1dl
::
InterfaceRequest
<
component
::
ApplicationRunner
>
request
)
{
runner_bindings_
.
AddBinding
(
this
,
std
::
move
(
request
));
});
}
...
...
@@ -130,9 +130,9 @@ void App::WaitForPlatformViewsIdsUIThread(
}
void
App
::
StartApplication
(
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
)
{
component
::
ApplicationPackagePtr
application
,
component
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
component
::
ApplicationController
>
controller
)
{
if
(
controllers_
.
empty
())
{
// Name this process after the url of the first application being launched.
base_label_
=
"flutter:"
+
GetLabelFromURL
(
startup_info
->
launch_info
->
url
);
...
...
content_handler/app.h
浏览文件 @
8cdfd674
...
...
@@ -17,19 +17,19 @@
namespace
flutter_runner
{
class
App
:
public
app
::
ApplicationRunner
{
class
App
:
public
component
::
ApplicationRunner
{
public:
App
();
~
App
();
static
App
&
Shared
();
// |
app
::ApplicationRunner| implementation:
// |
component
::ApplicationRunner| implementation:
void
StartApplication
(
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
)
override
;
component
::
ApplicationPackagePtr
application
,
component
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
component
::
ApplicationController
>
controller
)
override
;
void
Destroy
(
ApplicationControllerImpl
*
controller
);
...
...
@@ -47,10 +47,10 @@ class App : public app::ApplicationRunner {
fxl
::
AutoResetWaitableEvent
*
latch
);
void
UpdateProcessLabel
();
std
::
unique_ptr
<
app
::
ApplicationContext
>
context_
;
std
::
unique_ptr
<
component
::
ApplicationContext
>
context_
;
std
::
unique_ptr
<
fsl
::
Thread
>
gpu_thread_
;
std
::
unique_ptr
<
fsl
::
Thread
>
io_thread_
;
f1dl
::
BindingSet
<
app
::
ApplicationRunner
>
runner_bindings_
;
f1dl
::
BindingSet
<
component
::
ApplicationRunner
>
runner_bindings_
;
std
::
unordered_map
<
ApplicationControllerImpl
*
,
std
::
unique_ptr
<
ApplicationControllerImpl
>>
controllers_
;
...
...
content_handler/application_controller_impl.cc
浏览文件 @
8cdfd674
...
...
@@ -19,9 +19,9 @@ namespace flutter_runner {
ApplicationControllerImpl
::
ApplicationControllerImpl
(
App
*
app
,
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
)
component
::
ApplicationPackagePtr
application
,
component
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
component
::
ApplicationController
>
controller
)
:
app_
(
app
),
binding_
(
this
)
{
if
(
controller
.
is_valid
())
{
binding_
.
Bind
(
std
::
move
(
controller
));
...
...
@@ -52,7 +52,7 @@ ApplicationControllerImpl::ApplicationControllerImpl(
view_provider_bindings_
.
AddBinding
(
this
,
std
::
move
(
request
));
});
app
::
ServiceProviderPtr
service_provider
;
component
::
ServiceProviderPtr
service_provider
;
auto
request
=
service_provider
.
NewRequest
();
service_provider_bridge_
.
set_backend
(
std
::
move
(
service_provider
));
...
...
@@ -66,7 +66,7 @@ ApplicationControllerImpl::ApplicationControllerImpl(
runtime_holder_
.
reset
(
new
RuntimeHolder
());
runtime_holder_
->
SetMainIsolateShutdownCallback
([
this
]()
{
Kill
();
});
runtime_holder_
->
Init
(
fdio_ns
,
app
::
ApplicationContext
::
CreateFrom
(
std
::
move
(
startup_info
)),
fdio_ns
,
component
::
ApplicationContext
::
CreateFrom
(
std
::
move
(
startup_info
)),
std
::
move
(
request
),
std
::
move
(
bundle
));
}
...
...
@@ -75,7 +75,7 @@ ApplicationControllerImpl::~ApplicationControllerImpl() = default;
constexpr
char
kServiceRootPath
[]
=
"/svc"
;
fdio_ns_t
*
ApplicationControllerImpl
::
SetupNamespace
(
const
app
::
FlatNamespacePtr
&
flat
)
{
const
component
::
FlatNamespacePtr
&
flat
)
{
fdio_ns_t
*
fdio_namespc
;
zx_status_t
status
=
fdio_ns_create
(
&
fdio_namespc
);
if
(
status
!=
ZX_OK
)
{
...
...
@@ -126,7 +126,7 @@ void ApplicationControllerImpl::SendReturnCode(int32_t return_code) {
void
ApplicationControllerImpl
::
CreateView
(
f1dl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
f1dl
::
InterfaceRequest
<
app
::
ServiceProvider
>
services
)
{
f1dl
::
InterfaceRequest
<
component
::
ServiceProvider
>
services
)
{
runtime_holder_
->
CreateView
(
url_
,
std
::
move
(
view_owner_request
),
std
::
move
(
services
));
}
...
...
content_handler/application_controller_impl.h
浏览文件 @
8cdfd674
...
...
@@ -24,18 +24,18 @@ namespace flutter_runner {
class
App
;
class
RuntimeHolder
;
class
ApplicationControllerImpl
:
public
app
::
ApplicationController
,
class
ApplicationControllerImpl
:
public
component
::
ApplicationController
,
public
mozart
::
ViewProvider
{
public:
ApplicationControllerImpl
(
App
*
app
,
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
);
component
::
ApplicationPackagePtr
application
,
component
::
ApplicationStartupInfoPtr
startup_info
,
f1dl
::
InterfaceRequest
<
component
::
ApplicationController
>
controller
);
~
ApplicationControllerImpl
()
override
;
// |
app
::ApplicationController| implementation
// |
component
::ApplicationController| implementation
void
Kill
()
override
;
void
Detach
()
override
;
...
...
@@ -45,7 +45,7 @@ class ApplicationControllerImpl : public app::ApplicationController,
void
CreateView
(
f1dl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
f1dl
::
InterfaceRequest
<
app
::
ServiceProvider
>
services
)
override
;
f1dl
::
InterfaceRequest
<
component
::
ServiceProvider
>
services
)
override
;
Dart_Port
GetUIIsolateMainPort
();
std
::
string
GetUIIsolateName
();
...
...
@@ -54,12 +54,12 @@ class ApplicationControllerImpl : public app::ApplicationController,
void
StartRuntimeIfReady
();
void
SendReturnCode
(
int32_t
return_code
);
fdio_ns_t
*
SetupNamespace
(
const
app
::
FlatNamespacePtr
&
flat
);
fdio_ns_t
*
SetupNamespace
(
const
component
::
FlatNamespacePtr
&
flat
);
App
*
app_
;
f1dl
::
Binding
<
app
::
ApplicationController
>
binding_
;
f1dl
::
Binding
<
component
::
ApplicationController
>
binding_
;
app
::
ServiceProviderBridge
service_provider_bridge_
;
component
::
ServiceProviderBridge
service_provider_bridge_
;
f1dl
::
BindingSet
<
mozart
::
ViewProvider
>
view_provider_bindings_
;
...
...
content_handler/runtime_holder.cc
浏览文件 @
8cdfd674
...
...
@@ -110,8 +110,8 @@ RuntimeHolder::~RuntimeHolder() {
void
RuntimeHolder
::
Init
(
fdio_ns_t
*
namespc
,
std
::
unique_ptr
<
app
::
ApplicationContext
>
context
,
f1dl
::
InterfaceRequest
<
app
::
ServiceProvider
>
outgoing_services
,
std
::
unique_ptr
<
component
::
ApplicationContext
>
context
,
f1dl
::
InterfaceRequest
<
component
::
ServiceProvider
>
outgoing_services
,
std
::
vector
<
char
>
bundle
)
{
FXL_DCHECK
(
!
rasterizer_
);
rasterizer_
=
Rasterizer
::
Create
();
...
...
@@ -194,7 +194,7 @@ void RuntimeHolder::Init(
void
RuntimeHolder
::
CreateView
(
const
std
::
string
&
script_uri
,
f1dl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
f1dl
::
InterfaceRequest
<
app
::
ServiceProvider
>
services
)
{
f1dl
::
InterfaceRequest
<
component
::
ServiceProvider
>
services
)
{
if
(
view_listener_binding_
.
is_bound
())
{
// TODO(jeffbrown): Refactor this to support multiple view instances
// sharing the same underlying root bundle (but with different runtimes).
...
...
@@ -228,7 +228,7 @@ void RuntimeHolder::CreateView(
std
::
move
(
export_token
),
// export token
script_uri
// diagnostic label
);
app
::
ServiceProviderPtr
view_services
;
component
::
ServiceProviderPtr
view_services
;
view_
->
GetServiceProvider
(
view_services
.
NewRequest
());
// Listen for input events.
...
...
@@ -444,12 +444,12 @@ void RuntimeHolder::InitDartIoInternal() {
}
void
RuntimeHolder
::
InitFuchsia
()
{
f1dl
::
InterfaceHandle
<
app
::
ApplicationEnvironment
>
environment
;
f1dl
::
InterfaceHandle
<
component
::
ApplicationEnvironment
>
environment
;
context_
->
ConnectToEnvironmentService
(
environment
.
NewRequest
());
fuchsia
::
dart
::
Initialize
(
std
::
move
(
environment
),
std
::
move
(
outgoing_services_
));
app
::
ServiceProviderPtr
parent_env_service_provider
;
component
::
ServiceProviderPtr
parent_env_service_provider
;
context_
->
environment
()
->
GetServices
(
parent_env_service_provider
.
NewRequest
());
ConnectToService
(
parent_env_service_provider
.
get
(),
clipboard_
.
NewRequest
());
...
...
content_handler/runtime_holder.h
浏览文件 @
8cdfd674
...
...
@@ -47,12 +47,12 @@ class RuntimeHolder : public blink::RuntimeDelegate,
~
RuntimeHolder
();
void
Init
(
fdio_ns_t
*
namespc
,
std
::
unique_ptr
<
app
::
ApplicationContext
>
context
,
f1dl
::
InterfaceRequest
<
app
::
ServiceProvider
>
outgoing_services
,
std
::
unique_ptr
<
component
::
ApplicationContext
>
context
,
f1dl
::
InterfaceRequest
<
component
::
ServiceProvider
>
outgoing_services
,
std
::
vector
<
char
>
bundle
);
void
CreateView
(
const
std
::
string
&
script_uri
,
f1dl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
f1dl
::
InterfaceRequest
<
app
::
ServiceProvider
>
services
);
f1dl
::
InterfaceRequest
<
component
::
ServiceProvider
>
services
);
Dart_Port
GetUIIsolateMainPort
();
std
::
string
GetUIIsolateName
();
...
...
@@ -111,8 +111,8 @@ class RuntimeHolder : public blink::RuntimeDelegate,
fdio_ns_t
*
namespc_
;
int
dirfd_
;
std
::
unique_ptr
<
app
::
ApplicationContext
>
context_
;
f1dl
::
InterfaceRequest
<
app
::
ServiceProvider
>
outgoing_services_
;
std
::
unique_ptr
<
component
::
ApplicationContext
>
context_
;
f1dl
::
InterfaceRequest
<
component
::
ServiceProvider
>
outgoing_services_
;
std
::
vector
<
char
>
root_bundle_data_
;
// TODO(zarah): Remove asset_store_ when flx is completely removed
fxl
::
RefPtr
<
blink
::
ZipAssetStore
>
asset_store_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录