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

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

Issue 2489003002: Convert mustash use surface references. (Closed)
Patch Set: Fixes for fsamuel. 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
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 { 128 bool PlatformDisplayDefault::IsPrimaryDisplay() const {
129 return display::PlatformScreen::GetInstance()->GetPrimaryDisplayId() == 129 return display::PlatformScreen::GetInstance()->GetPrimaryDisplayId() ==
130 display_id_; 130 display_id_;
131 } 131 }
132 132
133 FrameGenerator* PlatformDisplayDefault::GetFrameGenerator() {
134 return frame_generator_.get();
135 }
136
133 void PlatformDisplayDefault::OnGpuChannelEstablished( 137 void PlatformDisplayDefault::OnGpuChannelEstablished(
134 scoped_refptr<gpu::GpuChannelHost> channel) { 138 scoped_refptr<gpu::GpuChannelHost> channel) {
135 frame_generator_->OnGpuChannelEstablished(channel); 139 frame_generator_->OnGpuChannelEstablished(channel);
136 } 140 }
137 141
138 bool PlatformDisplayDefault::UpdateViewportMetrics( 142 bool PlatformDisplayDefault::UpdateViewportMetrics(
139 const display::ViewportMetrics& metrics) { 143 const display::ViewportMetrics& metrics) {
140 if (metrics_ == metrics) 144 if (metrics_ == metrics)
141 return false; 145 return false;
142 146
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 249 }
246 250
247 void PlatformDisplayDefault::OnActivationChanged(bool active) {} 251 void PlatformDisplayDefault::OnActivationChanged(bool active) {}
248 252
249 bool PlatformDisplayDefault::IsInHighContrastMode() { 253 bool PlatformDisplayDefault::IsInHighContrastMode() {
250 return delegate_ ? delegate_->IsInHighContrastMode() : false; 254 return delegate_ ? delegate_->IsInHighContrastMode() : false;
251 } 255 }
252 256
253 } // namespace ws 257 } // namespace ws
254 } // namespace ui 258 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698