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

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

Issue 647613002: Fix RenderWidgetHostViewGuest leak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add content_unittests Created 6 years, 2 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
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 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 // to the input method). 1737 // to the input method).
1738 ui::InputMethod* input_method = GetInputMethod(); 1738 ui::InputMethod* input_method = GetInputMethod();
1739 if (input_method) 1739 if (input_method)
1740 input_method->DetachTextInputClient(this); 1740 input_method->DetachTextInputClient(this);
1741 1741
1742 if (overscroll_controller_) 1742 if (overscroll_controller_)
1743 overscroll_controller_->Reset(); 1743 overscroll_controller_->Reset();
1744 } 1744 }
1745 1745
1746 void RenderWidgetHostViewAura::OnWindowDestroyed(aura::Window* window) { 1746 void RenderWidgetHostViewAura::OnWindowDestroyed(aura::Window* window) {
1747 host_->ViewDestroyed(); 1747 // Ask the RWH to drop reference to us.
sky 2014/10/13 17:04:13 This comment isn't helpful. It doesn't describe wh
lazyboy 2014/10/13 21:54:01 I've added comment explaining when GetView() != th
1748 if (host_->GetView() == this)
1749 host_->ViewDestroyed();
1750
1748 delete this; 1751 delete this;
1749 } 1752 }
1750 1753
1751 void RenderWidgetHostViewAura::OnWindowTargetVisibilityChanged(bool visible) { 1754 void RenderWidgetHostViewAura::OnWindowTargetVisibilityChanged(bool visible) {
1752 } 1755 }
1753 1756
1754 bool RenderWidgetHostViewAura::HasHitTestMask() const { 1757 bool RenderWidgetHostViewAura::HasHitTestMask() const {
1755 return false; 1758 return false;
1756 } 1759 }
1757 1760
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
2578 2581
2579 //////////////////////////////////////////////////////////////////////////////// 2582 ////////////////////////////////////////////////////////////////////////////////
2580 // RenderWidgetHostViewBase, public: 2583 // RenderWidgetHostViewBase, public:
2581 2584
2582 // static 2585 // static
2583 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2586 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2584 GetScreenInfoForWindow(results, NULL); 2587 GetScreenInfoForWindow(results, NULL);
2585 } 2588 }
2586 2589
2587 } // namespace content 2590 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/DEPS ('k') | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698