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

Side by Side Diff: chrome/browser/dom_ui/app_launcher_handler.cc

Issue 6183005: Merge 69758 - Do not show apps section until default apps are installed.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/default_apps.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/app_launcher_handler.h" 5 #include "chrome/browser/dom_ui/app_launcher_handler.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 list->Append(app_info); 179 list->Append(app_info);
180 } 180 }
181 } 181 }
182 dictionary->Set("apps", list); 182 dictionary->Set("apps", list);
183 183
184 #if defined(OS_MACOSX) 184 #if defined(OS_MACOSX)
185 // App windows are not yet implemented on mac. 185 // App windows are not yet implemented on mac.
186 dictionary->SetBoolean("disableAppWindowLaunch", true); 186 dictionary->SetBoolean("disableAppWindowLaunch", true);
187 dictionary->SetBoolean("disableCreateAppShortcut", true); 187 dictionary->SetBoolean("disableCreateAppShortcut", true);
188 #endif 188 #endif
189
190 // We always show the launcher on Chrome OS. On Desktop Chrome, only show it
191 // if we've installed our default apps.
192 #if defined(OS_CHROMEOS)
193 dictionary->SetBoolean("showLauncher", true);
194 #else
195 dictionary->SetBoolean(
196 "showLauncher",
197 extensions_service_->default_apps()->GetDefaultAppsInstalled());
198 #endif
189 } 199 }
190 200
191 void AppLauncherHandler::HandleGetApps(const ListValue* args) { 201 void AppLauncherHandler::HandleGetApps(const ListValue* args) {
192 DictionaryValue dictionary; 202 DictionaryValue dictionary;
193 FillAppDictionary(&dictionary); 203 FillAppDictionary(&dictionary);
194 204
195 // Tell the client whether to show the promo for this view. We don't do this 205 // Tell the client whether to show the promo for this view. We don't do this
196 // in the case of PREF_CHANGED because: 206 // in the case of PREF_CHANGED because:
197 // 207 //
198 // a) At that point in time, depending on the pref that changed, it can look 208 // a) At that point in time, depending on the pref that changed, it can look
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // We make this check for the case of minimized windows, unit tests, etc. 411 // We make this check for the case of minimized windows, unit tests, etc.
402 if (platform_util::IsVisible(dom_ui_->tab_contents()->GetNativeView()) && 412 if (platform_util::IsVisible(dom_ui_->tab_contents()->GetNativeView()) &&
403 Animation::ShouldRenderRichAnimation()) { 413 Animation::ShouldRenderRichAnimation()) {
404 #if defined(OS_WIN) 414 #if defined(OS_WIN)
405 AppLaunchedAnimation::Show(extension, rect); 415 AppLaunchedAnimation::Show(extension, rect);
406 #else 416 #else
407 NOTIMPLEMENTED(); 417 NOTIMPLEMENTED();
408 #endif 418 #endif
409 } 419 }
410 } 420 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/default_apps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698