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

Side by Side Diff: chrome/browser/ui/app_list/extension_app_item.cc

Issue 15715003: Make app launcher Chrome Store UMA consistent with NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bs Created 7 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search/app_result.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app_list/extension_app_item.h" 5 #include "chrome/browser/ui/app_list/extension_app_item.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/extensions/extension_prefs.h" 8 #include "chrome/browser/extensions/extension_prefs.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_sorting.h" 10 #include "chrome/browser/extensions/extension_sorting.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 void ExtensionAppItem::Activate(int event_flags) { 252 void ExtensionAppItem::Activate(int event_flags) {
253 // |extension| could be NULL when it is being unloaded for updating. 253 // |extension| could be NULL when it is being unloaded for updating.
254 const Extension* extension = GetExtension(); 254 const Extension* extension = GetExtension();
255 if (!extension) 255 if (!extension)
256 return; 256 return;
257 257
258 if (RunExtensionEnableFlow()) 258 if (RunExtensionEnableFlow())
259 return; 259 return;
260 260
261 AppLauncherHandler::RecordAppLaunchType( 261 AppLauncherHandler::RecordAppListMainLaunch(extension);
262 extension_misc::APP_LAUNCH_APP_LIST_MAIN,
263 extension->GetType());
264 controller_->ActivateApp(profile_, extension, event_flags); 262 controller_->ActivateApp(profile_, extension, event_flags);
265 } 263 }
266 264
267 ui::MenuModel* ExtensionAppItem::GetContextMenuModel() { 265 ui::MenuModel* ExtensionAppItem::GetContextMenuModel() {
268 if (!context_menu_) { 266 if (!context_menu_) {
269 context_menu_.reset(new app_list::AppContextMenu( 267 context_menu_.reset(new app_list::AppContextMenu(
270 this, profile_, extension_id_, controller_, is_platform_app_)); 268 this, profile_, extension_id_, controller_, is_platform_app_));
271 } 269 }
272 270
273 return context_menu_->GetMenuModel(); 271 return context_menu_->GetMenuModel();
274 } 272 }
275 273
276 void ExtensionAppItem::ExecuteLaunchCommand(int event_flags) { 274 void ExtensionAppItem::ExecuteLaunchCommand(int event_flags) {
277 Launch(event_flags); 275 Launch(event_flags);
278 } 276 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search/app_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698