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" |
(...skipping 30 matching lines...) Expand all Loading... |
41 class WebLayerTreeViewImpl : public blink::WebLayerTreeView, | 41 class WebLayerTreeViewImpl : public blink::WebLayerTreeView, |
42 public cc::LayerTreeHostClient { | 42 public cc::LayerTreeHostClient { |
43 public: | 43 public: |
44 WebLayerTreeViewImpl( | 44 WebLayerTreeViewImpl( |
45 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, | 45 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, |
46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
47 cc::TaskGraphRunner* task_graph_runner); | 47 cc::TaskGraphRunner* task_graph_runner); |
48 ~WebLayerTreeViewImpl() override; | 48 ~WebLayerTreeViewImpl() override; |
49 | 49 |
50 void Initialize(mojo::GpuPtr gpu_service, | 50 void Initialize(mojo::GpuPtr gpu_service, |
51 mus::View* view, | 51 mojo::View* view, |
52 blink::WebWidget* widget); | 52 blink::WebWidget* widget); |
53 | 53 |
54 // cc::LayerTreeHostClient implementation. | 54 // cc::LayerTreeHostClient implementation. |
55 void WillBeginMainFrame() override; | 55 void WillBeginMainFrame() override; |
56 void DidBeginMainFrame() override; | 56 void DidBeginMainFrame() override; |
57 void BeginMainFrame(const cc::BeginFrameArgs& args) override; | 57 void BeginMainFrame(const cc::BeginFrameArgs& args) override; |
58 void BeginMainFrameNotExpectedSoon() override; | 58 void BeginMainFrameNotExpectedSoon() override; |
59 void Layout() override; | 59 void Layout() override; |
60 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, | 60 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, |
61 const gfx::Vector2dF& outer_delta, | 61 const gfx::Vector2dF& outer_delta, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual void registerSelection(const blink::WebSelection& selection) {} | 108 virtual void registerSelection(const blink::WebSelection& selection) {} |
109 virtual void clearSelection() {} | 109 virtual void clearSelection() {} |
110 virtual void setShowFPSCounter(bool) {} | 110 virtual void setShowFPSCounter(bool) {} |
111 virtual void setShowPaintRects(bool) {} | 111 virtual void setShowPaintRects(bool) {} |
112 virtual void setShowDebugBorders(bool) {} | 112 virtual void setShowDebugBorders(bool) {} |
113 virtual void setShowScrollBottleneckRects(bool) {} | 113 virtual void setShowScrollBottleneckRects(bool) {} |
114 | 114 |
115 private: | 115 private: |
116 // widget_ and view_ will outlive us. | 116 // widget_ and view_ will outlive us. |
117 blink::WebWidget* widget_; | 117 blink::WebWidget* widget_; |
118 mus::View* view_; | 118 mojo::View* view_; |
119 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 119 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
120 scoped_ptr<cc::OutputSurface> output_surface_; | 120 scoped_ptr<cc::OutputSurface> output_surface_; |
121 scoped_refptr<base::SingleThreadTaskRunner> | 121 scoped_refptr<base::SingleThreadTaskRunner> |
122 main_thread_compositor_task_runner_; | 122 main_thread_compositor_task_runner_; |
123 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_; | 123 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_; |
124 | 124 |
125 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_; | 125 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_; |
126 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl); | 126 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace html_viewer | 129 } // namespace html_viewer |
130 | 130 |
131 #endif // COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ | 131 #endif // COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ |
OLD | NEW |