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

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

Issue 23068021: Remove PerBrowser launcher, reland step 1 of 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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_app_menu_item_v2app.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h"
6 6
7 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h" 7 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h"
8 8
9 ChromeLauncherAppMenuItemV2App::ChromeLauncherAppMenuItemV2App( 9 ChromeLauncherAppMenuItemV2App::ChromeLauncherAppMenuItemV2App(
10 const string16 title, 10 const string16 title,
11 const gfx::Image* icon, 11 const gfx::Image* icon,
12 const std::string& app_id, 12 const std::string& app_id,
13 ChromeLauncherControllerPerApp* launcher_controller, 13 ChromeLauncherController* launcher_controller,
14 int app_index, 14 int app_index,
15 bool has_leading_separator) 15 bool has_leading_separator)
16 : ChromeLauncherAppMenuItem(title, icon, has_leading_separator), 16 : ChromeLauncherAppMenuItem(title, icon, has_leading_separator),
17 launcher_controller_(launcher_controller), 17 launcher_controller_(launcher_controller),
18 app_id_(app_id), 18 app_id_(app_id),
19 app_index_(app_index) { 19 app_index_(app_index) {
20 } 20 }
21 21
22 bool ChromeLauncherAppMenuItemV2App::IsEnabled() const { 22 bool ChromeLauncherAppMenuItemV2App::IsEnabled() const {
23 return true; 23 return true;
24 } 24 }
25 25
26 void ChromeLauncherAppMenuItemV2App::Execute(int event_flags) { 26 void ChromeLauncherAppMenuItemV2App::Execute(int event_flags) {
27 // Note: At this time there is only a single app running at any point. as 27 // Note: At this time there is only a single app running at any point. as
28 // such we will never come here with usable |event_flags|. If that ever 28 // such we will never come here with usable |event_flags|. If that ever
29 // changes we should add some special close code here. 29 // changes we should add some special close code here.
30 // Note: If the application item did go away since the menu was created, 30 // Note: If the application item did go away since the menu was created,
31 // The controller will take care of it. 31 // The controller will take care of it.
32 launcher_controller_->ActivateShellApp(app_id_, app_index_); 32 launcher_controller_->ActivateShellApp(app_id_, app_index_);
33 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698