| 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 } | 768 } |
| 769 | 769 |
| 770 gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { | 770 gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { |
| 771 // This is the size that we want the renderer to produce. While we're waiting | 771 // This is the size that we want the renderer to produce. While we're waiting |
| 772 // for the correct frame (i.e. during a resize), don't change the size so that | 772 // for the correct frame (i.e. during a resize), don't change the size so that |
| 773 // we don't pipeline more resizes than we can handle. | 773 // we don't pipeline more resizes than we can handle. |
| 774 gfx::Rect bounds(window_->GetBoundsInScreen()); | 774 gfx::Rect bounds(window_->GetBoundsInScreen()); |
| 775 return delegated_frame_host_->GetViewBoundsWithResizeLock(bounds); | 775 return delegated_frame_host_->GetViewBoundsWithResizeLock(bounds); |
| 776 } | 776 } |
| 777 | 777 |
| 778 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { | 778 void RenderWidgetHostViewAura::SetBackgroundOpaque(bool opaque) { |
| 779 RenderWidgetHostViewBase::SetBackground(background); | 779 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); |
| 780 host_->SetBackground(background); | 780 host_->SetBackgroundOpaque(opaque); |
| 781 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); | 781 window_->layer()->SetFillsBoundsOpaquely(opaque); |
| 782 } | 782 } |
| 783 | 783 |
| 784 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const { | 784 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const { |
| 785 gfx::Rect window_bounds = window_->bounds(); | 785 gfx::Rect window_bounds = window_->bounds(); |
| 786 int viewport_width = std::max( | 786 int viewport_width = std::max( |
| 787 0, window_bounds.width() - insets_.left() - insets_.right()); | 787 0, window_bounds.width() - insets_.left() - insets_.right()); |
| 788 int viewport_height = std::max( | 788 int viewport_height = std::max( |
| 789 0, window_bounds.height() - insets_.top() - insets_.bottom()); | 789 0, window_bounds.height() - insets_.top() - insets_.bottom()); |
| 790 return gfx::Size(viewport_width, viewport_height); | 790 return gfx::Size(viewport_width, viewport_height); |
| 791 } | 791 } |
| (...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2382 | 2382 |
| 2383 //////////////////////////////////////////////////////////////////////////////// | 2383 //////////////////////////////////////////////////////////////////////////////// |
| 2384 // RenderWidgetHostViewBase, public: | 2384 // RenderWidgetHostViewBase, public: |
| 2385 | 2385 |
| 2386 // static | 2386 // static |
| 2387 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2387 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2388 GetScreenInfoForWindow(results, NULL); | 2388 GetScreenInfoForWindow(results, NULL); |
| 2389 } | 2389 } |
| 2390 | 2390 |
| 2391 } // namespace content | 2391 } // namespace content |
| OLD | NEW |