OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DEFAULT_H_ | 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ |
6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ | 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 void SetViewportSize(const gfx::Size& size) override; | 37 void SetViewportSize(const gfx::Size& size) override; |
38 void SetTitle(const base::string16& title) override; | 38 void SetTitle(const base::string16& title) override; |
39 void SetCapture() override; | 39 void SetCapture() override; |
40 void ReleaseCapture() override; | 40 void ReleaseCapture() override; |
41 void SetCursorById(mojom::Cursor cursor) override; | 41 void SetCursorById(mojom::Cursor cursor) override; |
42 void UpdateTextInputState(const ui::TextInputState& state) override; | 42 void UpdateTextInputState(const ui::TextInputState& state) override; |
43 void SetImeVisibility(bool visible) override; | 43 void SetImeVisibility(bool visible) override; |
44 gfx::Rect GetBounds() const override; | 44 gfx::Rect GetBounds() const override; |
45 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override; | 45 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override; |
46 const display::ViewportMetrics& GetViewportMetrics() const override; | 46 const display::ViewportMetrics& GetViewportMetrics() const override; |
47 void OnGpuChannelEstablished( | |
48 scoped_refptr<gpu::GpuChannelHost> gpu_channel) override; | |
49 | 47 |
50 private: | 48 private: |
51 // Update the root_location of located events to be relative to the origin | 49 // Update the root_location of located events to be relative to the origin |
52 // of this display. For example, if the origin of this display is (1800, 0) | 50 // of this display. For example, if the origin of this display is (1800, 0) |
53 // and the location of the event is (100, 200) then the root_location will be | 51 // and the location of the event is (100, 200) then the root_location will be |
54 // updated to be (1900, 200). | 52 // updated to be (1900, 200). |
55 // TODO(riajiang): This is totally broken with HDPI. | 53 // TODO(riajiang): This is totally broken with HDPI. |
56 void UpdateEventRootLocation(ui::LocatedEvent* event); | 54 void UpdateEventRootLocation(ui::LocatedEvent* event); |
57 | 55 |
58 // ui::PlatformWindowDelegate: | 56 // ui::PlatformWindowDelegate: |
(...skipping 24 matching lines...) Expand all Loading... |
83 display::ViewportMetrics metrics_; | 81 display::ViewportMetrics metrics_; |
84 std::unique_ptr<ui::PlatformWindow> platform_window_; | 82 std::unique_ptr<ui::PlatformWindow> platform_window_; |
85 | 83 |
86 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault); | 84 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault); |
87 }; | 85 }; |
88 | 86 |
89 } // namespace ws | 87 } // namespace ws |
90 } // namespace ui | 88 } // namespace ui |
91 | 89 |
92 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ | 90 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ |
OLD | NEW |