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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 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/profiles/profile_manager.h" 8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/app_list/app_list_service_impl.h" 9 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 void AppListControllerDelegateImpl::LaunchApp( 110 void AppListControllerDelegateImpl::LaunchApp(
111 Profile* profile, 111 Profile* profile,
112 const extensions::Extension* extension, 112 const extensions::Extension* extension,
113 AppListSource source, 113 AppListSource source,
114 int event_flags) { 114 int event_flags) {
115 AppListServiceImpl::RecordAppListAppLaunch(); 115 AppListServiceImpl::RecordAppListAppLaunch();
116 116
117 AppLaunchParams params = CreateAppLaunchParamsUserContainer( 117 AppLaunchParams params = CreateAppLaunchParamsUserContainer(
118 profile, extension, NEW_FOREGROUND_TAB, extensions::SOURCE_APP_LAUNCHER); 118 profile, extension, WindowOpenDisposition::NEW_FOREGROUND_TAB,
119 extensions::SOURCE_APP_LAUNCHER);
119 120
120 if (source != LAUNCH_FROM_UNKNOWN && 121 if (source != LAUNCH_FROM_UNKNOWN &&
121 extension->id() == extensions::kWebStoreAppId) { 122 extension->id() == extensions::kWebStoreAppId) {
122 // Set an override URL to include the source. 123 // Set an override URL to include the source.
123 GURL extension_url = extensions::AppLaunchInfo::GetFullLaunchURL(extension); 124 GURL extension_url = extensions::AppLaunchInfo::GetFullLaunchURL(extension);
124 params.override_url = net::AppendQueryParameter( 125 params.override_url = net::AppendQueryParameter(
125 extension_url, 126 extension_url,
126 extension_urls::kWebstoreSourceField, 127 extension_urls::kWebstoreSourceField,
127 AppListSourceToString(source)); 128 AppListSourceToString(source));
128 } 129 }
129 130
130 OpenApplication(params); 131 OpenApplication(params);
131 } 132 }
132 133
133 void AppListControllerDelegateImpl::ShowForProfileByPath( 134 void AppListControllerDelegateImpl::ShowForProfileByPath(
134 const base::FilePath& profile_path) { 135 const base::FilePath& profile_path) {
135 service_->SetProfilePath(profile_path); 136 service_->SetProfilePath(profile_path);
136 service_->Show(); 137 service_->Show();
137 } 138 }
138 139
139 bool AppListControllerDelegateImpl::ShouldShowUserIcon() { 140 bool AppListControllerDelegateImpl::ShouldShowUserIcon() {
140 return g_browser_process->profile_manager()->GetNumberOfProfiles() > 1; 141 return g_browser_process->profile_manager()->GetNumberOfProfiles() > 1;
141 } 142 }
142 143
143 void AppListControllerDelegateImpl::OnCloseCreateShortcutsPrompt( 144 void AppListControllerDelegateImpl::OnCloseCreateShortcutsPrompt(
144 bool created) { 145 bool created) {
145 OnCloseChildDialog(); 146 OnCloseChildDialog();
146 } 147 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_controller_delegate.cc ('k') | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698