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

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

Issue 1130353010: Remove deprecated ExtensionService::GetInstalledExtension() usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed if to iff Created 5 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/app_list_controller_delegate_impl.h" 5 #include "chrome/browser/ui/app_list/app_list_controller_delegate_impl.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile_manager.h" 8 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/app_list/app_list_service_impl.h" 9 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
11 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
12 #include "chrome/browser/ui/browser_dialogs.h" 11 #include "chrome/browser/ui/browser_dialogs.h"
13 #include "chrome/browser/ui/browser_navigator.h" 12 #include "chrome/browser/ui/browser_navigator.h"
14 #include "chrome/browser/ui/extensions/app_launch_params.h" 13 #include "chrome/browser/ui/extensions/app_launch_params.h"
15 #include "chrome/browser/ui/extensions/application_launch.h" 14 #include "chrome/browser/ui/extensions/application_launch.h"
16 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" 15 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
17 #include "extensions/browser/extension_system.h" 16 #include "extensions/browser/extension_registry.h"
18 #include "extensions/common/constants.h" 17 #include "extensions/common/constants.h"
19 #include "extensions/common/extension.h" 18 #include "extensions/common/extension.h"
20 #include "net/base/url_util.h" 19 #include "net/base/url_util.h"
21 #include "ui/gfx/image/image_skia.h" 20 #include "ui/gfx/image/image_skia.h"
22 21
23 AppListControllerDelegateImpl::AppListControllerDelegateImpl( 22 AppListControllerDelegateImpl::AppListControllerDelegateImpl(
24 AppListService* service) 23 AppListService* service)
25 : service_(service) {} 24 : service_(service) {}
26 25
27 AppListControllerDelegateImpl::~AppListControllerDelegateImpl() {} 26 AppListControllerDelegateImpl::~AppListControllerDelegateImpl() {}
(...skipping 29 matching lines...) Expand all
57 } 56 }
58 57
59 bool AppListControllerDelegateImpl::CanDoCreateShortcutsFlow() { 58 bool AppListControllerDelegateImpl::CanDoCreateShortcutsFlow() {
60 return false; 59 return false;
61 } 60 }
62 61
63 void AppListControllerDelegateImpl::DoCreateShortcutsFlow( 62 void AppListControllerDelegateImpl::DoCreateShortcutsFlow(
64 Profile* profile, 63 Profile* profile,
65 const std::string& extension_id) { 64 const std::string& extension_id) {
66 DCHECK(CanDoCreateShortcutsFlow()); 65 DCHECK(CanDoCreateShortcutsFlow());
67 ExtensionService* service = 66 extensions::ExtensionRegistry* registry =
68 extensions::ExtensionSystem::Get(profile)->extension_service(); 67 extensions::ExtensionRegistry::Get(profile);
69 DCHECK(service); 68 const extensions::Extension* extension = registry->GetInstalledExtension(
70 const extensions::Extension* extension = service->GetInstalledExtension(
71 extension_id); 69 extension_id);
72 DCHECK(extension); 70 DCHECK(extension);
73 71
74 gfx::NativeWindow parent_window = GetAppListWindow(); 72 gfx::NativeWindow parent_window = GetAppListWindow();
75 if (!parent_window) 73 if (!parent_window)
76 return; 74 return;
77 OnShowChildDialog(); 75 OnShowChildDialog();
78 chrome::ShowCreateChromeAppShortcutsDialog( 76 chrome::ShowCreateChromeAppShortcutsDialog(
79 parent_window, profile, extension, 77 parent_window, profile, extension,
80 base::Bind(&AppListControllerDelegateImpl::OnCloseCreateShortcutsPrompt, 78 base::Bind(&AppListControllerDelegateImpl::OnCloseCreateShortcutsPrompt,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool AppListControllerDelegateImpl::ShouldShowUserIcon() { 136 bool AppListControllerDelegateImpl::ShouldShowUserIcon() {
139 return g_browser_process->profile_manager()->GetNumberOfProfiles() > 1; 137 return g_browser_process->profile_manager()->GetNumberOfProfiles() > 1;
140 } 138 }
141 139
142 void AppListControllerDelegateImpl::FillLaunchParams(AppLaunchParams* params) {} 140 void AppListControllerDelegateImpl::FillLaunchParams(AppLaunchParams* params) {}
143 141
144 void AppListControllerDelegateImpl::OnCloseCreateShortcutsPrompt( 142 void AppListControllerDelegateImpl::OnCloseCreateShortcutsPrompt(
145 bool created) { 143 bool created) {
146 OnCloseChildDialog(); 144 OnCloseChildDialog();
147 } 145 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_controller_delegate.cc ('k') | chrome/browser/ui/app_list/app_list_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698