Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Side by Side Diff: mojo/services/html_viewer/weblayertreeview_impl.h

Issue 869343004: Remove use of mojo.SurfacesService interface in html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_IMPL_H_ 5 #ifndef MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_IMPL_H_
6 #define MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_IMPL_H_ 6 #define MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_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 22 matching lines...) Expand all
33 } 33 }
34 34
35 namespace html_viewer { 35 namespace html_viewer {
36 36
37 class WebLayerTreeViewImpl : public blink::WebLayerTreeView, 37 class WebLayerTreeViewImpl : public blink::WebLayerTreeView,
38 public cc::LayerTreeHostClient, 38 public cc::LayerTreeHostClient,
39 public mojo::OutputSurfaceMojoClient { 39 public mojo::OutputSurfaceMojoClient {
40 public: 40 public:
41 WebLayerTreeViewImpl( 41 WebLayerTreeViewImpl(
42 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy, 42 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy,
43 mojo::SurfacesServicePtr surfaces_service, 43 mojo::SurfacePtr surface,
44 mojo::GpuPtr gpu_service); 44 mojo::GpuPtr gpu_service);
45 virtual ~WebLayerTreeViewImpl(); 45 virtual ~WebLayerTreeViewImpl();
46 46
47 void set_widget(blink::WebWidget* widget) { widget_ = widget; } 47 void set_widget(blink::WebWidget* widget) { widget_ = widget; }
48 void set_view(mojo::View* view) { view_ = view; } 48 void set_view(mojo::View* view) { view_ = view; }
49 49
50 // cc::LayerTreeHostClient implementation. 50 // cc::LayerTreeHostClient implementation.
51 void WillBeginMainFrame(int frame_id) override; 51 void WillBeginMainFrame(int frame_id) override;
52 void DidBeginMainFrame() override; 52 void DidBeginMainFrame() override;
53 void BeginMainFrame(const cc::BeginFrameArgs& args) override; 53 void BeginMainFrame(const cc::BeginFrameArgs& args) override;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual void setShowFPSCounter(bool) {} 109 virtual void setShowFPSCounter(bool) {}
110 virtual void setShowPaintRects(bool) {} 110 virtual void setShowPaintRects(bool) {}
111 virtual void setShowDebugBorders(bool) {} 111 virtual void setShowDebugBorders(bool) {}
112 virtual void setContinuousPaintingEnabled(bool) {} 112 virtual void setContinuousPaintingEnabled(bool) {}
113 virtual void setShowScrollBottleneckRects(bool) {} 113 virtual void setShowScrollBottleneckRects(bool) {}
114 114
115 // OutputSurfaceMojoClient implementation. 115 // OutputSurfaceMojoClient implementation.
116 void DidCreateSurface(cc::SurfaceId id) override; 116 void DidCreateSurface(cc::SurfaceId id) override;
117 117
118 private: 118 private:
119 void OnSurfaceConnectionCreated(mojo::SurfacePtr surface,
120 uint32_t id_namespace);
121 void DidCreateSurfaceOnMainThread(cc::SurfaceId id); 119 void DidCreateSurfaceOnMainThread(cc::SurfaceId id);
122 120
123 // widget_ and view_ will outlive us. 121 // widget_ and view_ will outlive us.
124 blink::WebWidget* widget_; 122 blink::WebWidget* widget_;
125 mojo::View* view_; 123 mojo::View* view_;
126 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 124 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
127 mojo::SurfacesServicePtr surfaces_service_;
128 scoped_ptr<cc::OutputSurface> output_surface_; 125 scoped_ptr<cc::OutputSurface> output_surface_;
129 mojo::GpuPtr gpu_service_;
130 scoped_refptr<base::SingleThreadTaskRunner> 126 scoped_refptr<base::SingleThreadTaskRunner>
131 main_thread_compositor_task_runner_; 127 main_thread_compositor_task_runner_;
132 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_; 128 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_;
133 129
134 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_; 130 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_;
135 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl); 131 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl);
136 }; 132 };
137 133
138 } // namespace html_viewer 134 } // namespace html_viewer
139 135
140 #endif // MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_IMPL_H_ 136 #endif // MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/html_document.cc ('k') | mojo/services/html_viewer/weblayertreeview_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698