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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 if (legacy_render_widget_host_HWND_) | 761 if (legacy_render_widget_host_HWND_) |
762 legacy_render_widget_host_HWND_->Hide(); | 762 legacy_render_widget_host_HWND_->Hide(); |
763 #endif | 763 #endif |
764 } | 764 } |
765 | 765 |
766 bool RenderWidgetHostViewAura::IsShowing() { | 766 bool RenderWidgetHostViewAura::IsShowing() { |
767 return window_->IsVisible(); | 767 return window_->IsVisible(); |
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 return window_->GetBoundsInScreen(); |
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. | |
774 gfx::Rect bounds(window_->GetBoundsInScreen()); | |
775 return delegated_frame_host_->GetViewBoundsWithResizeLock(bounds); | |
776 } | 772 } |
777 | 773 |
778 void RenderWidgetHostViewAura::SetBackgroundOpaque(bool opaque) { | 774 void RenderWidgetHostViewAura::SetBackgroundOpaque(bool opaque) { |
779 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); | 775 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); |
780 host_->SetBackgroundOpaque(opaque); | 776 host_->SetBackgroundOpaque(opaque); |
781 window_->layer()->SetFillsBoundsOpaquely(opaque); | 777 window_->layer()->SetFillsBoundsOpaquely(opaque); |
782 } | 778 } |
783 | 779 |
784 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const { | 780 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const { |
785 gfx::Rect window_bounds = window_->bounds(); | 781 gfx::Rect window_bounds = window_->bounds(); |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2382 | 2378 |
2383 //////////////////////////////////////////////////////////////////////////////// | 2379 //////////////////////////////////////////////////////////////////////////////// |
2384 // RenderWidgetHostViewBase, public: | 2380 // RenderWidgetHostViewBase, public: |
2385 | 2381 |
2386 // static | 2382 // static |
2387 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2383 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2388 GetScreenInfoForWindow(results, NULL); | 2384 GetScreenInfoForWindow(results, NULL); |
2389 } | 2385 } |
2390 | 2386 |
2391 } // namespace content | 2387 } // namespace content |
OLD | NEW |