| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 } | 752 } |
| 753 | 753 |
| 754 void RenderWidgetHostViewAura::SetBackgroundColor(SkColor color) { | 754 void RenderWidgetHostViewAura::SetBackgroundColor(SkColor color) { |
| 755 if (color == background_color()) | 755 if (color == background_color()) |
| 756 return; | 756 return; |
| 757 RenderWidgetHostViewBase::SetBackgroundColor(color); | 757 RenderWidgetHostViewBase::SetBackgroundColor(color); |
| 758 bool opaque = GetBackgroundOpaque(); | 758 bool opaque = GetBackgroundOpaque(); |
| 759 host_->SetBackgroundOpaque(opaque); | 759 host_->SetBackgroundOpaque(opaque); |
| 760 window_->layer()->SetFillsBoundsOpaquely(opaque); | 760 window_->layer()->SetFillsBoundsOpaquely(opaque); |
| 761 window_->layer()->SetColor(color); | 761 window_->layer()->SetColor(color); |
| 762 if (opaque && color != SK_ColorWHITE) |
| 763 host_->SetBaseBackgroundColor(color); |
| 762 } | 764 } |
| 763 | 765 |
| 764 bool RenderWidgetHostViewAura::IsMouseLocked() { | 766 bool RenderWidgetHostViewAura::IsMouseLocked() { |
| 765 return event_handler_->mouse_locked(); | 767 return event_handler_->mouse_locked(); |
| 766 } | 768 } |
| 767 | 769 |
| 768 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const { | 770 gfx::Size RenderWidgetHostViewAura::GetVisibleViewportSize() const { |
| 769 gfx::Rect requested_rect(GetRequestedRendererSize()); | 771 gfx::Rect requested_rect(GetRequestedRendererSize()); |
| 770 requested_rect.Inset(insets_); | 772 requested_rect.Inset(insets_); |
| 771 return requested_rect.size(); | 773 return requested_rect.size(); |
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2369 | 2371 |
| 2370 void RenderWidgetHostViewAura::SetPopupChild( | 2372 void RenderWidgetHostViewAura::SetPopupChild( |
| 2371 RenderWidgetHostViewAura* popup_child_host_view) { | 2373 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2372 popup_child_host_view_ = popup_child_host_view; | 2374 popup_child_host_view_ = popup_child_host_view; |
| 2373 event_handler_->SetPopupChild( | 2375 event_handler_->SetPopupChild( |
| 2374 popup_child_host_view, | 2376 popup_child_host_view, |
| 2375 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2377 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2376 } | 2378 } |
| 2377 | 2379 |
| 2378 } // namespace content | 2380 } // namespace content |
| OLD | NEW |