| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h" | |
| 6 | |
| 7 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | |
| 8 | |
| 9 ChromeLauncherAppMenuItemV2App::ChromeLauncherAppMenuItemV2App( | |
| 10 const base::string16 title, | |
| 11 const gfx::Image* icon, | |
| 12 const std::string& app_id, | |
| 13 ChromeLauncherController* launcher_controller, | |
| 14 int app_index) | |
| 15 : ash::ShelfApplicationMenuItem(title, icon), | |
| 16 launcher_controller_(launcher_controller), | |
| 17 app_id_(app_id), | |
| 18 app_index_(app_index) {} | |
| 19 | |
| 20 ChromeLauncherAppMenuItemV2App::~ChromeLauncherAppMenuItemV2App() {} | |
| 21 | |
| 22 void ChromeLauncherAppMenuItemV2App::Execute(int event_flags) { | |
| 23 // Note: At this time there is only a single app running at any point. as | |
| 24 // such we will never come here with usable |event_flags|. If that ever | |
| 25 // changes we should add some special close code here. | |
| 26 // Note: If the application item did go away since the menu was created, | |
| 27 // The controller will take care of it. | |
| 28 launcher_controller_->ActivateShellApp(app_id_, app_index_); | |
| 29 } | |
| OLD | NEW |