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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 (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/ui/app_list/app_list_controller_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_util.h" 8 #include "chrome/browser/extensions/extension_util.h"
9 #include "chrome/browser/extensions/install_tracker_factory.h" 9 #include "chrome/browser/extensions/install_tracker_factory.h"
10 #include "chrome/browser/extensions/launch_util.h" 10 #include "chrome/browser/extensions/launch_util.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 const std::string source = AppListSourceToString( 143 const std::string source = AppListSourceToString(
144 is_search_result ? 144 is_search_result ?
145 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH : 145 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH :
146 AppListControllerDelegate::LAUNCH_FROM_APP_LIST); 146 AppListControllerDelegate::LAUNCH_FROM_APP_LIST);
147 chrome::NavigateParams params( 147 chrome::NavigateParams params(
148 profile, 148 profile,
149 net::AppendQueryParameter(url, 149 net::AppendQueryParameter(url,
150 extension_urls::kWebstoreSourceField, 150 extension_urls::kWebstoreSourceField,
151 source), 151 source),
152 content::PAGE_TRANSITION_LINK); 152 ui::PAGE_TRANSITION_LINK);
153 chrome::Navigate(&params); 153 chrome::Navigate(&params);
154 } 154 }
155 155
156 bool AppListControllerDelegate::HasOptionsPage( 156 bool AppListControllerDelegate::HasOptionsPage(
157 Profile* profile, 157 Profile* profile,
158 const std::string& app_id) { 158 const std::string& app_id) {
159 const extensions::Extension* extension = GetExtension(profile, app_id); 159 const extensions::Extension* extension = GetExtension(profile, app_id);
160 return extensions::util::IsAppLaunchableWithoutEnabling(app_id, profile) && 160 return extensions::util::IsAppLaunchableWithoutEnabling(app_id, profile) &&
161 extension && extensions::OptionsPageInfo::HasOptionsPage(extension); 161 extension && extensions::OptionsPageInfo::HasOptionsPage(extension);
162 } 162 }
163 163
164 void AppListControllerDelegate::ShowOptionsPage( 164 void AppListControllerDelegate::ShowOptionsPage(
165 Profile* profile, 165 Profile* profile,
166 const std::string& app_id) { 166 const std::string& app_id) {
167 const extensions::Extension* extension = GetExtension(profile, app_id); 167 const extensions::Extension* extension = GetExtension(profile, app_id);
168 if (!extension) 168 if (!extension)
169 return; 169 return;
170 170
171 chrome::NavigateParams params( 171 chrome::NavigateParams params(
172 profile, 172 profile,
173 extensions::OptionsPageInfo::GetOptionsPage(extension), 173 extensions::OptionsPageInfo::GetOptionsPage(extension),
174 content::PAGE_TRANSITION_LINK); 174 ui::PAGE_TRANSITION_LINK);
175 chrome::Navigate(&params); 175 chrome::Navigate(&params);
176 } 176 }
177 177
178 extensions::LaunchType AppListControllerDelegate::GetExtensionLaunchType( 178 extensions::LaunchType AppListControllerDelegate::GetExtensionLaunchType(
179 Profile* profile, 179 Profile* profile,
180 const std::string& app_id) { 180 const std::string& app_id) {
181 return extensions::GetLaunchType(extensions::ExtensionPrefs::Get(profile), 181 return extensions::GetLaunchType(extensions::ExtensionPrefs::Get(profile),
182 GetExtension(profile, app_id)); 182 GetExtension(profile, app_id));
183 } 183 }
184 184
(...skipping 26 matching lines...) Expand all
211 out_apps->InsertAll(registry->enabled_extensions()); 211 out_apps->InsertAll(registry->enabled_extensions());
212 out_apps->InsertAll(registry->disabled_extensions()); 212 out_apps->InsertAll(registry->disabled_extensions());
213 out_apps->InsertAll(registry->terminated_extensions()); 213 out_apps->InsertAll(registry->terminated_extensions());
214 } 214 }
215 215
216 void AppListControllerDelegate::OnSearchStarted() { 216 void AppListControllerDelegate::OnSearchStarted() {
217 #if defined(ENABLE_RLZ) 217 #if defined(ENABLE_RLZ)
218 RLZTracker::RecordAppListSearch(); 218 RLZTracker::RecordAppListSearch();
219 #endif 219 #endif
220 } 220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698