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

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

Issue 2489003002: Convert mustash use surface references. (Closed)
Patch Set: 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 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 bool DefaultPlatformDisplay::IsPrimaryDisplay() const { 150 bool DefaultPlatformDisplay::IsPrimaryDisplay() const {
151 return display::PlatformScreen::GetInstance()->GetPrimaryDisplayId() == id_; 151 return display::PlatformScreen::GetInstance()->GetPrimaryDisplayId() == id_;
152 } 152 }
153 153
154 void DefaultPlatformDisplay::OnGpuChannelEstablished( 154 void DefaultPlatformDisplay::OnGpuChannelEstablished(
155 scoped_refptr<gpu::GpuChannelHost> channel) { 155 scoped_refptr<gpu::GpuChannelHost> channel) {
156 frame_generator_->OnGpuChannelEstablished(channel); 156 frame_generator_->OnGpuChannelEstablished(channel);
157 } 157 }
158 158
159 FrameGenerator* DefaultPlatformDisplay::GetFrameGenerator() {
160 return frame_generator_.get();
161 }
162
159 bool DefaultPlatformDisplay::UpdateViewportMetrics( 163 bool DefaultPlatformDisplay::UpdateViewportMetrics(
160 const display::ViewportMetrics& metrics) { 164 const display::ViewportMetrics& metrics) {
161 if (metrics_ == metrics) 165 if (metrics_ == metrics)
162 return false; 166 return false;
163 167
164 gfx::Rect bounds = platform_window_->GetBounds(); 168 gfx::Rect bounds = platform_window_->GetBounds();
165 if (bounds.size() != metrics.pixel_size) { 169 if (bounds.size() != metrics.pixel_size) {
166 bounds.set_size(metrics.pixel_size); 170 bounds.set_size(metrics.pixel_size);
167 platform_window_->SetBounds(bounds); 171 platform_window_->SetBounds(bounds);
168 } 172 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 268
265 void DefaultPlatformDisplay::OnActivationChanged(bool active) {} 269 void DefaultPlatformDisplay::OnActivationChanged(bool active) {}
266 270
267 bool DefaultPlatformDisplay::IsInHighContrastMode() { 271 bool DefaultPlatformDisplay::IsInHighContrastMode() {
268 return delegate_ ? delegate_->IsInHighContrastMode() : false; 272 return delegate_ ? delegate_->IsInHighContrastMode() : false;
269 } 273 }
270 274
271 } // namespace ws 275 } // namespace ws
272 276
273 } // namespace ui 277 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698