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

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

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

Powered by Google App Engine
This is Rietveld 408576698