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

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

Issue 10908153: [Panel refactor] Deprecate old panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux_chromeos test failure Created 8 years, 3 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.cc ('k') | chrome/browser/ui/browser_navigator_browsertest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_navigator.h" 5 #include "chrome/browser/ui/browser_navigator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 // The browser window may want to adjust the disposition. 399 // The browser window may want to adjust the disposition.
400 if (params->disposition == NEW_POPUP && 400 if (params->disposition == NEW_POPUP &&
401 source_browser && 401 source_browser &&
402 source_browser->window()) { 402 source_browser->window()) {
403 params->disposition = 403 params->disposition =
404 source_browser->window()->GetDispositionForPopupBounds( 404 source_browser->window()->GetDispositionForPopupBounds(
405 params->window_bounds); 405 params->window_bounds);
406 } 406 }
407 407
408 // Adjust disposition for the navigation happending in the sad page of the
409 // panel window.
410 if (params->source_contents &&
411 params->source_contents->web_contents()->IsCrashed() &&
412 params->disposition == CURRENT_TAB &&
413 params->browser &&
414 params->browser->is_type_panel()) {
415 params->disposition = NEW_FOREGROUND_TAB;
416 }
417
418 params->browser = GetBrowserForDisposition(params); 408 params->browser = GetBrowserForDisposition(params);
419 409
420 if (!params->browser) 410 if (!params->browser)
421 return; 411 return;
422 412
423 // Navigate() must not return early after this point. 413 // Navigate() must not return early after this point.
424 414
425 if (GetSourceProfile(params) != params->browser->profile()) { 415 if (GetSourceProfile(params) != params->browser->profile()) {
426 // A tab is being opened from a link from a different profile, we must reset 416 // A tab is being opened from a link from a different profile, we must reset
427 // source information that may cause state to be shared. 417 // source information that may cause state to be shared.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 return !(url.scheme() == chrome::kChromeUIScheme && 595 return !(url.scheme() == chrome::kChromeUIScheme &&
606 (url.host() == chrome::kChromeUISettingsHost || 596 (url.host() == chrome::kChromeUISettingsHost ||
607 url.host() == chrome::kChromeUISettingsFrameHost || 597 url.host() == chrome::kChromeUISettingsFrameHost ||
608 url.host() == chrome::kChromeUIExtensionsHost || 598 url.host() == chrome::kChromeUIExtensionsHost ||
609 url.host() == chrome::kChromeUIBookmarksHost || 599 url.host() == chrome::kChromeUIBookmarksHost ||
610 url.host() == chrome::kChromeUISyncPromoHost || 600 url.host() == chrome::kChromeUISyncPromoHost ||
611 url.host() == chrome::kChromeUIUberHost)); 601 url.host() == chrome::kChromeUIUberHost));
612 } 602 }
613 603
614 } // namespace chrome 604 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_navigator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698