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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view.cc

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm Created 8 years, 5 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 "chrome/browser/ui/browser_dialogs.h" 5 #include "chrome/browser/ui/browser_dialogs.h"
6 6
7 #if defined(OS_WIN) && !defined(USE_AURA) 7 #if defined(OS_WIN) && !defined(USE_AURA)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return tab_observers_.empty() ? NULL : 147 return tab_observers_.empty() ? NULL :
148 tab_observers_[0]->web_contents()->GetRenderProcessHost(); 148 tab_observers_[0]->web_contents()->GetRenderProcessHost();
149 } 149 }
150 150
151 RenderViewHost* HungPagesTableModel::GetRenderViewHost() { 151 RenderViewHost* HungPagesTableModel::GetRenderViewHost() {
152 return tab_observers_.empty() ? NULL : 152 return tab_observers_.empty() ? NULL :
153 tab_observers_[0]->web_contents()->GetRenderViewHost(); 153 tab_observers_[0]->web_contents()->GetRenderViewHost();
154 } 154 }
155 155
156 void HungPagesTableModel::InitForWebContents(WebContents* hung_contents) { 156 void HungPagesTableModel::InitForWebContents(WebContents* hung_contents) {
157 tab_observers_.reset(); 157 tab_observers_.clear();
158 if (hung_contents) { 158 if (hung_contents) {
159 // Force hung_contents to be first. 159 // Force hung_contents to be first.
160 TabContents* hung_tab_contents = 160 TabContents* hung_tab_contents =
161 TabContents::FromWebContents(hung_contents); 161 TabContents::FromWebContents(hung_contents);
162 if (hung_tab_contents) { 162 if (hung_tab_contents) {
163 tab_observers_.push_back(new WebContentsObserverImpl(this, 163 tab_observers_.push_back(new WebContentsObserverImpl(this,
164 hung_tab_contents)); 164 hung_tab_contents));
165 } 165 }
166 for (TabContentsIterator it; !it.done(); ++it) { 166 for (TabContentsIterator it; !it.done(); ++it) {
167 if (*it != hung_tab_contents && 167 if (*it != hung_tab_contents &&
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 g_instance->ShowForWebContents(contents); 589 g_instance->ShowForWebContents(contents);
590 } 590 }
591 } 591 }
592 592
593 void HideHungRendererDialog(WebContents* contents) { 593 void HideHungRendererDialog(WebContents* contents) {
594 if (!logging::DialogsAreSuppressed() && g_instance) 594 if (!logging::DialogsAreSuppressed() && g_instance)
595 g_instance->EndForWebContents(contents); 595 g_instance->EndForWebContents(contents);
596 } 596 }
597 597
598 } // namespace chrome 598 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/webui/options2/password_manager_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698