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

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

Issue 11956034: Merge 175182 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/external_tab_container_win.h" 5 #include "chrome/browser/ui/views/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 set_delegate(this); 264 set_delegate(this);
265 return true; 265 return true;
266 } 266 }
267 267
268 void ExternalTabContainerWin::Uninitialize() { 268 void ExternalTabContainerWin::Uninitialize() {
269 registrar_.RemoveAll(); 269 registrar_.RemoveAll();
270 if (tab_contents_.get()) { 270 if (tab_contents_.get()) {
271 UnregisterRenderViewHost( 271 UnregisterRenderViewHost(
272 tab_contents_->web_contents()->GetRenderViewHost()); 272 tab_contents_->web_contents()->GetRenderViewHost());
273 273
274 // Explicitly tell the RPH to shutdown, as doing so is the only thing that
275 // cleans up certain resources like infobars (crbug.com/148398).
276 tab_contents_->web_contents()->
277 GetRenderProcessHost()->FastShutdownIfPossible();
278
274 if (GetWidget()->GetRootView()) 279 if (GetWidget()->GetRootView())
275 GetWidget()->GetRootView()->RemoveAllChildViews(true); 280 GetWidget()->GetRootView()->RemoveAllChildViews(true);
276 281
277 content::NotificationService::current()->Notify( 282 content::NotificationService::current()->Notify(
278 chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED, 283 chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
279 content::Source<NavigationController>( 284 content::Source<NavigationController>(
280 &tab_contents_->web_contents()->GetController()), 285 &tab_contents_->web_contents()->GetController()),
281 content::Details<ExternalTabContainer>(this)); 286 content::Details<ExternalTabContainer>(this));
282 287
283 tab_contents_.reset(NULL); 288 tab_contents_.reset(NULL);
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 if (params.disposition == CURRENT_TAB) { 1288 if (params.disposition == CURRENT_TAB) {
1284 DCHECK(route_all_top_level_navigations_); 1289 DCHECK(route_all_top_level_navigations_);
1285 forward_params.disposition = NEW_FOREGROUND_TAB; 1290 forward_params.disposition = NEW_FOREGROUND_TAB;
1286 } 1291 }
1287 WebContents* new_contents = 1292 WebContents* new_contents =
1288 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); 1293 ExternalTabContainerWin::OpenURLFromTab(source, forward_params);
1289 // support only one navigation for a dummy tab before it is killed. 1294 // support only one navigation for a dummy tab before it is killed.
1290 ::DestroyWindow(GetNativeView()); 1295 ::DestroyWindow(GetNativeView());
1291 return new_contents; 1296 return new_contents;
1292 } 1297 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698