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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 host_->LostCapture(); | 1678 host_->LostCapture(); |
1679 if (touch_editing_client_) | 1679 if (touch_editing_client_) |
1680 touch_editing_client_->EndTouchEditing(false); | 1680 touch_editing_client_->EndTouchEditing(false); |
1681 } | 1681 } |
1682 | 1682 |
1683 void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { | 1683 void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { |
1684 // For non-opaque windows, we don't draw anything, since we depend on the | 1684 // For non-opaque windows, we don't draw anything, since we depend on the |
1685 // canvas coming from the compositor to already be initialized as | 1685 // canvas coming from the compositor to already be initialized as |
1686 // transparent. | 1686 // transparent. |
1687 if (window_->layer()->fills_bounds_opaquely()) | 1687 if (window_->layer()->fills_bounds_opaquely()) |
1688 canvas->DrawColor(SK_ColorWHITE); | 1688 canvas->DrawColor(background_color_); |
1689 } | 1689 } |
1690 | 1690 |
1691 void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( | 1691 void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( |
1692 float device_scale_factor) { | 1692 float device_scale_factor) { |
1693 if (!host_ || !window_->GetRootWindow()) | 1693 if (!host_ || !window_->GetRootWindow()) |
1694 return; | 1694 return; |
1695 | 1695 |
1696 UpdateScreenInfo(window_); | 1696 UpdateScreenInfo(window_); |
1697 | 1697 |
1698 const gfx::Display display = gfx::Screen::GetScreenFor(window_)-> | 1698 const gfx::Display display = gfx::Screen::GetScreenFor(window_)-> |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2576 | 2576 |
2577 //////////////////////////////////////////////////////////////////////////////// | 2577 //////////////////////////////////////////////////////////////////////////////// |
2578 // RenderWidgetHostViewBase, public: | 2578 // RenderWidgetHostViewBase, public: |
2579 | 2579 |
2580 // static | 2580 // static |
2581 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2581 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2582 GetScreenInfoForWindow(results, NULL); | 2582 GetScreenInfoForWindow(results, NULL); |
2583 } | 2583 } |
2584 | 2584 |
2585 } // namespace content | 2585 } // namespace content |
OLD | NEW |