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

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

Issue 808553007: Move HTMLViewer out of mojo namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge mistake in test Created 6 years 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 12 matching lines...) Expand all
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 } 29 }
30 30
31 namespace mojo { 31 namespace mojo {
32 class View; 32 class View;
33 }
34
35 namespace html_viewer {
33 36
34 class WebLayerTreeViewImpl : public blink::WebLayerTreeView, 37 class WebLayerTreeViewImpl : public blink::WebLayerTreeView,
35 public cc::LayerTreeHostClient, 38 public cc::LayerTreeHostClient,
36 public OutputSurfaceMojoClient { 39 public mojo::OutputSurfaceMojoClient {
37 public: 40 public:
38 WebLayerTreeViewImpl( 41 WebLayerTreeViewImpl(
39 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy, 42 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy,
40 SurfacesServicePtr surfaces_service, 43 mojo::SurfacesServicePtr surfaces_service,
41 GpuPtr gpu_service); 44 mojo::GpuPtr gpu_service);
42 virtual ~WebLayerTreeViewImpl(); 45 virtual ~WebLayerTreeViewImpl();
43 46
44 void set_widget(blink::WebWidget* widget) { widget_ = widget; } 47 void set_widget(blink::WebWidget* widget) { widget_ = widget; }
45 void set_view(View* view) { view_ = view; } 48 void set_view(mojo::View* view) { view_ = view; }
46 49
47 // cc::LayerTreeHostClient implementation. 50 // cc::LayerTreeHostClient implementation.
48 void WillBeginMainFrame(int frame_id) override; 51 void WillBeginMainFrame(int frame_id) override;
49 void DidBeginMainFrame() override; 52 void DidBeginMainFrame() override;
50 void BeginMainFrame(const cc::BeginFrameArgs& args) override; 53 void BeginMainFrame(const cc::BeginFrameArgs& args) override;
51 void Layout() override; 54 void Layout() override;
52 void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, 55 void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
53 const gfx::Vector2d& outer_delta, 56 const gfx::Vector2d& outer_delta,
54 const gfx::Vector2dF& elastic_overscroll_delta, 57 const gfx::Vector2dF& elastic_overscroll_delta,
55 float page_scale, 58 float page_scale,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 virtual void setShowFPSCounter(bool) {} 109 virtual void setShowFPSCounter(bool) {}
107 virtual void setShowPaintRects(bool) {} 110 virtual void setShowPaintRects(bool) {}
108 virtual void setShowDebugBorders(bool) {} 111 virtual void setShowDebugBorders(bool) {}
109 virtual void setContinuousPaintingEnabled(bool) {} 112 virtual void setContinuousPaintingEnabled(bool) {}
110 virtual void setShowScrollBottleneckRects(bool) {} 113 virtual void setShowScrollBottleneckRects(bool) {}
111 114
112 // OutputSurfaceMojoClient implementation. 115 // OutputSurfaceMojoClient implementation.
113 void DidCreateSurface(cc::SurfaceId id) override; 116 void DidCreateSurface(cc::SurfaceId id) override;
114 117
115 private: 118 private:
116 void OnSurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace); 119 void OnSurfaceConnectionCreated(mojo::SurfacePtr surface,
120 uint32_t id_namespace);
117 void DidCreateSurfaceOnMainThread(cc::SurfaceId id); 121 void DidCreateSurfaceOnMainThread(cc::SurfaceId id);
118 122
119 // widget_ and view_ will outlive us. 123 // widget_ and view_ will outlive us.
120 blink::WebWidget* widget_; 124 blink::WebWidget* widget_;
121 View* view_; 125 mojo::View* view_;
122 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 126 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
123 SurfacesServicePtr surfaces_service_; 127 mojo::SurfacesServicePtr surfaces_service_;
124 scoped_ptr<cc::OutputSurface> output_surface_; 128 scoped_ptr<cc::OutputSurface> output_surface_;
125 GpuPtr gpu_service_; 129 mojo::GpuPtr gpu_service_;
126 scoped_refptr<base::SingleThreadTaskRunner> 130 scoped_refptr<base::SingleThreadTaskRunner>
127 main_thread_compositor_task_runner_; 131 main_thread_compositor_task_runner_;
128 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_; 132 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_;
129 133
130 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_; 134 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_;
131 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl); 135 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl);
132 }; 136 };
133 137
134 } // namespace mojo 138 } // namespace html_viewer
135 139
136 #endif // MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_IMPL_H_ 140 #endif // MOJO_SERVICES_HTML_VIEWER_WEBLAYERTREEVIEW_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/webcookiejar_impl.cc ('k') | mojo/services/html_viewer/weblayertreeview_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698