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

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

Issue 883603002: Rename StreamlinedHostedApps to NewBookmarkApps in the code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments and variables Created 5 years, 11 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
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_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_util.h" 9 #include "chrome/browser/extensions/extension_util.h"
10 #include "chrome/browser/extensions/launch_util.h" 10 #include "chrome/browser/extensions/launch_util.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 return false; 150 return false;
151 #endif 151 #endif
152 152
153 extensions::LaunchType launch_type = 153 extensions::LaunchType launch_type =
154 GetExtension() 154 GetExtension()
155 ? extensions::GetLaunchType(extensions::ExtensionPrefs::Get(profile_), 155 ? extensions::GetLaunchType(extensions::ExtensionPrefs::Get(profile_),
156 GetExtension()) 156 GetExtension())
157 : extensions::LAUNCH_TYPE_WINDOW; 157 : extensions::LAUNCH_TYPE_WINDOW;
158 158
159 // The overlay icon is disabled for hosted apps in windowed mode with 159 // The overlay icon is disabled for hosted apps in windowed mode with
160 // streamlined hosted apps. 160 // bookmark apps enabled.
161 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId && 161 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId &&
162 (!extensions::util::IsStreamlinedHostedAppsEnabled() || 162 (!extensions::util::IsNewBookmarkAppsEnabled() ||
163 launch_type != extensions::LAUNCH_TYPE_WINDOW); 163 launch_type != extensions::LAUNCH_TYPE_WINDOW);
164 } 164 }
165 165
166 void ExtensionAppItem::Reload() { 166 void ExtensionAppItem::Reload() {
167 const Extension* extension = GetExtension(); 167 const Extension* extension = GetExtension();
168 bool is_installing = !extension; 168 bool is_installing = !extension;
169 SetIsInstalling(is_installing); 169 SetIsInstalling(is_installing);
170 if (is_installing) { 170 if (is_installing) {
171 SetName(extension_name_); 171 SetName(extension_name_);
172 UpdateIcon(); 172 UpdateIcon();
173 return; 173 return;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 const syncer::StringOrdinal& launch = 354 const syncer::StringOrdinal& launch =
355 GetAppSorting(profile_)->GetAppLaunchOrdinal(extension_id_); 355 GetAppSorting(profile_)->GetAppLaunchOrdinal(extension_id_);
356 set_position(syncer::StringOrdinal( 356 set_position(syncer::StringOrdinal(
357 page.ToInternalValue() + launch.ToInternalValue())); 357 page.ToInternalValue() + launch.ToInternalValue()));
358 } 358 }
359 359
360 AppListControllerDelegate* ExtensionAppItem::GetController() { 360 AppListControllerDelegate* ExtensionAppItem::GetController() {
361 return AppListService::Get(chrome::GetActiveDesktop())-> 361 return AppListService::Get(chrome::GetActiveDesktop())->
362 GetControllerDelegate(); 362 GetControllerDelegate();
363 } 363 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698