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

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

Issue 274453002: Remove RenderWidget::SetBackground, change IPC to pass a bool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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_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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 } 764 }
765 765
766 gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { 766 gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
767 // This is the size that we want the renderer to produce. While we're waiting 767 // This is the size that we want the renderer to produce. While we're waiting
768 // for the correct frame (i.e. during a resize), don't change the size so that 768 // for the correct frame (i.e. during a resize), don't change the size so that
769 // we don't pipeline more resizes than we can handle. 769 // we don't pipeline more resizes than we can handle.
770 gfx::Rect bounds(window_->GetBoundsInScreen()); 770 gfx::Rect bounds(window_->GetBoundsInScreen());
771 return delegated_frame_host_->GetViewBoundsWithResizeLock(bounds); 771 return delegated_frame_host_->GetViewBoundsWithResizeLock(bounds);
772 } 772 }
773 773
774 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { 774 void RenderWidgetHostViewAura::SetBackgroundOpaque(bool opaque) {
775 RenderWidgetHostViewBase::SetBackground(background); 775 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque);
776 host_->SetBackground(background); 776 host_->SetBackgroundOpaque(opaque);
777 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); 777 window_->layer()->SetFillsBoundsOpaquely(opaque);
778 } 778 }
779 779
780 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const { 780 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const {
781 gfx::Rect window_bounds = window_->bounds(); 781 gfx::Rect window_bounds = window_->bounds();
782 int viewport_width = std::max( 782 int viewport_width = std::max(
783 0, window_bounds.width() - insets_.left() - insets_.right()); 783 0, window_bounds.width() - insets_.left() - insets_.right());
784 int viewport_height = std::max( 784 int viewport_height = std::max(
785 0, window_bounds.height() - insets_.top() - insets_.bottom()); 785 0, window_bounds.height() - insets_.top() - insets_.bottom());
786 return gfx::Size(viewport_width, viewport_height); 786 return gfx::Size(viewport_width, viewport_height);
787 } 787 }
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 2378
2379 //////////////////////////////////////////////////////////////////////////////// 2379 ////////////////////////////////////////////////////////////////////////////////
2380 // RenderWidgetHostViewBase, public: 2380 // RenderWidgetHostViewBase, public:
2381 2381
2382 // static 2382 // static
2383 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2383 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2384 GetScreenInfoForWindow(results, NULL); 2384 GetScreenInfoForWindow(results, NULL);
2385 } 2385 }
2386 2386
2387 } // namespace content 2387 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698