| OLD | NEW |
| 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 "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 9 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.
h" | 9 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.
h" |
| 10 #include "content/browser/renderer_host/render_process_host_impl.h" | 10 #include "content/browser/renderer_host/render_process_host_impl.h" |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 if (impl) | 451 if (impl) |
| 452 impl->SendScreenRects(); | 452 impl->SendScreenRects(); |
| 453 | 453 |
| 454 gfx::Display display = | 454 gfx::Display display = |
| 455 gfx::Screen::GetScreenFor(view)->GetDisplayNearestWindow(view); | 455 gfx::Screen::GetScreenFor(view)->GetDisplayNearestWindow(view); |
| 456 if (current_display_area_ == display.work_area() && | 456 if (current_display_area_ == display.work_area() && |
| 457 current_device_scale_factor_ == display.device_scale_factor()) { | 457 current_device_scale_factor_ == display.device_scale_factor()) { |
| 458 return; | 458 return; |
| 459 } | 459 } |
| 460 bool device_scale_factor_changed = | |
| 461 current_device_scale_factor_ != display.device_scale_factor(); | |
| 462 current_display_area_ = display.work_area(); | 460 current_display_area_ = display.work_area(); |
| 463 current_device_scale_factor_ = display.device_scale_factor(); | 461 current_device_scale_factor_ = display.device_scale_factor(); |
| 464 if (impl) { | 462 if (impl) |
| 465 impl->NotifyScreenInfoChanged(); | 463 impl->NotifyScreenInfoChanged(); |
| 466 if (device_scale_factor_changed) | |
| 467 impl->WasResized(); | |
| 468 } | |
| 469 } | 464 } |
| 470 | 465 |
| 471 SmoothScrollGesture* RenderWidgetHostViewBase::CreateSmoothScrollGesture( | 466 SmoothScrollGesture* RenderWidgetHostViewBase::CreateSmoothScrollGesture( |
| 472 bool scroll_down, int pixels_to_scroll, int mouse_event_x, | 467 bool scroll_down, int pixels_to_scroll, int mouse_event_x, |
| 473 int mouse_event_y) { | 468 int mouse_event_y) { |
| 474 return new BasicMouseWheelSmoothScrollGesture(scroll_down, pixels_to_scroll, | 469 return new BasicMouseWheelSmoothScrollGesture(scroll_down, pixels_to_scroll, |
| 475 mouse_event_x, mouse_event_y); | 470 mouse_event_x, mouse_event_y); |
| 476 } | 471 } |
| 477 | 472 |
| 478 void RenderWidgetHostViewBase::ProcessAckedTouchEvent( | 473 void RenderWidgetHostViewBase::ProcessAckedTouchEvent( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 static_cast<RenderProcessHostImpl*>(impl->GetProcess()); | 509 static_cast<RenderProcessHostImpl*>(impl->GetProcess()); |
| 515 render_process_host->EndFrameSubscription(impl->GetRoutingID()); | 510 render_process_host->EndFrameSubscription(impl->GetRoutingID()); |
| 516 } | 511 } |
| 517 | 512 |
| 518 void RenderWidgetHostViewBase::OnOverscrolled( | 513 void RenderWidgetHostViewBase::OnOverscrolled( |
| 519 gfx::Vector2dF accumulated_overscroll, | 514 gfx::Vector2dF accumulated_overscroll, |
| 520 gfx::Vector2dF current_fling_velocity) { | 515 gfx::Vector2dF current_fling_velocity) { |
| 521 } | 516 } |
| 522 | 517 |
| 523 } // namespace content | 518 } // namespace content |
| OLD | NEW |