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

Side by Side Diff: sky/shell/ui/engine.h

Issue 1187503003: Refactor SkyShell to allow multiple SkyViews (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: s/instance/sky_shell/ Created 5 years, 6 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
« no previous file with comments | « sky/shell/shell_view.cc ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 base::WeakPtr<GPUDelegate> gpu_delegate; 44 base::WeakPtr<GPUDelegate> gpu_delegate;
45 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner; 45 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner;
46 }; 46 };
47 47
48 explicit Engine(const Config& config); 48 explicit Engine(const Config& config);
49 ~Engine() override; 49 ~Engine() override;
50 50
51 base::WeakPtr<Engine> GetWeakPtr(); 51 base::WeakPtr<Engine> GetWeakPtr();
52 52
53 void Init(); 53 static void Init(ServiceProviderContext* service_provider_context);
54 54
55 void BeginFrame(base::TimeTicks frame_time); 55 void BeginFrame(base::TimeTicks frame_time);
56 skia::RefPtr<SkPicture> Paint(); 56 skia::RefPtr<SkPicture> Paint();
57 57
58 private: 58 private:
59 // UIDelegate methods: 59 // UIDelegate methods:
60 void ConnectToViewportObserver( 60 void ConnectToViewportObserver(
61 mojo::InterfaceRequest<ViewportObserver> request) override; 61 mojo::InterfaceRequest<ViewportObserver> request) override;
62 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; 62 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
63 void OnOutputSurfaceDestroyed() override; 63 void OnOutputSurfaceDestroyed() override;
(...skipping 25 matching lines...) Expand all
89 // NavigatorHost methods: 89 // NavigatorHost methods:
90 void RequestNavigate(mojo::Target target, 90 void RequestNavigate(mojo::Target target,
91 mojo::URLRequestPtr request) override; 91 mojo::URLRequestPtr request) override;
92 void DidNavigateLocally(const mojo::String& url) override; 92 void DidNavigateLocally(const mojo::String& url) override;
93 void RequestNavigateHistory(int32_t delta) override; 93 void RequestNavigateHistory(int32_t delta) override;
94 94
95 void UpdateSkyViewSize(); 95 void UpdateSkyViewSize();
96 void UpdateWebViewSize(); 96 void UpdateWebViewSize();
97 97
98 Config config_; 98 Config config_;
99 mojo::ServiceProviderPtr service_provider_;
100 scoped_ptr<PlatformImpl> platform_impl_;
101 scoped_ptr<Animator> animator_; 99 scoped_ptr<Animator> animator_;
102 100
103 std::unique_ptr<blink::SkyView> sky_view_; 101 std::unique_ptr<blink::SkyView> sky_view_;
104 blink::WebView* web_view_; 102 blink::WebView* web_view_;
105 103
106 float device_pixel_ratio_; 104 float device_pixel_ratio_;
107 gfx::Size physical_size_; 105 gfx::Size physical_size_;
108 mojo::Binding<ViewportObserver> viewport_observer_binding_; 106 mojo::Binding<ViewportObserver> viewport_observer_binding_;
109 107
110 base::WeakPtrFactory<Engine> weak_factory_; 108 base::WeakPtrFactory<Engine> weak_factory_;
111 109
112 DISALLOW_COPY_AND_ASSIGN(Engine); 110 DISALLOW_COPY_AND_ASSIGN(Engine);
113 }; 111 };
114 112
115 } // namespace shell 113 } // namespace shell
116 } // namespace sky 114 } // namespace sky
117 115
118 #endif // SKY_SHELL_UI_ENGINE_H_ 116 #endif // SKY_SHELL_UI_ENGINE_H_
OLDNEW
« no previous file with comments | « sky/shell/shell_view.cc ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698