Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
8cad3eca
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,发现更多精彩内容 >>
提交
8cad3eca
编写于
2月 13, 2017
作者:
J
James Robinson
提交者:
GitHub
2月 13, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updates for modular->app rename of //application interfaces (#3414)
上级
588d6a47
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
39 addition
and
39 deletion
+39
-39
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
+4
-4
content_handler/application_controller_impl.h
content_handler/application_controller_impl.h
+11
-11
content_handler/runtime_holder.cc
content_handler/runtime_holder.cc
+5
-5
content_handler/runtime_holder.h
content_handler/runtime_holder.h
+6
-6
未找到文件。
content_handler/app.cc
浏览文件 @
8cad3eca
...
...
@@ -26,7 +26,7 @@ void QuitMessageLoop() {
}
// namespace
App
::
App
()
{
context_
=
modular
::
ApplicationContext
::
CreateFromStartupInfo
();
context_
=
app
::
ApplicationContext
::
CreateFromStartupInfo
();
tracing
::
InitializeTracer
(
context_
.
get
(),
{});
...
...
@@ -52,8 +52,8 @@ App::App() {
blink
::
SetFontProvider
(
context_
->
ConnectToEnvironmentService
<
fonts
::
FontProvider
>
());
context_
->
outgoing_services
()
->
AddService
<
modular
::
ApplicationRunner
>
(
[
this
](
fidl
::
InterfaceRequest
<
modular
::
ApplicationRunner
>
request
)
{
context_
->
outgoing_services
()
->
AddService
<
app
::
ApplicationRunner
>
(
[
this
](
fidl
::
InterfaceRequest
<
app
::
ApplicationRunner
>
request
)
{
runner_bindings_
.
AddBinding
(
this
,
std
::
move
(
request
));
});
}
...
...
@@ -64,9 +64,9 @@ App::~App() {
}
void
App
::
StartApplication
(
modular
::
ApplicationPackagePtr
application
,
modular
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
modular
::
ApplicationController
>
controller
)
{
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
)
{
std
::
unique_ptr
<
ApplicationControllerImpl
>
impl
=
std
::
make_unique
<
ApplicationControllerImpl
>
(
this
,
std
::
move
(
application
),
std
::
move
(
startup_info
),
...
...
content_handler/app.h
浏览文件 @
8cad3eca
...
...
@@ -16,25 +16,25 @@
namespace
flutter_runner
{
class
App
:
public
modular
::
ApplicationRunner
{
class
App
:
public
app
::
ApplicationRunner
{
public:
App
();
~
App
();
// |
modular
::ApplicationRunner| implementation:
// |
app
::ApplicationRunner| implementation:
void
StartApplication
(
modular
::
ApplicationPackagePtr
application
,
modular
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
modular
::
ApplicationController
>
void
StartApplication
(
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
)
override
;
void
Destroy
(
ApplicationControllerImpl
*
controller
);
private:
std
::
unique_ptr
<
modular
::
ApplicationContext
>
context_
;
std
::
unique_ptr
<
app
::
ApplicationContext
>
context_
;
std
::
unique_ptr
<
Thread
>
gpu_thread_
;
std
::
unique_ptr
<
Thread
>
io_thread_
;
fidl
::
BindingSet
<
modular
::
ApplicationRunner
>
runner_bindings_
;
fidl
::
BindingSet
<
app
::
ApplicationRunner
>
runner_bindings_
;
std
::
unordered_map
<
ApplicationControllerImpl
*
,
std
::
unique_ptr
<
ApplicationControllerImpl
>>
controllers_
;
...
...
content_handler/application_controller_impl.cc
浏览文件 @
8cad3eca
...
...
@@ -16,9 +16,9 @@ namespace flutter_runner {
ApplicationControllerImpl
::
ApplicationControllerImpl
(
App
*
app
,
modular
::
ApplicationPackagePtr
application
,
modular
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
modular
::
ApplicationController
>
controller
)
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
)
:
app_
(
app
),
binding_
(
this
)
{
if
(
controller
.
is_pending
())
{
binding_
.
Bind
(
std
::
move
(
controller
));
...
...
@@ -74,7 +74,7 @@ void ApplicationControllerImpl::ConnectToService(
void
ApplicationControllerImpl
::
CreateView
(
fidl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
fidl
::
InterfaceRequest
<
modular
::
ServiceProvider
>
services
)
{
fidl
::
InterfaceRequest
<
app
::
ServiceProvider
>
services
)
{
runtime_holder_
->
CreateView
(
url_
,
std
::
move
(
view_owner_request
),
std
::
move
(
services
));
}
...
...
content_handler/application_controller_impl.h
浏览文件 @
8cad3eca
...
...
@@ -19,24 +19,24 @@ namespace flutter_runner {
class
App
;
class
RuntimeHolder
;
class
ApplicationControllerImpl
:
public
modular
::
ApplicationController
,
public
modular
::
ServiceProvider
,
class
ApplicationControllerImpl
:
public
app
::
ApplicationController
,
public
app
::
ServiceProvider
,
public
mozart
::
ViewProvider
{
public:
ApplicationControllerImpl
(
App
*
app
,
modular
::
ApplicationPackagePtr
application
,
modular
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
modular
::
ApplicationController
>
controller
);
app
::
ApplicationPackagePtr
application
,
app
::
ApplicationStartupInfoPtr
startup_info
,
fidl
::
InterfaceRequest
<
app
::
ApplicationController
>
controller
);
~
ApplicationControllerImpl
()
override
;
// |
modular
::ApplicationController| implementation
// |
app
::ApplicationController| implementation
void
Kill
(
const
KillCallback
&
callback
)
override
;
void
Detach
()
override
;
// |
modular
::ServiceProvider| implementation
// |
app
::ServiceProvider| implementation
void
ConnectToService
(
const
fidl
::
String
&
service_name
,
mx
::
channel
channel
)
override
;
...
...
@@ -45,16 +45,16 @@ class ApplicationControllerImpl : public modular::ApplicationController,
void
CreateView
(
fidl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
fidl
::
InterfaceRequest
<
modular
::
ServiceProvider
>
services
)
override
;
fidl
::
InterfaceRequest
<
app
::
ServiceProvider
>
services
)
override
;
private:
void
StartRuntimeIfReady
();
App
*
app_
;
fidl
::
Binding
<
modular
::
ApplicationController
>
binding_
;
fidl
::
Binding
<
app
::
ApplicationController
>
binding_
;
fidl
::
BindingSet
<
modular
::
ServiceProvider
>
service_provider_bindings_
;
modular
::
ServiceProviderPtr
dart_service_provider_
;
fidl
::
BindingSet
<
app
::
ServiceProvider
>
service_provider_bindings_
;
app
::
ServiceProviderPtr
dart_service_provider_
;
fidl
::
BindingSet
<
mozart
::
ViewProvider
>
view_provider_bindings_
;
...
...
content_handler/runtime_holder.cc
浏览文件 @
8cad3eca
...
...
@@ -81,8 +81,8 @@ RuntimeHolder::~RuntimeHolder() {
}
void
RuntimeHolder
::
Init
(
fidl
::
InterfaceHandle
<
modular
::
ApplicationEnvironment
>
environment
,
fidl
::
InterfaceRequest
<
modular
::
ServiceProvider
>
outgoing_services
,
fidl
::
InterfaceHandle
<
app
::
ApplicationEnvironment
>
environment
,
fidl
::
InterfaceRequest
<
app
::
ServiceProvider
>
outgoing_services
,
std
::
vector
<
char
>
bundle
)
{
FTL_DCHECK
(
!
rasterizer_
);
rasterizer_
=
Rasterizer
::
Create
();
...
...
@@ -99,7 +99,7 @@ void RuntimeHolder::Init(
void
RuntimeHolder
::
CreateView
(
const
std
::
string
&
script_uri
,
fidl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
fidl
::
InterfaceRequest
<
modular
::
ServiceProvider
>
services
)
{
fidl
::
InterfaceRequest
<
app
::
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).
...
...
@@ -119,7 +119,7 @@ void RuntimeHolder::CreateView(
std
::
move
(
view_owner_request
),
std
::
move
(
view_listener
),
script_uri
);
modular
::
ServiceProviderPtr
view_services
;
app
::
ServiceProviderPtr
view_services
;
view_
->
GetServiceProvider
(
GetProxy
(
&
view_services
));
// Listen for input events.
...
...
@@ -200,7 +200,7 @@ void RuntimeHolder::DidCreateMainIsolate(Dart_Isolate isolate) {
}
void
RuntimeHolder
::
InitFidlInternal
()
{
fidl
::
InterfaceHandle
<
modular
::
ApplicationEnvironment
>
environment
;
fidl
::
InterfaceHandle
<
app
::
ApplicationEnvironment
>
environment
;
environment_
->
Duplicate
(
GetProxy
(
&
environment
));
Dart_Handle
fidl_internal
=
Dart_LookupLibrary
(
ToDart
(
"dart:fidl.internal"
));
...
...
content_handler/runtime_holder.h
浏览文件 @
8cad3eca
...
...
@@ -38,12 +38,12 @@ class RuntimeHolder : public blink::RuntimeDelegate,
RuntimeHolder
();
~
RuntimeHolder
();
void
Init
(
fidl
::
InterfaceHandle
<
modular
::
ApplicationEnvironment
>
environment
,
fidl
::
InterfaceRequest
<
modular
::
ServiceProvider
>
outgoing_services
,
void
Init
(
fidl
::
InterfaceHandle
<
app
::
ApplicationEnvironment
>
environment
,
fidl
::
InterfaceRequest
<
app
::
ServiceProvider
>
outgoing_services
,
std
::
vector
<
char
>
bundle
);
void
CreateView
(
const
std
::
string
&
script_uri
,
fidl
::
InterfaceRequest
<
mozart
::
ViewOwner
>
view_owner_request
,
fidl
::
InterfaceRequest
<
modular
::
ServiceProvider
>
services
);
fidl
::
InterfaceRequest
<
app
::
ServiceProvider
>
services
);
private:
// |blink::RuntimeDelegate| implementation:
...
...
@@ -75,9 +75,9 @@ class RuntimeHolder : public blink::RuntimeDelegate,
void
OnFrameComplete
();
void
Invalidate
();
modular
::
ApplicationEnvironmentPtr
environment_
;
modular
::
ServiceProviderPtr
environment_services_
;
fidl
::
InterfaceRequest
<
modular
::
ServiceProvider
>
outgoing_services_
;
app
::
ApplicationEnvironmentPtr
environment_
;
app
::
ServiceProviderPtr
environment_services_
;
fidl
::
InterfaceRequest
<
app
::
ServiceProvider
>
outgoing_services_
;
std
::
vector
<
char
>
root_bundle_data_
;
ftl
::
RefPtr
<
blink
::
ZipAssetStore
>
asset_store_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录