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.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 643 |
644 if (!IsActiveBrowserShowingNTP(last_browser)) | 644 if (!IsActiveBrowserShowingNTP(last_browser)) |
645 chrome::NewTab(last_browser); | 645 chrome::NewTab(last_browser); |
646 | 646 |
647 aura::Window* window = last_browser->window()->GetNativeWindow(); | 647 aura::Window* window = last_browser->window()->GetNativeWindow(); |
648 window->Show(); | 648 window->Show(); |
649 ash::wm::ActivateWindow(window); | 649 ash::wm::ActivateWindow(window); |
650 } | 650 } |
651 | 651 |
652 void ChromeLauncherController::CreateNewWindow() { | 652 void ChromeLauncherController::CreateNewWindow() { |
653 chrome::NewEmptyWindow(GetProfileForNewWindows()); | 653 chrome::NewEmptyWindow( |
| 654 GetProfileForNewWindows(), chrome::HOST_DESKTOP_TYPE_ASH); |
654 } | 655 } |
655 | 656 |
656 void ChromeLauncherController::ItemClicked(const ash::LauncherItem& item, | 657 void ChromeLauncherController::ItemClicked(const ash::LauncherItem& item, |
657 int event_flags) { | 658 int event_flags) { |
658 DCHECK(HasItemController(item.id)); | 659 DCHECK(HasItemController(item.id)); |
659 id_to_item_controller_map_[item.id]->Clicked(); | 660 id_to_item_controller_map_[item.id]->Clicked(); |
660 } | 661 } |
661 | 662 |
662 int ChromeLauncherController::GetBrowserShortcutResourceId() { | 663 int ChromeLauncherController::GetBrowserShortcutResourceId() { |
663 return IDR_PRODUCT_LOGO_32; | 664 return IDR_PRODUCT_LOGO_32; |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 if (current_tab) { | 1061 if (current_tab) { |
1061 content::NavigationEntry* active_entry = | 1062 content::NavigationEntry* active_entry = |
1062 current_tab->GetController().GetActiveEntry(); | 1063 current_tab->GetController().GetActiveEntry(); |
1063 if (active_entry && | 1064 if (active_entry && |
1064 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) | 1065 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) |
1065 return true; | 1066 return true; |
1066 } | 1067 } |
1067 return false; | 1068 return false; |
1068 } | 1069 } |
1069 | 1070 |
OLD | NEW |