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

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

Issue 6973047: Fix to reload He's Dead Jim page when navigating through windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | 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) 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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 965
966 // TODO(sky): convert session/tab restore to use notification. 966 // TODO(sky): convert session/tab restore to use notification.
967 NotificationService::current()->Notify( 967 NotificationService::current()->Notify(
968 NotificationType::BROWSER_CLOSING, 968 NotificationType::BROWSER_CLOSING,
969 Source<Browser>(this), 969 Source<Browser>(this),
970 Details<bool>(&exiting)); 970 Details<bool>(&exiting));
971 971
972 CloseAllTabs(); 972 CloseAllTabs();
973 } 973 }
974 974
975 void Browser::OnWindowActivated() {
976 // On some platforms we want to automatically reload tabs that are
977 // killed when the user selects them.
978 TabContents* contents = GetSelectedTabContents();
979 if (contents && contents->crashed_status() ==
980 base::TERMINATION_STATUS_PROCESS_WAS_KILLED) {
981 if (CommandLine::ForCurrentProcess()->HasSwitch(
982 switches::kReloadKilledTabs)) {
983 Reload(CURRENT_TAB);
984 }
985 }
986 }
987
975 //////////////////////////////////////////////////////////////////////////////// 988 ////////////////////////////////////////////////////////////////////////////////
976 // In-progress download termination handling: 989 // In-progress download termination handling:
977 990
978 void Browser::InProgressDownloadResponse(bool cancel_downloads) { 991 void Browser::InProgressDownloadResponse(bool cancel_downloads) {
979 if (cancel_downloads) { 992 if (cancel_downloads) {
980 cancel_download_confirmation_state_ = RESPONSE_RECEIVED; 993 cancel_download_confirmation_state_ = RESPONSE_RECEIVED;
981 CloseWindow(); 994 CloseWindow();
982 return; 995 return;
983 } 996 }
984 997
(...skipping 3615 matching lines...) Expand 10 before | Expand all | Expand 10 after
4600 TabContents* current_tab = GetSelectedTabContents(); 4613 TabContents* current_tab = GetSelectedTabContents();
4601 if (current_tab) { 4614 if (current_tab) {
4602 content_restrictions = current_tab->content_restrictions(); 4615 content_restrictions = current_tab->content_restrictions();
4603 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4616 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4604 // See comment in UpdateCommandsForTabState about why we call url(). 4617 // See comment in UpdateCommandsForTabState about why we call url().
4605 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4618 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4606 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4619 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4607 } 4620 }
4608 return content_restrictions; 4621 return content_restrictions;
4609 } 4622 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698