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

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

Issue 880443003: Plumb resize notifications around sky/shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: git cl format 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 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"
11 #include "sky/engine/public/web/WebFrameClient.h" 11 #include "sky/engine/public/web/WebFrameClient.h"
12 #include "sky/engine/public/web/WebViewClient.h" 12 #include "sky/engine/public/web/WebViewClient.h"
13 #include "sky/shell/ui_delegate.h"
14 #include "ui/gfx/geometry/size.h"
13 15
14 namespace sky { 16 namespace sky {
15 namespace shell { 17 namespace shell {
16 class PlatformImpl; 18 class PlatformImpl;
17 19
18 class Engine : public blink::WebFrameClient, 20 class Engine : public UIDelegate,
21 public blink::WebFrameClient,
19 public blink::WebViewClient { 22 public blink::WebViewClient {
20 public: 23 public:
21 Engine(); 24 Engine();
22 ~Engine() override; 25 ~Engine() override;
23 26
24 base::WeakPtr<Engine> GetWeakPtr(); 27 base::WeakPtr<Engine> GetWeakPtr();
25 28
26 void Init(); 29 void Init();
27 30
31 void OnViewportMetricsChanged(const gfx::Size& size,
32 float device_pixel_ratio) override;
33
28 private: 34 private:
29 scoped_ptr<PlatformImpl> platform_impl_; 35 scoped_ptr<PlatformImpl> platform_impl_;
30 blink::WebView* web_view_; 36 blink::WebView* web_view_;
31 37
32 base::WeakPtrFactory<Engine> weak_factory_; 38 base::WeakPtrFactory<Engine> weak_factory_;
33 39
34 DISALLOW_COPY_AND_ASSIGN(Engine); 40 DISALLOW_COPY_AND_ASSIGN(Engine);
35 }; 41 };
36 42
37 } // namespace shell 43 } // namespace shell
38 } // namespace sky 44 } // namespace sky
39 45
40 #endif // SKY_SHELL_UI_ENGINE_H_ 46 #endif // SKY_SHELL_UI_ENGINE_H_
OLDNEW
« sky/shell/sky_view.cc ('K') | « sky/shell/sky_view.cc ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698