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

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

Issue 6319001: Support window.opener after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add WasSwappedOut message for clean exit. Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 4051 matching lines...) Expand 10 before | Expand all | Expand 10 after
4062 // TODO(ojan): We should add a call to browser_shutdown::OnShutdownStarting 4062 // TODO(ojan): We should add a call to browser_shutdown::OnShutdownStarting
4063 // somewhere around here so that we have accurate measurements of shutdown 4063 // somewhere around here so that we have accurate measurements of shutdown
4064 // time. 4064 // time.
4065 // TODO(ojan): We can probably fire all the unload events in parallel and 4065 // TODO(ojan): We can probably fire all the unload events in parallel and
4066 // get a perf benefit from that in the cases where the tab hangs in it's 4066 // get a perf benefit from that in the cases where the tab hangs in it's
4067 // unload handler or takes a long time to page in. 4067 // unload handler or takes a long time to page in.
4068 TabContents* tab = *(tabs_needing_unload_fired_.begin()); 4068 TabContents* tab = *(tabs_needing_unload_fired_.begin());
4069 // Null check render_view_host here as this gets called on a PostTask and 4069 // Null check render_view_host here as this gets called on a PostTask and
4070 // the tab's render_view_host may have been nulled out. 4070 // the tab's render_view_host may have been nulled out.
4071 if (tab->render_view_host()) { 4071 if (tab->render_view_host()) {
4072 tab->render_view_host()->ClosePage(false, -1, -1); 4072 tab->render_view_host()->ClosePage();
4073 } else { 4073 } else {
4074 ClearUnloadState(tab, true); 4074 ClearUnloadState(tab, true);
4075 } 4075 }
4076 } else { 4076 } else {
4077 NOTREACHED(); 4077 NOTREACHED();
4078 } 4078 }
4079 } 4079 }
4080 4080
4081 bool Browser::HasCompletedUnloadProcessing() const { 4081 bool Browser::HasCompletedUnloadProcessing() const {
4082 return is_attempting_to_close_browser_ && 4082 return is_attempting_to_close_browser_ &&
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
4477 TabContents* current_tab = GetSelectedTabContents(); 4477 TabContents* current_tab = GetSelectedTabContents();
4478 if (current_tab) { 4478 if (current_tab) {
4479 content_restrictions = current_tab->content_restrictions(); 4479 content_restrictions = current_tab->content_restrictions();
4480 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4480 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4481 // See comment in UpdateCommandsForTabState about why we call url(). 4481 // See comment in UpdateCommandsForTabState about why we call url().
4482 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4482 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4483 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4483 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4484 } 4484 }
4485 return content_restrictions; 4485 return content_restrictions;
4486 } 4486 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698