| 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 namespace client { | |
| 22 | |
| 23 class BlimpCompositor; | |
| 24 class RenderWidgetFeature; | |
| 25 class TabControlFeature; | |
| 26 | |
| 27 class BlimpDisplayManagerDelegate { | |
| 28 public: | |
| 29 virtual void OnClosed() = 0; | |
| 30 }; | |
| 31 | |
| 32 class BlimpDisplayManager : public ui::PlatformWindowDelegate { | |
| 33 public: | |
| 34 BlimpDisplayManager(const gfx::Size& window_size, | |
| 35 BlimpDisplayManagerDelegate* delegate, | |
| 36 RenderWidgetFeature* render_widget_feature, | |
| 37 TabControlFeature* tab_control_feature); | |
| 38 ~BlimpDisplayManager() override; | |
| 39 | |
| 40 // ui::PlatformWindowDelegate: | |
| 41 void OnBoundsChanged(const gfx::Rect& new_bounds) override; | |
| 42 void OnDamageRect(const gfx::Rect& damaged_region) override; | |
| 43 void DispatchEvent(ui::Event* event) override; | |
| 44 void OnCloseRequest() override; | |
| 45 void OnClosed() override; | |
| 46 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; | |
| 47 void OnLostCapture() override; | |
| 48 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, | |
| 49 float device_pixel_ratio) override; | |
| 50 void OnAcceleratedWidgetDestroyed() override; | |
| 51 void OnActivationChanged(bool active) override; | |
| 52 | |
| 53 private: | |
| 54 float device_pixel_ratio_; | |
| 55 | |
| 56 BlimpDisplayManagerDelegate* delegate_; | |
| 57 TabControlFeature* tab_control_feature_; | |
| 58 | |
| 59 scoped_ptr<BlimpCompositor> blimp_compositor_; | |
| 60 scoped_ptr<ui::PlatformWindow> platform_window_; | |
| 61 | |
| 62 DISALLOW_COPY_AND_ASSIGN(BlimpDisplayManager); | |
| 63 }; | |
| 64 | |
| 65 } // namespace client | |
| 66 } // namespace blimp | |
| 67 | |
| 68 #endif // BLIMP_CLIENT_LINUX_BLIMP_DISPLAY_MANAGER_H_ | |
| OLD | NEW |