Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Side by Side Diff: services/ui/ws/platform_display.cc

Issue 2161993002: Start using display.mojom.Display in mus+ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@display_traits
Patch Set: Fixes. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/platform_display.h ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « services/ui/ws/platform_display.h ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698