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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.cc

Issue 2959873002: color: Add NSScreenColorSpaceDidChangeNotification observer (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/accessibility/browser_accessibility_manager.h" 9 #include "content/browser/accessibility/browser_accessibility_manager.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 if (HasDisplayPropertyChanged(view) && impl) 245 if (HasDisplayPropertyChanged(view) && impl)
246 impl->NotifyScreenInfoChanged(); 246 impl->NotifyScreenInfoChanged();
247 } 247 }
248 248
249 bool RenderWidgetHostViewBase::HasDisplayPropertyChanged(gfx::NativeView view) { 249 bool RenderWidgetHostViewBase::HasDisplayPropertyChanged(gfx::NativeView view) {
250 display::Display display = 250 display::Display display =
251 display::Screen::GetScreen()->GetDisplayNearestView(view); 251 display::Screen::GetScreen()->GetDisplayNearestView(view);
252 if (current_display_area_ == display.work_area() && 252 if (current_display_area_ == display.work_area() &&
253 current_device_scale_factor_ == display.device_scale_factor() && 253 current_device_scale_factor_ == display.device_scale_factor() &&
254 current_display_rotation_ == display.rotation()) { 254 current_display_rotation_ == display.rotation() &&
255 current_display_color_space_ == display.color_space()) {
255 return false; 256 return false;
256 } 257 }
257 258
258 current_display_area_ = display.work_area(); 259 current_display_area_ = display.work_area();
259 current_device_scale_factor_ = display.device_scale_factor(); 260 current_device_scale_factor_ = display.device_scale_factor();
260 current_display_rotation_ = display.rotation(); 261 current_display_rotation_ = display.rotation();
262 current_display_color_space_ = display.color_space();
261 return true; 263 return true;
262 } 264 }
263 265
264 void RenderWidgetHostViewBase::DidUnregisterFromTextInputManager( 266 void RenderWidgetHostViewBase::DidUnregisterFromTextInputManager(
265 TextInputManager* text_input_manager) { 267 TextInputManager* text_input_manager) {
266 DCHECK(text_input_manager && text_input_manager_ == text_input_manager); 268 DCHECK(text_input_manager && text_input_manager_ == text_input_manager);
267 269
268 text_input_manager_ = nullptr; 270 text_input_manager_ = nullptr;
269 } 271 }
270 272
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 488
487 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { 489 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const {
488 return false; 490 return false;
489 } 491 }
490 492
491 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { 493 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const {
492 return cc::SurfaceId(); 494 return cc::SurfaceId();
493 } 495 }
494 496
495 } // namespace content 497 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698