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

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

Issue 51943007: Don't attempt to session restore an undocked devtools window in AURA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 | « no previous file | 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 // session service so that user can restore what was open. 633 // session service so that user can restore what was open.
634 SessionService* session_service = 634 SessionService* session_service =
635 SessionServiceFactory::GetForProfile(profile()); 635 SessionServiceFactory::GetForProfile(profile());
636 if (session_service) 636 if (session_service)
637 session_service->WindowClosing(session_id()); 637 session_service->WindowClosing(session_id());
638 638
639 TabRestoreService* tab_restore_service = 639 TabRestoreService* tab_restore_service =
640 TabRestoreServiceFactory::GetForProfile(profile()); 640 TabRestoreServiceFactory::GetForProfile(profile());
641 641
642 #if defined(USE_AURA) 642 #if defined(USE_AURA)
643 if (tab_restore_service && is_app()) 643 if (tab_restore_service && is_app() && !is_devtools())
644 tab_restore_service->BrowserClosing(tab_restore_service_delegate()); 644 tab_restore_service->BrowserClosing(tab_restore_service_delegate());
645 #endif 645 #endif
646 646
647 if (tab_restore_service && is_type_tabbed() && tab_strip_model_->count()) 647 if (tab_restore_service && is_type_tabbed() && tab_strip_model_->count())
648 tab_restore_service->BrowserClosing(tab_restore_service_delegate()); 648 tab_restore_service->BrowserClosing(tab_restore_service_delegate());
649 649
650 // TODO(sky): convert session/tab restore to use notification. 650 // TODO(sky): convert session/tab restore to use notification.
651 content::NotificationService::current()->Notify( 651 content::NotificationService::current()->Notify(
652 chrome::NOTIFICATION_BROWSER_CLOSING, 652 chrome::NOTIFICATION_BROWSER_CLOSING,
653 content::Source<Browser>(this), 653 content::Source<Browser>(this),
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 if (contents && !allow_js_access) { 2271 if (contents && !allow_js_access) {
2272 contents->web_contents()->GetController().LoadURL( 2272 contents->web_contents()->GetController().LoadURL(
2273 target_url, 2273 target_url,
2274 content::Referrer(), 2274 content::Referrer(),
2275 content::PAGE_TRANSITION_LINK, 2275 content::PAGE_TRANSITION_LINK,
2276 std::string()); // No extra headers. 2276 std::string()); // No extra headers.
2277 } 2277 }
2278 2278
2279 return contents != NULL; 2279 return contents != NULL;
2280 } 2280 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698