| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "gpu/ipc/common/surface_handle.h" |
| 18 #include "services/ui/public/interfaces/cursor.mojom.h" | 19 #include "services/ui/public/interfaces/cursor.mojom.h" |
| 19 #include "services/ui/public/interfaces/window_manager.mojom.h" | 20 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 20 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" | 21 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
| 21 #include "services/ui/public/interfaces/window_tree.mojom.h" | 22 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 22 #include "services/ui/ws/frame_generator.h" | 23 #include "services/ui/ws/frame_generator.h" |
| 23 #include "services/ui/ws/frame_generator_delegate.h" | 24 #include "services/ui/ws/frame_generator_delegate.h" |
| 24 #include "services/ui/ws/platform_display_delegate.h" | 25 #include "services/ui/ws/platform_display_delegate.h" |
| 25 #include "ui/display/display.h" | 26 #include "ui/display/display.h" |
| 26 #include "ui/platform_window/platform_window_delegate.h" | 27 #include "ui/platform_window/platform_window_delegate.h" |
| 27 | 28 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void UpdateEventRootLocation(ui::LocatedEvent* event); | 156 void UpdateEventRootLocation(ui::LocatedEvent* event); |
| 156 | 157 |
| 157 // ui::PlatformWindowDelegate: | 158 // ui::PlatformWindowDelegate: |
| 158 void OnBoundsChanged(const gfx::Rect& new_bounds) override; | 159 void OnBoundsChanged(const gfx::Rect& new_bounds) override; |
| 159 void OnDamageRect(const gfx::Rect& damaged_region) override; | 160 void OnDamageRect(const gfx::Rect& damaged_region) override; |
| 160 void DispatchEvent(ui::Event* event) override; | 161 void DispatchEvent(ui::Event* event) override; |
| 161 void OnCloseRequest() override; | 162 void OnCloseRequest() override; |
| 162 void OnClosed() override; | 163 void OnClosed() override; |
| 163 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; | 164 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; |
| 164 void OnLostCapture() override; | 165 void OnLostCapture() override; |
| 165 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, | 166 void OnAcceleratedWidgetAvailable(gpu::SurfaceHandle widget, |
| 166 float device_scale_factor) override; | 167 float device_scale_factor) override; |
| 167 void OnAcceleratedWidgetDestroyed() override; | 168 void OnAcceleratedWidgetDestroyed() override; |
| 168 void OnActivationChanged(bool active) override; | 169 void OnActivationChanged(bool active) override; |
| 169 | 170 |
| 170 // FrameGeneratorDelegate: | 171 // FrameGeneratorDelegate: |
| 171 ServerWindow* GetRootWindow() override; | 172 ServerWindow* GetRootWindow() override; |
| 172 bool IsInHighContrastMode() override; | 173 bool IsInHighContrastMode() override; |
| 173 const ViewportMetrics& GetViewportMetrics() override; | 174 const ViewportMetrics& GetViewportMetrics() override; |
| 174 | 175 |
| 175 int64_t id_; | 176 int64_t id_; |
| 176 | 177 |
| 177 #if !defined(OS_ANDROID) | 178 #if !defined(OS_ANDROID) |
| 178 std::unique_ptr<ui::CursorLoader> cursor_loader_; | 179 std::unique_ptr<ui::CursorLoader> cursor_loader_; |
| 179 #endif | 180 #endif |
| 180 | 181 |
| 181 PlatformDisplayDelegate* delegate_ = nullptr; | 182 PlatformDisplayDelegate* delegate_ = nullptr; |
| 182 std::unique_ptr<FrameGenerator> frame_generator_; | 183 std::unique_ptr<FrameGenerator> frame_generator_; |
| 183 | 184 |
| 184 ViewportMetrics metrics_; | 185 ViewportMetrics metrics_; |
| 185 std::unique_ptr<ui::PlatformWindow> platform_window_; | 186 std::unique_ptr<ui::PlatformWindow> platform_window_; |
| 186 | 187 |
| 187 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); | 188 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); |
| 188 }; | 189 }; |
| 189 | 190 |
| 190 } // namespace ws | 191 } // namespace ws |
| 191 | 192 |
| 192 } // namespace ui | 193 } // namespace ui |
| 193 | 194 |
| 194 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 195 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| OLD | NEW |