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

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: Update comments. Created 9 years, 8 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 4038 matching lines...) Expand 10 before | Expand all | Expand 10 after
4049 // TODO(ojan): We should add a call to browser_shutdown::OnShutdownStarting 4049 // TODO(ojan): We should add a call to browser_shutdown::OnShutdownStarting
4050 // somewhere around here so that we have accurate measurements of shutdown 4050 // somewhere around here so that we have accurate measurements of shutdown
4051 // time. 4051 // time.
4052 // TODO(ojan): We can probably fire all the unload events in parallel and 4052 // TODO(ojan): We can probably fire all the unload events in parallel and
4053 // get a perf benefit from that in the cases where the tab hangs in it's 4053 // get a perf benefit from that in the cases where the tab hangs in it's
4054 // unload handler or takes a long time to page in. 4054 // unload handler or takes a long time to page in.
4055 TabContents* tab = *(tabs_needing_unload_fired_.begin()); 4055 TabContents* tab = *(tabs_needing_unload_fired_.begin());
4056 // Null check render_view_host here as this gets called on a PostTask and 4056 // Null check render_view_host here as this gets called on a PostTask and
4057 // the tab's render_view_host may have been nulled out. 4057 // the tab's render_view_host may have been nulled out.
4058 if (tab->render_view_host()) { 4058 if (tab->render_view_host()) {
4059 tab->render_view_host()->ClosePage(false, -1, -1); 4059 tab->render_view_host()->ClosePage();
4060 } else { 4060 } else {
4061 ClearUnloadState(tab, true); 4061 ClearUnloadState(tab, true);
4062 } 4062 }
4063 } else { 4063 } else {
4064 NOTREACHED(); 4064 NOTREACHED();
4065 } 4065 }
4066 } 4066 }
4067 4067
4068 bool Browser::HasCompletedUnloadProcessing() const { 4068 bool Browser::HasCompletedUnloadProcessing() const {
4069 return is_attempting_to_close_browser_ && 4069 return is_attempting_to_close_browser_ &&
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
4447 // The page transition below is only for the purpose of inserting the tab. 4447 // The page transition below is only for the purpose of inserting the tab.
4448 browser->AddTab(view_source_contents, PageTransition::LINK); 4448 browser->AddTab(view_source_contents, PageTransition::LINK);
4449 } 4449 }
4450 4450
4451 if (profile_->HasSessionService()) { 4451 if (profile_->HasSessionService()) {
4452 SessionService* session_service = profile_->GetSessionService(); 4452 SessionService* session_service = profile_->GetSessionService();
4453 if (session_service) 4453 if (session_service)
4454 session_service->TabRestored(&view_source_contents->controller(), false); 4454 session_service->TabRestored(&view_source_contents->controller(), false);
4455 } 4455 }
4456 } 4456 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698