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

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: Better message filtering approach. 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 4017 matching lines...) Expand 10 before | Expand all | Expand 10 after
4028 // TODO(ojan): We should add a call to browser_shutdown::OnShutdownStarting 4028 // TODO(ojan): We should add a call to browser_shutdown::OnShutdownStarting
4029 // somewhere around here so that we have accurate measurements of shutdown 4029 // somewhere around here so that we have accurate measurements of shutdown
4030 // time. 4030 // time.
4031 // TODO(ojan): We can probably fire all the unload events in parallel and 4031 // TODO(ojan): We can probably fire all the unload events in parallel and
4032 // get a perf benefit from that in the cases where the tab hangs in it's 4032 // get a perf benefit from that in the cases where the tab hangs in it's
4033 // unload handler or takes a long time to page in. 4033 // unload handler or takes a long time to page in.
4034 TabContents* tab = *(tabs_needing_unload_fired_.begin()); 4034 TabContents* tab = *(tabs_needing_unload_fired_.begin());
4035 // Null check render_view_host here as this gets called on a PostTask and 4035 // Null check render_view_host here as this gets called on a PostTask and
4036 // the tab's render_view_host may have been nulled out. 4036 // the tab's render_view_host may have been nulled out.
4037 if (tab->render_view_host()) { 4037 if (tab->render_view_host()) {
4038 tab->render_view_host()->ClosePage(false, -1, -1); 4038 tab->render_view_host()->ClosePage();
4039 } else { 4039 } else {
4040 ClearUnloadState(tab, true); 4040 ClearUnloadState(tab, true);
4041 } 4041 }
4042 } else { 4042 } else {
4043 NOTREACHED(); 4043 NOTREACHED();
4044 } 4044 }
4045 } 4045 }
4046 4046
4047 bool Browser::HasCompletedUnloadProcessing() const { 4047 bool Browser::HasCompletedUnloadProcessing() const {
4048 return is_attempting_to_close_browser_ && 4048 return is_attempting_to_close_browser_ &&
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
4442 TabContents* current_tab = GetSelectedTabContents(); 4442 TabContents* current_tab = GetSelectedTabContents();
4443 if (current_tab) { 4443 if (current_tab) {
4444 content_restrictions = current_tab->content_restrictions(); 4444 content_restrictions = current_tab->content_restrictions();
4445 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4445 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4446 // See comment in UpdateCommandsForTabState about why we call url(). 4446 // See comment in UpdateCommandsForTabState about why we call url().
4447 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4447 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4448 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4448 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4449 } 4449 }
4450 return content_restrictions; 4450 return content_restrictions;
4451 } 4451 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698