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

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

Issue 7537030: Make panel adjust bounds per preferred size change notification on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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_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 "chrome/browser/browser_about_handler.h" 10 #include "chrome/browser/browser_about_handler.h"
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } else if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE && 467 } else if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE &&
468 target->GetURL() != params->url) { 468 target->GetURL() != params->url) {
469 target->controller().LoadURL( 469 target->controller().LoadURL(
470 params->url, params->referrer, params->transition); 470 params->url, params->referrer, params->transition);
471 } 471 }
472 472
473 // If the singleton tab isn't already selected, select it. 473 // If the singleton tab isn't already selected, select it.
474 if (params->source_contents != params->target_contents) 474 if (params->source_contents != params->target_contents)
475 params->browser->ActivateTabAt(singleton_index, user_initiated); 475 params->browser->ActivateTabAt(singleton_index, user_initiated);
476 } 476 }
477
478 NotificationService::current()->Notify(
479 content::NOTIFICATION_TAB_ADDED,
480 Source<TabContentsDelegate>(params->browser),
481 Details<TabContents>(params->target_contents->tab_contents()));
477 } 482 }
478 483
479 // Returns the index of an existing singleton tab in |params->browser| matching 484 // Returns the index of an existing singleton tab in |params->browser| matching
480 // the URL specified in |params|. 485 // the URL specified in |params|.
481 int GetIndexOfSingletonTab(browser::NavigateParams* params) { 486 int GetIndexOfSingletonTab(browser::NavigateParams* params) {
482 if (params->disposition != SINGLETON_TAB) 487 if (params->disposition != SINGLETON_TAB)
483 return -1; 488 return -1;
484 489
485 // In case the URL was rewritten by the BrowserURLHandler we need to ensure 490 // In case the URL was rewritten by the BrowserURLHandler we need to ensure
486 // that we do not open another URL that will get redirected to the rewritten 491 // that we do not open another URL that will get redirected to the rewritten
(...skipping 27 matching lines...) Expand all
514 rewritten_url, replacements)) { 519 rewritten_url, replacements)) {
515 params->target_contents = tab; 520 params->target_contents = tab;
516 return tab_index; 521 return tab_index;
517 } 522 }
518 } 523 }
519 524
520 return -1; 525 return -1;
521 } 526 }
522 527
523 } // namespace browser 528 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698