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

Side by Side Diff: blimp/client/app/linux/blimp_display_manager.h

Issue 2363153002: Migrate Linux Blimp client to use BlimpClientContext (Closed)
Patch Set: Fix more nits Created 4 years, 2 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 BLIMP_CLIENT_APP_LINUX_BLIMP_DISPLAY_MANAGER_H_ 5 #ifndef BLIMP_CLIENT_APP_LINUX_BLIMP_DISPLAY_MANAGER_H_
6 #define BLIMP_CLIENT_APP_LINUX_BLIMP_DISPLAY_MANAGER_H_ 6 #define BLIMP_CLIENT_APP_LINUX_BLIMP_DISPLAY_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/events/event.h" 11 #include "ui/events/event.h"
12 #include "ui/events/gestures/motion_event_aura.h" 12 #include "ui/events/gestures/motion_event_aura.h"
13 #include "ui/platform_window/platform_window_delegate.h" 13 #include "ui/platform_window/platform_window_delegate.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Size; 16 class Size;
17 } 17 }
18 18
19 namespace ui { 19 namespace ui {
20 class PlatformWindow; 20 class PlatformWindow;
21 } 21 }
22 22
23 namespace blimp { 23 namespace blimp {
24 namespace client { 24 namespace client {
25 25
26 class BlimpCompositorDependencies;
27 class BlimpCompositorManager;
28 class BrowserCompositor; 26 class BrowserCompositor;
29 class RenderWidgetFeature; 27 class BlimpContents;
30 class TabControlFeature; 28 class CompositorDependencies;
31 29
32 class BlimpDisplayManagerDelegate { 30 class BlimpDisplayManagerDelegate {
33 public: 31 public:
34 virtual void OnClosed() = 0; 32 virtual void OnClosed() = 0;
35 }; 33 };
36 34
37 class BlimpDisplayManager : public ui::PlatformWindowDelegate { 35 class BlimpDisplayManager : public ui::PlatformWindowDelegate {
Kevin M 2016/09/27 21:59:41 Can we add a descriptive comment for this class?
steimel 2016/09/27 23:23:19 Done.
38 public: 36 public:
39 BlimpDisplayManager(const gfx::Size& window_size, 37 BlimpDisplayManager(const gfx::Size& window_size,
Kevin M 2016/09/27 21:59:41 Comment on ctor parameters
steimel 2016/09/27 23:23:19 Done.
40 BlimpDisplayManagerDelegate* delegate, 38 BlimpDisplayManagerDelegate* delegate,
41 RenderWidgetFeature* render_widget_feature, 39 CompositorDependencies* compositor_dependencies,
42 TabControlFeature* tab_control_feature); 40 std::unique_ptr<BlimpContents> contents);
43 ~BlimpDisplayManager() override; 41 ~BlimpDisplayManager() override;
44 42
45 // ui::PlatformWindowDelegate: 43 // ui::PlatformWindowDelegate:
Kevin M 2016/09/27 21:59:41 "... implementation."
steimel 2016/09/27 23:23:19 Done.
46 void OnBoundsChanged(const gfx::Rect& new_bounds) override; 44 void OnBoundsChanged(const gfx::Rect& new_bounds) override;
47 void OnDamageRect(const gfx::Rect& damaged_region) override {} 45 void OnDamageRect(const gfx::Rect& damaged_region) override {}
48 void DispatchEvent(ui::Event* event) override; 46 void DispatchEvent(ui::Event* event) override;
49 void OnCloseRequest() override; 47 void OnCloseRequest() override;
50 void OnClosed() override; 48 void OnClosed() override;
51 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} 49 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {}
52 void OnLostCapture() override {} 50 void OnLostCapture() override {}
53 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, 51 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
54 float device_pixel_ratio) override; 52 float device_pixel_ratio) override;
55 void OnAcceleratedWidgetDestroyed() override; 53 void OnAcceleratedWidgetDestroyed() override;
(...skipping 12 matching lines...) Expand all
68 int pointer_id, 66 int pointer_id,
69 int pointer_x, 67 int pointer_x,
70 int pointer_y); 68 int pointer_y);
71 69
72 // Simulate a pinch/zoom touch event. 70 // Simulate a pinch/zoom touch event.
73 void Zoom(int pointer_x, int pointer_y, int y_offset, bool zoom_out); 71 void Zoom(int pointer_x, int pointer_y, int y_offset, bool zoom_out);
74 72
75 float device_pixel_ratio_; 73 float device_pixel_ratio_;
76 74
77 BlimpDisplayManagerDelegate* delegate_; 75 BlimpDisplayManagerDelegate* delegate_;
78 TabControlFeature* tab_control_feature_;
79 76
80 std::unique_ptr<BlimpCompositorDependencies> compositor_dependencies_;
81 std::unique_ptr<BlimpCompositorManager> compositor_manager_;
82 std::unique_ptr<BrowserCompositor> compositor_; 77 std::unique_ptr<BrowserCompositor> compositor_;
78 std::unique_ptr<BlimpContents> contents_;
83 std::unique_ptr<ui::PlatformWindow> platform_window_; 79 std::unique_ptr<ui::PlatformWindow> platform_window_;
84 80
85 DISALLOW_COPY_AND_ASSIGN(BlimpDisplayManager); 81 DISALLOW_COPY_AND_ASSIGN(BlimpDisplayManager);
86 }; 82 };
87 83
88 } // namespace client 84 } // namespace client
89 } // namespace blimp 85 } // namespace blimp
90 86
91 #endif // BLIMP_CLIENT_APP_LINUX_BLIMP_DISPLAY_MANAGER_H_ 87 #endif // BLIMP_CLIENT_APP_LINUX_BLIMP_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698