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

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

Issue 2512593003: Cleanup display creation in mus tests. (Closed)
Patch Set: Make const. Created 4 years, 1 month 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_default.h ('k') | services/ui/ws/platform_display_factory.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 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 #include "services/ui/ws/platform_display_default.h" 5 #include "services/ui/ws/platform_display_default.h"
6 6
7 #include "gpu/ipc/client/gpu_channel_host.h" 7 #include "gpu/ipc/client/gpu_channel_host.h"
8 #include "services/ui/display/platform_screen.h" 8 #include "services/ui/display/platform_screen.h"
9 #include "services/ui/ws/platform_display_init_params.h" 9 #include "services/ui/ws/platform_display_init_params.h"
10 #include "services/ui/ws/server_window.h" 10 #include "services/ui/ws/server_window.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void PlatformDisplayDefault::SetImeVisibility(bool visible) { 118 void PlatformDisplayDefault::SetImeVisibility(bool visible) {
119 ui::PlatformImeController* ime = platform_window_->GetPlatformImeController(); 119 ui::PlatformImeController* ime = platform_window_->GetPlatformImeController();
120 if (ime) 120 if (ime)
121 ime->SetImeVisibility(visible); 121 ime->SetImeVisibility(visible);
122 } 122 }
123 123
124 gfx::Rect PlatformDisplayDefault::GetBounds() const { 124 gfx::Rect PlatformDisplayDefault::GetBounds() const {
125 return metrics_.bounds; 125 return metrics_.bounds;
126 } 126 }
127 127
128 bool PlatformDisplayDefault::IsPrimaryDisplay() const {
129 return display::PlatformScreen::GetInstance()->GetPrimaryDisplayId() ==
130 display_id_;
131 }
132
133 void PlatformDisplayDefault::OnGpuChannelEstablished( 128 void PlatformDisplayDefault::OnGpuChannelEstablished(
134 scoped_refptr<gpu::GpuChannelHost> channel) { 129 scoped_refptr<gpu::GpuChannelHost> channel) {
135 frame_generator_->OnGpuChannelEstablished(channel); 130 frame_generator_->OnGpuChannelEstablished(channel);
136 } 131 }
137 132
138 bool PlatformDisplayDefault::UpdateViewportMetrics( 133 bool PlatformDisplayDefault::UpdateViewportMetrics(
139 const display::ViewportMetrics& metrics) { 134 const display::ViewportMetrics& metrics) {
140 if (metrics_ == metrics) 135 if (metrics_ == metrics)
141 return false; 136 return false;
142 137
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 240 }
246 241
247 void PlatformDisplayDefault::OnActivationChanged(bool active) {} 242 void PlatformDisplayDefault::OnActivationChanged(bool active) {}
248 243
249 bool PlatformDisplayDefault::IsInHighContrastMode() { 244 bool PlatformDisplayDefault::IsInHighContrastMode() {
250 return delegate_ ? delegate_->IsInHighContrastMode() : false; 245 return delegate_ ? delegate_->IsInHighContrastMode() : false;
251 } 246 }
252 247
253 } // namespace ws 248 } // namespace ws
254 } // namespace ui 249 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/platform_display_default.h ('k') | services/ui/ws/platform_display_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698