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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc

Issue 12207104: Refactor app_list_util.h into AppListService abstract base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase for r184604=r184636 Created 7 years, 10 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 | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/prefs/browser_prefs.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) 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/extensions/api/webstore_private/webstore_private_api.h" 5 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
6 6
7 #include "apps/app_launcher.h" 7 #include "apps/app_launcher.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/extensions/extension_system.h" 22 #include "chrome/browser/extensions/extension_system.h"
23 #include "chrome/browser/extensions/install_tracker.h" 23 #include "chrome/browser/extensions/install_tracker.h"
24 #include "chrome/browser/extensions/install_tracker_factory.h" 24 #include "chrome/browser/extensions/install_tracker_factory.h"
25 #include "chrome/browser/extensions/webstore_installer.h" 25 #include "chrome/browser/extensions/webstore_installer.h"
26 #include "chrome/browser/gpu/gpu_feature_checker.h" 26 #include "chrome/browser/gpu/gpu_feature_checker.h"
27 #include "chrome/browser/profiles/profile_manager.h" 27 #include "chrome/browser/profiles/profile_manager.h"
28 #include "chrome/browser/signin/token_service.h" 28 #include "chrome/browser/signin/token_service.h"
29 #include "chrome/browser/signin/token_service_factory.h" 29 #include "chrome/browser/signin/token_service_factory.h"
30 #include "chrome/browser/sync/profile_sync_service.h" 30 #include "chrome/browser/sync/profile_sync_service.h"
31 #include "chrome/browser/sync/profile_sync_service_factory.h" 31 #include "chrome/browser/sync/profile_sync_service_factory.h"
32 #include "chrome/browser/ui/app_list/app_list_util.h" 32 #include "chrome/browser/ui/app_list/app_list_service.h"
33 #include "chrome/common/chrome_notification_types.h" 33 #include "chrome/common/chrome_notification_types.h"
34 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/extensions/extension.h" 35 #include "chrome/common/extensions/extension.h"
36 #include "chrome/common/extensions/extension_constants.h" 36 #include "chrome/common/extensions/extension_constants.h"
37 #include "chrome/common/extensions/extension_l10n_util.h" 37 #include "chrome/common/extensions/extension_l10n_util.h"
38 #include "chrome/common/extensions/extension_manifest_constants.h" 38 #include "chrome/common/extensions/extension_manifest_constants.h"
39 #include "chrome/common/pref_names.h" 39 #include "chrome/common/pref_names.h"
40 #include "content/public/browser/gpu_data_manager.h" 40 #include "content/public/browser/gpu_data_manager.h"
41 #include "content/public/browser/notification_details.h" 41 #include "content/public/browser/notification_details.h"
42 #include "content/public/browser/notification_source.h" 42 #include "content/public/browser/notification_source.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 475
476 void CompleteInstallFunction::OnGetAppLauncherEnabled( 476 void CompleteInstallFunction::OnGetAppLauncherEnabled(
477 std::string id, 477 std::string id,
478 bool app_launcher_enabled) { 478 bool app_launcher_enabled) {
479 if (app_launcher_enabled) { 479 if (app_launcher_enabled) {
480 std::string name; 480 std::string name;
481 if (!approval_->parsed_manifest->GetString(extension_manifest_keys::kName, 481 if (!approval_->parsed_manifest->GetString(extension_manifest_keys::kName,
482 &name)) { 482 &name)) {
483 NOTREACHED(); 483 NOTREACHED();
484 } 484 }
485 #if defined(ENABLE_APP_LIST)
486 // Show the app list so it receives install progress notifications. 485 // Show the app list so it receives install progress notifications.
487 chrome::ShowAppList(profile()); 486 AppListService::Get()->ShowAppList(profile());
488 #endif
489 // Tell the app list about the install that we just started. 487 // Tell the app list about the install that we just started.
490 extensions::InstallTracker* tracker = 488 extensions::InstallTracker* tracker =
491 extensions::InstallTrackerFactory::GetForProfile(profile()); 489 extensions::InstallTrackerFactory::GetForProfile(profile());
492 tracker->OnBeginExtensionInstall( 490 tracker->OnBeginExtensionInstall(
493 id, name, approval_->installing_icon, is_app_); 491 id, name, approval_->installing_icon, is_app_);
494 } 492 }
495 493
496 // The extension will install through the normal extension install flow, but 494 // The extension will install through the normal extension install flow, but
497 // the whitelist entry will bypass the normal permissions install dialog. 495 // the whitelist entry will bypass the normal permissions install dialog.
498 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( 496 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 &GetIsLauncherEnabledFunction::OnIsLauncherCheckCompleted, this)); 595 &GetIsLauncherEnabledFunction::OnIsLauncherCheckCompleted, this));
598 return true; 596 return true;
599 } 597 }
600 598
601 void GetIsLauncherEnabledFunction::OnIsLauncherCheckCompleted(bool is_enabled) { 599 void GetIsLauncherEnabledFunction::OnIsLauncherCheckCompleted(bool is_enabled) {
602 SetResult(Value::CreateBooleanValue(is_enabled)); 600 SetResult(Value::CreateBooleanValue(is_enabled));
603 SendResponse(true); 601 SendResponse(true);
604 } 602 }
605 603
606 } // namespace extensions 604 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698