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

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

Issue 3808009: Adds --enable-app-launcher command line switch (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: renamed a variable Created 10 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
« no previous file with comments | « no previous file | chrome/browser/resources/ntp/apps.js » ('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/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 dictionary->Set("apps", list); 147 dictionary->Set("apps", list);
148 148
149 DefaultApps* default_apps = extensions_service_->default_apps(); 149 DefaultApps* default_apps = extensions_service_->default_apps();
150 if (default_apps->ShouldShowPromo(extensions_service_->GetAppIds())) { 150 if (default_apps->ShouldShowPromo(extensions_service_->GetAppIds())) {
151 dictionary->SetBoolean("showPromo", true); 151 dictionary->SetBoolean("showPromo", true);
152 default_apps->DidShowPromo(); 152 default_apps->DidShowPromo();
153 } else { 153 } else {
154 dictionary->SetBoolean("showPromo", false); 154 dictionary->SetBoolean("showPromo", false);
155 } 155 }
156
157 bool showLauncher =
158 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppLauncher);
159 dictionary->SetBoolean("showLauncher", showLauncher);
156 } 160 }
157 161
158 void AppLauncherHandler::HandleGetApps(const ListValue* args) { 162 void AppLauncherHandler::HandleGetApps(const ListValue* args) {
159 DictionaryValue dictionary; 163 DictionaryValue dictionary;
160 FillAppDictionary(&dictionary); 164 FillAppDictionary(&dictionary);
161 dom_ui_->CallJavascriptFunction(L"getAppsCallback", dictionary); 165 dom_ui_->CallJavascriptFunction(L"getAppsCallback", dictionary);
162 166
163 // First time we get here we set up the observer so that we can tell update 167 // First time we get here we set up the observer so that we can tell update
164 // the apps as they change. 168 // the apps as they change.
165 if (registrar_.IsEmpty()) { 169 if (registrar_.IsEmpty()) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return; 288 return;
285 289
286 extensions_service_->UninstallExtension(extension_id_prompting_, 290 extensions_service_->UninstallExtension(extension_id_prompting_,
287 false /* external_uninstall */); 291 false /* external_uninstall */);
288 extension_id_prompting_ = ""; 292 extension_id_prompting_ = "";
289 } 293 }
290 294
291 void AppLauncherHandler::InstallUIAbort() { 295 void AppLauncherHandler::InstallUIAbort() {
292 extension_id_prompting_ = ""; 296 extension_id_prompting_ = "";
293 } 297 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp/apps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698