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

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

Issue 962383003: Make shake-to-reload actually work (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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.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 17 matching lines...) Expand all
28 class Animator; 28 class Animator;
29 29
30 class Engine : public UIDelegate, 30 class Engine : public UIDelegate,
31 public ViewportObserver, 31 public ViewportObserver,
32 public blink::ServiceProvider, 32 public blink::ServiceProvider,
33 public mojo::NavigatorHost, 33 public mojo::NavigatorHost,
34 public blink::WebFrameClient, 34 public blink::WebFrameClient,
35 public blink::WebViewClient { 35 public blink::WebViewClient {
36 public: 36 public:
37 struct Config { 37 struct Config {
38 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner;
39
38 base::WeakPtr<GPUDelegate> gpu_delegate; 40 base::WeakPtr<GPUDelegate> gpu_delegate;
39 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner; 41 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner;
40 }; 42 };
41 43
42 explicit Engine(const Config& config); 44 explicit Engine(const Config& config);
43 ~Engine() override; 45 ~Engine() override;
44 46
45 base::WeakPtr<Engine> GetWeakPtr(); 47 base::WeakPtr<Engine> GetWeakPtr();
46 48
47 void Init(mojo::ScopedMessagePipeHandle service_provider); 49 void Init();
48 50
49 void BeginFrame(base::TimeTicks frame_time); 51 void BeginFrame(base::TimeTicks frame_time);
50 skia::RefPtr<SkPicture> Paint(); 52 skia::RefPtr<SkPicture> Paint();
51 53
52 private: 54 private:
53 // UIDelegate methods: 55 // UIDelegate methods:
54 void ConnectToViewportObserver( 56 void ConnectToViewportObserver(
55 mojo::InterfaceRequest<ViewportObserver> request) override; 57 mojo::InterfaceRequest<ViewportObserver> request) override;
56 58
57 // ViewportObserver: 59 // ViewportObserver:
(...skipping 13 matching lines...) Expand all
71 73
72 // Services methods: 74 // Services methods:
73 mojo::NavigatorHost* NavigatorHost() override; 75 mojo::NavigatorHost* NavigatorHost() override;
74 76
75 // NavigatorHost methods: 77 // NavigatorHost methods:
76 void RequestNavigate(mojo::Target target, 78 void RequestNavigate(mojo::Target target,
77 mojo::URLRequestPtr request) override; 79 mojo::URLRequestPtr request) override;
78 void DidNavigateLocally(const mojo::String& url) override; 80 void DidNavigateLocally(const mojo::String& url) override;
79 void RequestNavigateHistory(int32_t delta) override; 81 void RequestNavigateHistory(int32_t delta) override;
80 82
83 mojo::ServiceProviderPtr CreateServiceProvider();
81 void UpdateWebViewSize(); 84 void UpdateWebViewSize();
82 85
86 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner_;
83 mojo::ServiceProviderPtr service_provider_; 87 mojo::ServiceProviderPtr service_provider_;
84 scoped_ptr<PlatformImpl> platform_impl_; 88 scoped_ptr<PlatformImpl> platform_impl_;
85 scoped_ptr<Animator> animator_; 89 scoped_ptr<Animator> animator_;
86 blink::WebView* web_view_; 90 blink::WebView* web_view_;
87 float device_pixel_ratio_; 91 float device_pixel_ratio_;
88 gfx::Size physical_size_; 92 gfx::Size physical_size_;
89 mojo::Binding<ViewportObserver> viewport_observer_binding_; 93 mojo::Binding<ViewportObserver> viewport_observer_binding_;
90 94
91 base::WeakPtrFactory<Engine> weak_factory_; 95 base::WeakPtrFactory<Engine> weak_factory_;
92 96
93 DISALLOW_COPY_AND_ASSIGN(Engine); 97 DISALLOW_COPY_AND_ASSIGN(Engine);
94 }; 98 };
95 99
96 } // namespace shell 100 } // namespace shell
97 } // namespace sky 101 } // namespace sky
98 102
99 #endif // SKY_SHELL_UI_ENGINE_H_ 103 #endif // SKY_SHELL_UI_ENGINE_H_
OLDNEW
« no previous file with comments | « sky/shell/shell.cc ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698