OLD | NEW |
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/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 } else { | 846 } else { |
847 NOTREACHED() << "Invalid launcher type"; | 847 NOTREACHED() << "Invalid launcher type"; |
848 } | 848 } |
849 } | 849 } |
850 | 850 |
851 const Extension* ChromeLauncherControllerPerBrowser::GetExtensionForAppID( | 851 const Extension* ChromeLauncherControllerPerBrowser::GetExtensionForAppID( |
852 const std::string& app_id) const { | 852 const std::string& app_id) const { |
853 return profile_->GetExtensionService()->GetInstalledExtension(app_id); | 853 return profile_->GetExtensionService()->GetInstalledExtension(app_id); |
854 } | 854 } |
855 | 855 |
| 856 void ChromeLauncherControllerPerBrowser::ActivateWindowOrMinimizeIfActive( |
| 857 BaseWindow* window, |
| 858 bool allow_minimize) { |
| 859 window->Show(); |
| 860 window->Activate(); |
| 861 } |
| 862 |
856 void ChromeLauncherControllerPerBrowser::OnBrowserShortcutClicked( | 863 void ChromeLauncherControllerPerBrowser::OnBrowserShortcutClicked( |
857 int event_flags) { | 864 int event_flags) { |
858 if (event_flags & ui::EF_CONTROL_DOWN) { | 865 if (event_flags & ui::EF_CONTROL_DOWN) { |
859 CreateNewWindow(); | 866 CreateNewWindow(); |
860 return; | 867 return; |
861 } | 868 } |
862 | 869 |
863 Browser* last_browser = chrome::FindTabbedBrowser( | 870 Browser* last_browser = chrome::FindTabbedBrowser( |
864 GetProfileForNewWindows(), true, chrome::HOST_DESKTOP_TYPE_ASH); | 871 GetProfileForNewWindows(), true, chrome::HOST_DESKTOP_TYPE_ASH); |
865 | 872 |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest( | 1373 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest( |
1367 extensions::AppIconLoader* loader) { | 1374 extensions::AppIconLoader* loader) { |
1368 app_icon_loader_.reset(loader); | 1375 app_icon_loader_.reset(loader); |
1369 } | 1376 } |
1370 | 1377 |
1371 const std::string& | 1378 const std::string& |
1372 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest( | 1379 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest( |
1373 ash::LauncherID id) { | 1380 ash::LauncherID id) { |
1374 return id_to_item_controller_map_[id]->app_id(); | 1381 return id_to_item_controller_map_[id]->app_id(); |
1375 } | 1382 } |
OLD | NEW |