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

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

Issue 11094019: Auto hide app list on Windows when it loses focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 8 years, 2 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/app_list/extension_app_item.h" 5 #include "chrome/browser/ui/app_list/extension_app_item.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/extensions/context_menu_matcher.h" 9 #include "chrome/browser/extensions/context_menu_matcher.h"
10 #include "chrome/browser/extensions/extension_prefs.h" 10 #include "chrome/browser/extensions/extension_prefs.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 127
128 bool MenuItemHasLauncherContext(const extensions::MenuItem* item) { 128 bool MenuItemHasLauncherContext(const extensions::MenuItem* item) {
129 return item->contexts().Contains(extensions::MenuItem::LAUNCHER); 129 return item->contexts().Contains(extensions::MenuItem::LAUNCHER);
130 } 130 }
131 131
132 } // namespace 132 } // namespace
133 133
134 ExtensionAppItem::ExtensionAppItem(Profile* profile, 134 ExtensionAppItem::ExtensionAppItem(Profile* profile,
135 const Extension* extension, 135 const Extension* extension,
136 AppListController* controller) 136 AppListControllerDelegate* controller)
137 : ChromeAppListItem(TYPE_APP), 137 : ChromeAppListItem(TYPE_APP),
138 profile_(profile), 138 profile_(profile),
139 extension_id_(extension->id()), 139 extension_id_(extension->id()),
140 controller_(controller) { 140 controller_(controller) {
141 SetTitle(extension->name()); 141 SetTitle(extension->name());
142 LoadImage(extension); 142 LoadImage(extension);
143 } 143 }
144 144
145 ExtensionAppItem::~ExtensionAppItem() { 145 ExtensionAppItem::~ExtensionAppItem() {
146 } 146 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 IDS_NEW_TAB_APP_DETAILS); 357 IDS_NEW_TAB_APP_DETAILS);
358 } 358 }
359 context_menu_model_->AddItemWithStringId(UNINSTALL, 359 context_menu_model_->AddItemWithStringId(UNINSTALL,
360 extension->is_platform_app() ? 360 extension->is_platform_app() ?
361 IDS_APP_LIST_UNINSTALL_ITEM : 361 IDS_APP_LIST_UNINSTALL_ITEM :
362 IDS_EXTENSIONS_UNINSTALL); 362 IDS_EXTENSIONS_UNINSTALL);
363 } 363 }
364 364
365 return context_menu_model_.get(); 365 return context_menu_model_.get();
366 } 366 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698