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

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

Issue 10079023: Move notifications used only in chrome/ out of content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: six! Created 8 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) 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 LoadURLInContents(target, params->url, params, extra_headers); 611 LoadURLInContents(target, params->url, params, extra_headers);
612 } 612 }
613 613
614 // If the singleton tab isn't already selected, select it. 614 // If the singleton tab isn't already selected, select it.
615 if (params->source_contents != params->target_contents) 615 if (params->source_contents != params->target_contents)
616 params->browser->ActivateTabAt(singleton_index, user_initiated); 616 params->browser->ActivateTabAt(singleton_index, user_initiated);
617 } 617 }
618 618
619 if (params->disposition != CURRENT_TAB) { 619 if (params->disposition != CURRENT_TAB) {
620 content::NotificationService::current()->Notify( 620 content::NotificationService::current()->Notify(
621 content::NOTIFICATION_TAB_ADDED, 621 chrome::NOTIFICATION_TAB_ADDED,
622 content::Source<content::WebContentsDelegate>(params->browser), 622 content::Source<content::WebContentsDelegate>(params->browser),
623 content::Details<WebContents>(params->target_contents->web_contents())); 623 content::Details<WebContents>(params->target_contents->web_contents()));
624 } 624 }
625 } 625 }
626 626
627 // Returns the index of an existing singleton tab in |params->browser| matching 627 // Returns the index of an existing singleton tab in |params->browser| matching
628 // the URL specified in |params|. 628 // the URL specified in |params|.
629 int GetIndexOfSingletonTab(browser::NavigateParams* params) { 629 int GetIndexOfSingletonTab(browser::NavigateParams* params) {
630 if (params->disposition != SINGLETON_TAB) 630 if (params->disposition != SINGLETON_TAB)
631 return -1; 631 return -1;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 popup_bounds.height() > max_height || 699 popup_bounds.height() > max_height ||
700 popup_bounds.width() == 0 || 700 popup_bounds.width() == 0 ||
701 popup_bounds.height() == 0) { 701 popup_bounds.height() == 0) {
702 return NEW_FOREGROUND_TAB; 702 return NEW_FOREGROUND_TAB;
703 } 703 }
704 return NEW_POPUP; 704 return NEW_POPUP;
705 } 705 }
706 #endif 706 #endif
707 707
708 } // namespace browser 708 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698