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> |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void SetImeVisibility(bool visible) override; | 136 void SetImeVisibility(bool visible) override; |
137 bool IsFramePending() const override; | 137 bool IsFramePending() const override; |
138 void RequestCopyOfOutput( | 138 void RequestCopyOfOutput( |
139 std::unique_ptr<cc::CopyOutputRequest> output_request) override; | 139 std::unique_ptr<cc::CopyOutputRequest> output_request) override; |
140 gfx::Rect GetBounds() const override; | 140 gfx::Rect GetBounds() const override; |
141 bool IsPrimaryDisplay() const override; | 141 bool IsPrimaryDisplay() const override; |
142 void OnGpuChannelEstablished( | 142 void OnGpuChannelEstablished( |
143 scoped_refptr<gpu::GpuChannelHost> gpu_channel) override; | 143 scoped_refptr<gpu::GpuChannelHost> gpu_channel) override; |
144 | 144 |
145 private: | 145 private: |
146 void UpdateMetrics(const gfx::Rect& bounds, float device_scale_factor); | 146 void UpdateMetrics(const gfx::Rect& bounds, |
| 147 const gfx::Size& pixel_size, |
| 148 float device_scale_factor); |
147 | 149 |
148 // Update the root_location of located events to be relative to the origin | 150 // Update the root_location of located events to be relative to the origin |
149 // of this display. For example, if the origin of this display is (1800, 0) | 151 // of this display. For example, if the origin of this display is (1800, 0) |
150 // and the location of the event is (100, 200) then the root_location will be | 152 // and the location of the event is (100, 200) then the root_location will be |
151 // updated to be (1900, 200). | 153 // updated to be (1900, 200). |
152 void UpdateEventRootLocation(ui::LocatedEvent* event); | 154 void UpdateEventRootLocation(ui::LocatedEvent* event); |
153 | 155 |
154 // ui::PlatformWindowDelegate: | 156 // ui::PlatformWindowDelegate: |
155 void OnBoundsChanged(const gfx::Rect& new_bounds) override; | 157 void OnBoundsChanged(const gfx::Rect& new_bounds) override; |
156 void OnDamageRect(const gfx::Rect& damaged_region) override; | 158 void OnDamageRect(const gfx::Rect& damaged_region) override; |
(...skipping 26 matching lines...) Expand all Loading... |
183 std::unique_ptr<ui::PlatformWindow> platform_window_; | 185 std::unique_ptr<ui::PlatformWindow> platform_window_; |
184 | 186 |
185 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); | 187 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); |
186 }; | 188 }; |
187 | 189 |
188 } // namespace ws | 190 } // namespace ws |
189 | 191 |
190 } // namespace ui | 192 } // namespace ui |
191 | 193 |
192 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 194 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
OLD | NEW |