Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_CLIENT_LINUX_BLIMP_DISPLAY_MANAGER_H_ | |
| 6 #define BLIMP_CLIENT_LINUX_BLIMP_DISPLAY_MANAGER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "ui/platform_window/platform_window_delegate.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 class Size; | |
| 14 } | |
| 15 | |
| 16 namespace ui { | |
| 17 class PlatformWindow; | |
| 18 } | |
| 19 | |
| 20 namespace blimp { | |
| 21 | |
| 22 class BlimpCompositor; | |
| 23 class RenderWidgetFeature; | |
| 24 class TabControlFeature; | |
| 25 | |
| 26 class BlimpDisplayManagerDelegate { | |
| 27 public: | |
| 28 virtual void OnClosed() = 0; | |
|
David Trainor- moved to gerrit
2015/12/16 01:31:53
I actually probably don't need this... I can shut
| |
| 29 }; | |
| 30 | |
| 31 class BlimpDisplayManager : public ui::PlatformWindowDelegate { | |
| 32 public: | |
| 33 BlimpDisplayManager(const gfx::Size& window_size, | |
| 34 BlimpDisplayManagerDelegate* delegate, | |
| 35 RenderWidgetFeature* render_widget_feature, | |
| 36 TabControlFeature* tab_control_feature); | |
|
Wez
2016/01/05 19:15:02
nit: Document object lifetime/ownership constrains
| |
| 37 ~BlimpDisplayManager() override; | |
| 38 | |
| 39 // ui::PlatformWindowDelegate: | |
|
Wez
2016/01/05 19:15:02
nit: ui::PlatformWindowDelegate implementation.
| |
| 40 void OnBoundsChanged(const gfx::Rect& new_bounds) override; | |
| 41 void OnDamageRect(const gfx::Rect& damaged_region) override; | |
| 42 void DispatchEvent(ui::Event* event) override; | |
| 43 void OnCloseRequest() override; | |
| 44 void OnClosed() override; | |
| 45 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; | |
| 46 void OnLostCapture() override; | |
| 47 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, | |
| 48 float device_pixel_ratio) override; | |
| 49 void OnAcceleratedWidgetDestroyed() override; | |
| 50 void OnActivationChanged(bool active) override; | |
| 51 | |
| 52 private: | |
| 53 float device_pixel_ratio_; | |
|
Wez
2016/01/05 19:15:02
One-liner comment to explain what this is used for
| |
| 54 | |
| 55 BlimpDisplayManagerDelegate* delegate_; | |
| 56 TabControlFeature* tab_control_feature_; | |
|
Wez
2016/01/05 19:15:02
Inline initialize to nullptr.
| |
| 57 | |
| 58 scoped_ptr<BlimpCompositor> blimp_compositor_; | |
| 59 scoped_ptr<ui::PlatformWindow> platform_window_; | |
| 60 | |
| 61 DISALLOW_COPY_AND_ASSIGN(BlimpDisplayManager); | |
| 62 }; | |
| 63 | |
| 64 } // namespace blimp | |
| 65 | |
| 66 #endif // BLIMP_CLIENT_LINUX_BLIMP_DISPLAY_MANAGER_H_ | |
| OLD | NEW |