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_app.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.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/launcher/launcher_util.h" | 10 #include "ash/launcher/launcher_util.h" |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 CreateNewWindow(); | 779 CreateNewWindow(); |
780 return; | 780 return; |
781 } | 781 } |
782 | 782 |
783 aura::Window* window = last_browser->window()->GetNativeWindow(); | 783 aura::Window* window = last_browser->window()->GetNativeWindow(); |
784 window->Show(); | 784 window->Show(); |
785 ash::wm::ActivateWindow(window); | 785 ash::wm::ActivateWindow(window); |
786 } | 786 } |
787 | 787 |
788 void ChromeLauncherControllerPerApp::ItemClicked(const ash::LauncherItem& item, | 788 void ChromeLauncherControllerPerApp::ItemClicked(const ash::LauncherItem& item, |
789 int event_flags) { | 789 const ui::Event& event) { |
790 DCHECK(HasItemController(item.id)); | 790 DCHECK(HasItemController(item.id)); |
791 id_to_item_controller_map_[item.id]->Clicked(); | 791 id_to_item_controller_map_[item.id]->Clicked(event); |
792 } | 792 } |
793 | 793 |
794 int ChromeLauncherControllerPerApp::GetBrowserShortcutResourceId() { | 794 int ChromeLauncherControllerPerApp::GetBrowserShortcutResourceId() { |
795 return IDR_PRODUCT_LOGO_32; | 795 return IDR_PRODUCT_LOGO_32; |
796 } | 796 } |
797 | 797 |
798 string16 ChromeLauncherControllerPerApp::GetTitle( | 798 string16 ChromeLauncherControllerPerApp::GetTitle( |
799 const ash::LauncherItem& item) { | 799 const ash::LauncherItem& item) { |
800 DCHECK(HasItemController(item.id)); | 800 DCHECK(HasItemController(item.id)); |
801 return id_to_item_controller_map_[item.id]->GetTitle(); | 801 return id_to_item_controller_map_[item.id]->GetTitle(); |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 WebContents* web_contents = | 1339 WebContents* web_contents = |
1340 tab_strip->GetWebContentsAt(tab_strip->active_index()); | 1340 tab_strip->GetWebContentsAt(tab_strip->active_index()); |
1341 gfx::Image app_icon = GetAppListIcon(web_contents); | 1341 gfx::Image app_icon = GetAppListIcon(web_contents); |
1342 items->push_back(new ChromeLauncherAppMenuItemBrowser( | 1342 items->push_back(new ChromeLauncherAppMenuItemBrowser( |
1343 web_contents->GetTitle(), | 1343 web_contents->GetTitle(), |
1344 app_icon.IsEmpty() ? NULL : &app_icon, | 1344 app_icon.IsEmpty() ? NULL : &app_icon, |
1345 browser)); | 1345 browser)); |
1346 } | 1346 } |
1347 return items; | 1347 return items; |
1348 } | 1348 } |
OLD | NEW |