| 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/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 return; | 731 return; |
| 732 | 732 |
| 733 window_observer_.reset(); | 733 window_observer_.reset(); |
| 734 window_->RemoveObserver(this); | 734 window_->RemoveObserver(this); |
| 735 | 735 |
| 736 // Window needs a valid delegate during its destructor, so we explicitly | 736 // Window needs a valid delegate during its destructor, so we explicitly |
| 737 // delete it here. | 737 // delete it here. |
| 738 window_.reset(); | 738 window_.reset(); |
| 739 } | 739 } |
| 740 | 740 |
| 741 void WebContentsViewAura::SetupOverlayWindowForTesting() { | |
| 742 if (navigation_overlay_) | |
| 743 navigation_overlay_->SetupForTesting(); | |
| 744 } | |
| 745 | |
| 746 void WebContentsViewAura::SetTouchEditableForTest( | 741 void WebContentsViewAura::SetTouchEditableForTest( |
| 747 TouchEditableImplAura* touch_editable) { | 742 TouchEditableImplAura* touch_editable) { |
| 748 touch_editable_.reset(touch_editable); | 743 touch_editable_.reset(touch_editable); |
| 749 AttachTouchEditableToRenderView(); | 744 AttachTouchEditableToRenderView(); |
| 750 } | 745 } |
| 751 | 746 |
| 752 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { | 747 void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { |
| 753 if (web_contents_->GetInterstitialPage()) | 748 if (web_contents_->GetInterstitialPage()) |
| 754 web_contents_->GetInterstitialPage()->SetSize(size); | 749 web_contents_->GetInterstitialPage()->SetSize(size); |
| 755 RenderWidgetHostView* rwhv = | 750 RenderWidgetHostView* rwhv = |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, | 1571 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, |
| 1577 bool visible) { | 1572 bool visible) { |
| 1578 // Ignore any visibility changes in the hierarchy below. | 1573 // Ignore any visibility changes in the hierarchy below. |
| 1579 if (window != window_.get() && window_->Contains(window)) | 1574 if (window != window_.get() && window_->Contains(window)) |
| 1580 return; | 1575 return; |
| 1581 | 1576 |
| 1582 UpdateWebContentsVisibility(web_contents_, visible); | 1577 UpdateWebContentsVisibility(web_contents_, visible); |
| 1583 } | 1578 } |
| 1584 | 1579 |
| 1585 } // namespace content | 1580 } // namespace content |
| OLD | NEW |