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

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

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: fixes Created 4 years, 11 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 void RenderWidgetHostViewBase::SetBackgroundColorToDefault() { 394 void RenderWidgetHostViewBase::SetBackgroundColorToDefault() {
395 SetBackgroundColor(SK_ColorWHITE); 395 SetBackgroundColor(SK_ColorWHITE);
396 } 396 }
397 397
398 bool RenderWidgetHostViewBase::GetBackgroundOpaque() { 398 bool RenderWidgetHostViewBase::GetBackgroundOpaque() {
399 return SkColorGetA(background_color_) == SK_AlphaOPAQUE; 399 return SkColorGetA(background_color_) == SK_AlphaOPAQUE;
400 } 400 }
401 401
402 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const { 402 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const {
403 gfx::NativeView view = GetNativeView();
404 gfx::Display display = 403 gfx::Display display =
405 gfx::Screen::GetScreenFor(view)->GetDisplayNearestWindow(view); 404 gfx::Screen::GetScreen()->GetDisplayNearestWindow(GetNativeView());
406 return gfx::ScaleToCeiledSize(GetRequestedRendererSize(), 405 return gfx::ScaleToCeiledSize(GetRequestedRendererSize(),
407 display.device_scale_factor()); 406 display.device_scale_factor());
408 } 407 }
409 408
410 bool RenderWidgetHostViewBase::DoTopControlsShrinkBlinkSize() const { 409 bool RenderWidgetHostViewBase::DoTopControlsShrinkBlinkSize() const {
411 return false; 410 return false;
412 } 411 }
413 412
414 float RenderWidgetHostViewBase::GetTopControlsHeight() const { 413 float RenderWidgetHostViewBase::GetTopControlsHeight() const {
415 return 0.f; 414 return 0.f;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 526
528 if (impl) 527 if (impl)
529 impl->SendScreenRects(); 528 impl->SendScreenRects();
530 529
531 if (HasDisplayPropertyChanged(view) && impl) 530 if (HasDisplayPropertyChanged(view) && impl)
532 impl->NotifyScreenInfoChanged(); 531 impl->NotifyScreenInfoChanged();
533 } 532 }
534 533
535 bool RenderWidgetHostViewBase::HasDisplayPropertyChanged(gfx::NativeView view) { 534 bool RenderWidgetHostViewBase::HasDisplayPropertyChanged(gfx::NativeView view) {
536 gfx::Display display = 535 gfx::Display display =
537 gfx::Screen::GetScreenFor(view)->GetDisplayNearestWindow(view); 536 gfx::Screen::GetScreen()->GetDisplayNearestWindow(view);
538 if (current_display_area_ == display.work_area() && 537 if (current_display_area_ == display.work_area() &&
539 current_device_scale_factor_ == display.device_scale_factor() && 538 current_device_scale_factor_ == display.device_scale_factor() &&
540 current_display_rotation_ == display.rotation()) { 539 current_display_rotation_ == display.rotation()) {
541 return false; 540 return false;
542 } 541 }
543 542
544 current_display_area_ = display.work_area(); 543 current_display_area_ = display.work_area();
545 current_device_scale_factor_ = display.device_scale_factor(); 544 current_device_scale_factor_ = display.device_scale_factor();
546 current_display_rotation_ = display.rotation(); 545 current_display_rotation_ = display.rotation();
547 return true; 546 return true;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 688 }
690 689
691 void RenderWidgetHostViewBase::TransformPointToLocalCoordSpace( 690 void RenderWidgetHostViewBase::TransformPointToLocalCoordSpace(
692 const gfx::Point& point, 691 const gfx::Point& point,
693 cc::SurfaceId original_surface, 692 cc::SurfaceId original_surface,
694 gfx::Point* transformed_point) { 693 gfx::Point* transformed_point) {
695 *transformed_point = point; 694 *transformed_point = point;
696 } 695 }
697 696
698 } // namespace content 697 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698