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

Side by Side Diff: chrome/browser/extensions/api/management/chrome_management_api_delegate.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/management/chrome_management_api_delegat e.h" 5 #include "chrome/browser/extensions/api/management/chrome_management_api_delegat e.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 void ChromeManagementAPIDelegate::LaunchAppFunctionDelegate( 174 void ChromeManagementAPIDelegate::LaunchAppFunctionDelegate(
175 const extensions::Extension* extension, 175 const extensions::Extension* extension,
176 content::BrowserContext* context) const { 176 content::BrowserContext* context) const {
177 // Look at prefs to find the right launch container. 177 // Look at prefs to find the right launch container.
178 // If the user has not set a preference, the default launch value will be 178 // If the user has not set a preference, the default launch value will be
179 // returned. 179 // returned.
180 extensions::LaunchContainer launch_container = 180 extensions::LaunchContainer launch_container =
181 GetLaunchContainer(extensions::ExtensionPrefs::Get(context), extension); 181 GetLaunchContainer(extensions::ExtensionPrefs::Get(context), extension);
182 OpenApplication(AppLaunchParams( 182 OpenApplication(AppLaunchParams(Profile::FromBrowserContext(context),
183 Profile::FromBrowserContext(context), extension, launch_container, 183 extension, launch_container,
184 NEW_FOREGROUND_TAB, extensions::SOURCE_MANAGEMENT_API)); 184 WindowOpenDisposition::NEW_FOREGROUND_TAB,
185 extensions::SOURCE_MANAGEMENT_API));
185 extensions::RecordAppLaunchType(extension_misc::APP_LAUNCH_EXTENSION_API, 186 extensions::RecordAppLaunchType(extension_misc::APP_LAUNCH_EXTENSION_API,
186 extension->GetType()); 187 extension->GetType());
187 } 188 }
188 189
189 GURL ChromeManagementAPIDelegate::GetFullLaunchURL( 190 GURL ChromeManagementAPIDelegate::GetFullLaunchURL(
190 const extensions::Extension* extension) const { 191 const extensions::Extension* extension) const {
191 return extensions::AppLaunchInfo::GetFullLaunchURL(extension); 192 return extensions::AppLaunchInfo::GetFullLaunchURL(extension);
192 } 193 }
193 194
194 extensions::LaunchType ChromeManagementAPIDelegate::GetLaunchType( 195 extensions::LaunchType ChromeManagementAPIDelegate::GetLaunchType(
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 336
336 GURL ChromeManagementAPIDelegate::GetIconURL( 337 GURL ChromeManagementAPIDelegate::GetIconURL(
337 const extensions::Extension* extension, 338 const extensions::Extension* extension,
338 int icon_size, 339 int icon_size,
339 ExtensionIconSet::MatchType match, 340 ExtensionIconSet::MatchType match,
340 bool grayscale, 341 bool grayscale,
341 bool* exists) const { 342 bool* exists) const {
342 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size, 343 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size,
343 match, grayscale, exists); 344 match, grayscale, exists);
344 } 345 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698