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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc

Issue 11779019: browser: Move FindTabbedBrowser() function into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/ash/launcher/chrome_launcher_controller_per_browser. h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser. h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 return profile_->GetExtensionService()->GetInstalledExtension(app_id); 761 return profile_->GetExtensionService()->GetInstalledExtension(app_id);
762 } 762 }
763 763
764 void ChromeLauncherControllerPerBrowser::OnBrowserShortcutClicked( 764 void ChromeLauncherControllerPerBrowser::OnBrowserShortcutClicked(
765 int event_flags) { 765 int event_flags) {
766 if (event_flags & ui::EF_CONTROL_DOWN) { 766 if (event_flags & ui::EF_CONTROL_DOWN) {
767 CreateNewWindow(); 767 CreateNewWindow();
768 return; 768 return;
769 } 769 }
770 770
771 Browser* last_browser = browser::FindTabbedBrowser( 771 Browser* last_browser = chrome::FindTabbedBrowser(
772 GetProfileForNewWindows(), true, chrome::HOST_DESKTOP_TYPE_ASH); 772 GetProfileForNewWindows(), true, chrome::HOST_DESKTOP_TYPE_ASH);
773 773
774 if (!last_browser) { 774 if (!last_browser) {
775 CreateNewWindow(); 775 CreateNewWindow();
776 return; 776 return;
777 } 777 }
778 778
779 aura::Window* window = last_browser->window()->GetNativeWindow(); 779 aura::Window* window = last_browser->window()->GetNativeWindow();
780 window->Show(); 780 window->Show();
781 ash::wm::ActivateWindow(window); 781 ash::wm::ActivateWindow(window);
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest( 1206 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest(
1207 AppIconLoader* loader) { 1207 AppIconLoader* loader) {
1208 app_icon_loader_.reset(loader); 1208 app_icon_loader_.reset(loader);
1209 } 1209 }
1210 1210
1211 const std::string& 1211 const std::string&
1212 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest( 1212 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest(
1213 ash::LauncherID id) { 1213 ash::LauncherID id) {
1214 return id_to_item_controller_map_[id]->app_id(); 1214 return id_to_item_controller_map_[id]->app_id();
1215 } 1215 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc ('k') | chrome/browser/ui/browser_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698