| 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 "services/ui/public/interfaces/cursor.mojom.h" |
| 18 #include "services/ui/public/interfaces/window_manager.mojom.h" | 19 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 19 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" | 20 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
| 20 #include "services/ui/public/interfaces/window_tree.mojom.h" | 21 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 21 #include "services/ui/ws/frame_generator.h" | 22 #include "services/ui/ws/frame_generator.h" |
| 22 #include "services/ui/ws/frame_generator_delegate.h" | 23 #include "services/ui/ws/frame_generator_delegate.h" |
| 23 #include "services/ui/ws/platform_display_delegate.h" | 24 #include "services/ui/ws/platform_display_delegate.h" |
| 24 #include "ui/display/display.h" | 25 #include "ui/display/display.h" |
| 25 #include "ui/platform_window/platform_window_delegate.h" | 26 #include "ui/platform_window/platform_window_delegate.h" |
| 26 | 27 |
| 27 namespace cc { | 28 namespace cc { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const gfx::Rect& bounds) = 0; | 70 const gfx::Rect& bounds) = 0; |
| 70 | 71 |
| 71 virtual void SetViewportSize(const gfx::Size& size) = 0; | 72 virtual void SetViewportSize(const gfx::Size& size) = 0; |
| 72 | 73 |
| 73 virtual void SetTitle(const base::string16& title) = 0; | 74 virtual void SetTitle(const base::string16& title) = 0; |
| 74 | 75 |
| 75 virtual void SetCapture() = 0; | 76 virtual void SetCapture() = 0; |
| 76 | 77 |
| 77 virtual void ReleaseCapture() = 0; | 78 virtual void ReleaseCapture() = 0; |
| 78 | 79 |
| 79 virtual void SetCursorById(int32_t cursor) = 0; | 80 virtual void SetCursorById(mojom::Cursor cursor) = 0; |
| 80 | 81 |
| 81 virtual display::Display::Rotation GetRotation() = 0; | 82 virtual display::Display::Rotation GetRotation() = 0; |
| 82 | 83 |
| 83 virtual float GetDeviceScaleFactor() = 0; | 84 virtual float GetDeviceScaleFactor() = 0; |
| 84 | 85 |
| 85 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; | 86 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; |
| 86 virtual void SetImeVisibility(bool visible) = 0; | 87 virtual void SetImeVisibility(bool visible) = 0; |
| 87 | 88 |
| 88 // Returns true if a compositor frame has been submitted but not drawn yet. | 89 // Returns true if a compositor frame has been submitted but not drawn yet. |
| 89 virtual bool IsFramePending() const = 0; | 90 virtual bool IsFramePending() const = 0; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 123 |
| 123 // PlatformDisplay: | 124 // PlatformDisplay: |
| 124 void Init(PlatformDisplayDelegate* delegate) override; | 125 void Init(PlatformDisplayDelegate* delegate) override; |
| 125 int64_t GetId() const override; | 126 int64_t GetId() const override; |
| 126 void SchedulePaint(const ServerWindow* window, | 127 void SchedulePaint(const ServerWindow* window, |
| 127 const gfx::Rect& bounds) override; | 128 const gfx::Rect& bounds) override; |
| 128 void SetViewportSize(const gfx::Size& size) override; | 129 void SetViewportSize(const gfx::Size& size) override; |
| 129 void SetTitle(const base::string16& title) override; | 130 void SetTitle(const base::string16& title) override; |
| 130 void SetCapture() override; | 131 void SetCapture() override; |
| 131 void ReleaseCapture() override; | 132 void ReleaseCapture() override; |
| 132 void SetCursorById(int32_t cursor) override; | 133 void SetCursorById(mojom::Cursor cursor) override; |
| 133 float GetDeviceScaleFactor() override; | 134 float GetDeviceScaleFactor() override; |
| 134 display::Display::Rotation GetRotation() override; | 135 display::Display::Rotation GetRotation() override; |
| 135 void UpdateTextInputState(const ui::TextInputState& state) override; | 136 void UpdateTextInputState(const ui::TextInputState& state) override; |
| 136 void SetImeVisibility(bool visible) override; | 137 void SetImeVisibility(bool visible) override; |
| 137 bool IsFramePending() const override; | 138 bool IsFramePending() const override; |
| 138 void RequestCopyOfOutput( | 139 void RequestCopyOfOutput( |
| 139 std::unique_ptr<cc::CopyOutputRequest> output_request) override; | 140 std::unique_ptr<cc::CopyOutputRequest> output_request) override; |
| 140 gfx::Rect GetBounds() const override; | 141 gfx::Rect GetBounds() const override; |
| 141 bool IsPrimaryDisplay() const override; | 142 bool IsPrimaryDisplay() const override; |
| 142 void OnGpuChannelEstablished( | 143 void OnGpuChannelEstablished( |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |