| 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 #include "services/ui/ws/platform_display.h" | 5 #include "services/ui/ws/platform_display.h" |
| 6 | 6 |
| 7 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "cc/ipc/quads.mojom.h" | 9 #include "cc/ipc/quads.mojom.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 ui::Cursor cursor(cursor_id); | 135 ui::Cursor cursor(cursor_id); |
| 136 cursor_loader_->SetPlatformCursor(&cursor); | 136 cursor_loader_->SetPlatformCursor(&cursor); |
| 137 platform_window_->SetCursor(cursor.platform()); | 137 platform_window_->SetCursor(cursor.platform()); |
| 138 #endif | 138 #endif |
| 139 } | 139 } |
| 140 | 140 |
| 141 float DefaultPlatformDisplay::GetDeviceScaleFactor() { | 141 float DefaultPlatformDisplay::GetDeviceScaleFactor() { |
| 142 return metrics_.device_scale_factor; | 142 return metrics_.device_scale_factor; |
| 143 } | 143 } |
| 144 | 144 |
| 145 mojom::Rotation DefaultPlatformDisplay::GetRotation() { | 145 ::display::Display::Rotation DefaultPlatformDisplay::GetRotation() { |
| 146 // TODO(sky): implement me. | 146 // TODO(sky): implement me. |
| 147 return mojom::Rotation::VALUE_0; | 147 return display::Display::ROTATE_0; |
| 148 } | 148 } |
| 149 | 149 |
| 150 void DefaultPlatformDisplay::UpdateTextInputState( | 150 void DefaultPlatformDisplay::UpdateTextInputState( |
| 151 const ui::TextInputState& state) { | 151 const ui::TextInputState& state) { |
| 152 ui::PlatformImeController* ime = platform_window_->GetPlatformImeController(); | 152 ui::PlatformImeController* ime = platform_window_->GetPlatformImeController(); |
| 153 if (ime) | 153 if (ime) |
| 154 ime->UpdateTextInputState(state); | 154 ime->UpdateTextInputState(state); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void DefaultPlatformDisplay::SetImeVisibility(bool visible) { | 157 void DefaultPlatformDisplay::SetImeVisibility(bool visible) { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 return delegate_ ? delegate_->IsInHighContrastMode() : false; | 275 return delegate_ ? delegate_->IsInHighContrastMode() : false; |
| 276 } | 276 } |
| 277 | 277 |
| 278 const ViewportMetrics& DefaultPlatformDisplay::GetViewportMetrics() { | 278 const ViewportMetrics& DefaultPlatformDisplay::GetViewportMetrics() { |
| 279 return metrics_; | 279 return metrics_; |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace ws | 282 } // namespace ws |
| 283 | 283 |
| 284 } // namespace ui | 284 } // namespace ui |
| OLD | NEW |