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

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

Issue 5804005: Enable default apps by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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/profiles/profile_impl.cc » ('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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Don't include the WebStore component app. The WebStore launcher 174 // Don't include the WebStore component app. The WebStore launcher
175 // gets special treatment in ntp/apps.js. 175 // gets special treatment in ntp/apps.js.
176 if ((*it)->is_app() && (*it)->id() != extension_misc::kWebStoreAppId) { 176 if ((*it)->is_app() && (*it)->id() != extension_misc::kWebStoreAppId) {
177 DictionaryValue* app_info = new DictionaryValue(); 177 DictionaryValue* app_info = new DictionaryValue();
178 CreateAppInfo(*it, extensions_service_->extension_prefs(), app_info); 178 CreateAppInfo(*it, extensions_service_->extension_prefs(), app_info);
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 bool showLauncher =
185 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppLauncher);
186 dictionary->SetBoolean("showLauncher", showLauncher);
187
188 #if defined(OS_MACOSX) 184 #if defined(OS_MACOSX)
189 // App windows are not yet implemented on mac. 185 // App windows are not yet implemented on mac.
190 dictionary->SetBoolean("disableAppWindowLaunch", true); 186 dictionary->SetBoolean("disableAppWindowLaunch", true);
191 dictionary->SetBoolean("disableCreateAppShortcut", true); 187 dictionary->SetBoolean("disableCreateAppShortcut", true);
192 #endif 188 #endif
193 } 189 }
194 190
195 void AppLauncherHandler::HandleGetApps(const ListValue* args) { 191 void AppLauncherHandler::HandleGetApps(const ListValue* args) {
196 DictionaryValue dictionary; 192 DictionaryValue dictionary;
197 FillAppDictionary(&dictionary); 193 FillAppDictionary(&dictionary);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // We make this check for the case of minimized windows, unit tests, etc. 401 // We make this check for the case of minimized windows, unit tests, etc.
406 if (platform_util::IsVisible(dom_ui_->tab_contents()->GetNativeView()) && 402 if (platform_util::IsVisible(dom_ui_->tab_contents()->GetNativeView()) &&
407 Animation::ShouldRenderRichAnimation()) { 403 Animation::ShouldRenderRichAnimation()) {
408 #if defined(OS_WIN) 404 #if defined(OS_WIN)
409 AppLaunchedAnimation::Show(extension, rect); 405 AppLaunchedAnimation::Show(extension, rect);
410 #else 406 #else
411 NOTIMPLEMENTED(); 407 NOTIMPLEMENTED();
412 #endif 408 #endif
413 } 409 }
414 } 410 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698