OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ |
6 #define COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ | 6 #define COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "cc/trees/layer_tree_host_client.h" | 13 #include "cc/trees/layer_tree_host_client.h" |
14 #include "components/view_manager/public/interfaces/gpu.mojom.h" | 14 #include "components/view_manager/public/interfaces/gpu.mojom.h" |
15 #include "components/view_manager/public/interfaces/surfaces.mojom.h" | 15 #include "components/view_manager/public/interfaces/surfaces.mojom.h" |
16 #include "mojo/cc/output_surface_mojo.h" | 16 #include "mojo/cc/output_surface_mojo.h" |
17 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" | 17 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class SingleThreadTaskRunner; | 20 class SingleThreadTaskRunner; |
21 } | 21 } |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 class WebWidget; | 24 class WebWidget; |
25 } | 25 } |
26 | 26 |
27 namespace cc { | 27 namespace cc { |
28 class LayerTreeHost; | 28 class LayerTreeHost; |
| 29 class TaskGraphRunner; |
| 30 } |
| 31 |
| 32 namespace gpu { |
| 33 class GpuMemoryBufferManager; |
29 } | 34 } |
30 | 35 |
31 namespace mojo { | 36 namespace mojo { |
32 class View; | 37 class View; |
33 } | 38 } |
34 | 39 |
35 namespace html_viewer { | 40 namespace html_viewer { |
36 | 41 |
37 class WebLayerTreeViewImpl : public blink::WebLayerTreeView, | 42 class WebLayerTreeViewImpl : public blink::WebLayerTreeView, |
38 public cc::LayerTreeHostClient, | 43 public cc::LayerTreeHostClient, |
39 public mojo::OutputSurfaceMojoClient { | 44 public mojo::OutputSurfaceMojoClient { |
40 public: | 45 public: |
41 WebLayerTreeViewImpl( | 46 WebLayerTreeViewImpl( |
42 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, | 47 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, |
| 48 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 49 cc::TaskGraphRunner* task_graph_runner, |
43 mojo::SurfacePtr surface, | 50 mojo::SurfacePtr surface, |
44 mojo::GpuPtr gpu_service); | 51 mojo::GpuPtr gpu_service); |
45 ~WebLayerTreeViewImpl() override; | 52 ~WebLayerTreeViewImpl() override; |
46 | 53 |
47 void set_widget(blink::WebWidget* widget) { widget_ = widget; } | 54 void set_widget(blink::WebWidget* widget) { widget_ = widget; } |
48 void set_view(mojo::View* view) { view_ = view; } | 55 void set_view(mojo::View* view) { view_ = view; } |
49 | 56 |
50 // cc::LayerTreeHostClient implementation. | 57 // cc::LayerTreeHostClient implementation. |
51 void WillBeginMainFrame() override; | 58 void WillBeginMainFrame() override; |
52 void DidBeginMainFrame() override; | 59 void DidBeginMainFrame() override; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 main_thread_compositor_task_runner_; | 134 main_thread_compositor_task_runner_; |
128 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_; | 135 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_; |
129 | 136 |
130 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_; | 137 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_; |
131 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl); | 138 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl); |
132 }; | 139 }; |
133 | 140 |
134 } // namespace html_viewer | 141 } // namespace html_viewer |
135 | 142 |
136 #endif // COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ | 143 #endif // COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ |
OLD | NEW |