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

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

Issue 846913003: Don't show shortcut arrow on hosted apps on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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_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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 GetAppSorting(profile_)->EnsureValidOrdinals(extension_id_, 139 GetAppSorting(profile_)->EnsureValidOrdinals(extension_id_,
140 syncer::StringOrdinal()); 140 syncer::StringOrdinal());
141 UpdatePositionFromExtensionOrdering(); 141 UpdatePositionFromExtensionOrdering();
142 } 142 }
143 143
144 ExtensionAppItem::~ExtensionAppItem() { 144 ExtensionAppItem::~ExtensionAppItem() {
145 } 145 }
146 146
147 bool ExtensionAppItem::NeedsOverlay() const { 147 bool ExtensionAppItem::NeedsOverlay() const {
148 #if defined(OS_CHROMEOS)
149 // The overlay is disabled completely in ChromeOS.
150 return false;
151 #endif
Matt Giuca 2015/01/22 06:39:54 nit: Blank line after this.
benwells 2015/01/22 07:03:23 Done.
148 // The overlay icon is disabled for hosted apps in windowed mode with 152 // The overlay icon is disabled for hosted apps in windowed mode with
149 // streamlined hosted apps. 153 // streamlined hosted apps.
Matt Giuca 2015/01/22 06:39:54 Move this comment to just above the return.
benwells 2015/01/22 07:03:23 Done.
150 bool streamlined_hosted_apps =
151 extensions::util::IsStreamlinedHostedAppsEnabled();
152 #if defined(OS_CHROMEOS)
153 if (!streamlined_hosted_apps)
154 return false;
155 #endif
156 extensions::LaunchType launch_type = 154 extensions::LaunchType launch_type =
157 GetExtension() 155 GetExtension()
158 ? extensions::GetLaunchType(extensions::ExtensionPrefs::Get(profile_), 156 ? extensions::GetLaunchType(extensions::ExtensionPrefs::Get(profile_),
159 GetExtension()) 157 GetExtension())
160 : extensions::LAUNCH_TYPE_WINDOW; 158 : extensions::LAUNCH_TYPE_WINDOW;
161 159
162 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId && 160 return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId &&
163 (!streamlined_hosted_apps || 161 (!extensions::util::IsStreamlinedHostedAppsEnabled() ||
164 launch_type != extensions::LAUNCH_TYPE_WINDOW); 162 launch_type != extensions::LAUNCH_TYPE_WINDOW);
165 } 163 }
166 164
167 void ExtensionAppItem::Reload() { 165 void ExtensionAppItem::Reload() {
168 const Extension* extension = GetExtension(); 166 const Extension* extension = GetExtension();
169 bool is_installing = !extension; 167 bool is_installing = !extension;
170 SetIsInstalling(is_installing); 168 SetIsInstalling(is_installing);
171 if (is_installing) { 169 if (is_installing) {
172 SetName(extension_name_); 170 SetName(extension_name_);
173 UpdateIcon(); 171 UpdateIcon();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 const syncer::StringOrdinal& launch = 353 const syncer::StringOrdinal& launch =
356 GetAppSorting(profile_)->GetAppLaunchOrdinal(extension_id_); 354 GetAppSorting(profile_)->GetAppLaunchOrdinal(extension_id_);
357 set_position(syncer::StringOrdinal( 355 set_position(syncer::StringOrdinal(
358 page.ToInternalValue() + launch.ToInternalValue())); 356 page.ToInternalValue() + launch.ToInternalValue()));
359 } 357 }
360 358
361 AppListControllerDelegate* ExtensionAppItem::GetController() { 359 AppListControllerDelegate* ExtensionAppItem::GetController() {
362 return AppListService::Get(chrome::GetActiveDesktop())-> 360 return AppListService::Get(chrome::GetActiveDesktop())->
363 GetControllerDelegate(); 361 GetControllerDelegate();
364 } 362 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698