OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SKY_SHELL_UI_ENGINE_H_ | 5 #ifndef SKY_SHELL_UI_ENGINE_H_ |
6 #define SKY_SHELL_UI_ENGINE_H_ | 6 #define SKY_SHELL_UI_ENGINE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
12 #include "mojo/public/cpp/bindings/binding.h" | 12 #include "mojo/public/cpp/bindings/binding.h" |
13 #include "mojo/public/cpp/system/core.h" | 13 #include "mojo/public/cpp/system/core.h" |
| 14 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
14 #include "mojo/services/navigation/public/interfaces/navigation.mojom.h" | 15 #include "mojo/services/navigation/public/interfaces/navigation.mojom.h" |
15 #include "skia/ext/refptr.h" | 16 #include "skia/ext/refptr.h" |
16 #include "sky/engine/public/platform/ServiceProvider.h" | 17 #include "sky/engine/public/platform/ServiceProvider.h" |
17 #include "sky/engine/public/web/WebFrameClient.h" | 18 #include "sky/engine/public/web/WebFrameClient.h" |
18 #include "sky/engine/public/web/WebViewClient.h" | 19 #include "sky/engine/public/web/WebViewClient.h" |
19 #include "sky/shell/gpu_delegate.h" | 20 #include "sky/shell/gpu_delegate.h" |
20 #include "sky/shell/ui_delegate.h" | 21 #include "sky/shell/ui_delegate.h" |
21 #include "third_party/skia/include/core/SkPicture.h" | 22 #include "third_party/skia/include/core/SkPicture.h" |
22 #include "ui/gfx/geometry/size.h" | 23 #include "ui/gfx/geometry/size.h" |
23 | 24 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 float device_pixel_ratio) override; | 59 float device_pixel_ratio) override; |
59 void OnInputEvent(InputEventPtr event) override; | 60 void OnInputEvent(InputEventPtr event) override; |
60 void LoadURL(const mojo::String& url) override; | 61 void LoadURL(const mojo::String& url) override; |
61 | 62 |
62 // WebViewClient methods: | 63 // WebViewClient methods: |
63 void frameDetached(blink::WebFrame*) override; | 64 void frameDetached(blink::WebFrame*) override; |
64 void initializeLayerTreeView() override; | 65 void initializeLayerTreeView() override; |
65 void scheduleVisualUpdate() override; | 66 void scheduleVisualUpdate() override; |
66 blink::WebScreenInfo screenInfo() override; | 67 blink::WebScreenInfo screenInfo() override; |
67 blink::ServiceProvider* services() override; | 68 blink::ServiceProvider* services() override; |
| 69 void didCreateIsolate(blink::WebLocalFrame* frame, |
| 70 Dart_Isolate isolate) override; |
68 | 71 |
69 // Services methods: | 72 // Services methods: |
70 mojo::NavigatorHost* NavigatorHost() override; | 73 mojo::NavigatorHost* NavigatorHost() override; |
71 | 74 |
72 // NavigatorHost methods: | 75 // NavigatorHost methods: |
73 void RequestNavigate(mojo::Target target, | 76 void RequestNavigate(mojo::Target target, |
74 mojo::URLRequestPtr request) override; | 77 mojo::URLRequestPtr request) override; |
75 void DidNavigateLocally(const mojo::String& url) override; | 78 void DidNavigateLocally(const mojo::String& url) override; |
76 void RequestNavigateHistory(int32_t delta) override; | 79 void RequestNavigateHistory(int32_t delta) override; |
77 | 80 |
78 void UpdateWebViewSize(); | 81 void UpdateWebViewSize(); |
79 | 82 |
| 83 mojo::ServiceProviderPtr service_provider_; |
80 scoped_ptr<PlatformImpl> platform_impl_; | 84 scoped_ptr<PlatformImpl> platform_impl_; |
81 scoped_ptr<Animator> animator_; | 85 scoped_ptr<Animator> animator_; |
82 blink::WebView* web_view_; | 86 blink::WebView* web_view_; |
83 float device_pixel_ratio_; | 87 float device_pixel_ratio_; |
84 gfx::Size physical_size_; | 88 gfx::Size physical_size_; |
85 mojo::Binding<ViewportObserver> viewport_observer_binding_; | 89 mojo::Binding<ViewportObserver> viewport_observer_binding_; |
86 | 90 |
87 base::WeakPtrFactory<Engine> weak_factory_; | 91 base::WeakPtrFactory<Engine> weak_factory_; |
88 | 92 |
89 DISALLOW_COPY_AND_ASSIGN(Engine); | 93 DISALLOW_COPY_AND_ASSIGN(Engine); |
90 }; | 94 }; |
91 | 95 |
92 } // namespace shell | 96 } // namespace shell |
93 } // namespace sky | 97 } // namespace sky |
94 | 98 |
95 #endif // SKY_SHELL_UI_ENGINE_H_ | 99 #endif // SKY_SHELL_UI_ENGINE_H_ |
OLD | NEW |