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

Side by Side Diff: chrome/browser/extensions/api/management/chrome_management_api_delegate.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/bookmark_app_helper.h" 8 #include "chrome/browser/extensions/bookmark_app_helper.h"
9 #include "chrome/browser/extensions/chrome_extension_function_details.h" 9 #include "chrome/browser/extensions/chrome_extension_function_details.h"
10 #include "chrome/browser/extensions/chrome_requirements_checker.h" 10 #include "chrome/browser/extensions/chrome_requirements_checker.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 return scoped_ptr<extensions::UninstallDialogDelegate>( 222 return scoped_ptr<extensions::UninstallDialogDelegate>(
223 new ManagementUninstallFunctionUninstallDialogDelegate( 223 new ManagementUninstallFunctionUninstallDialogDelegate(
224 function, target_extension, show_programmatic_uninstall_ui)); 224 function, target_extension, show_programmatic_uninstall_ui));
225 } 225 }
226 226
227 bool ChromeManagementAPIDelegate::CreateAppShortcutFunctionDelegate( 227 bool ChromeManagementAPIDelegate::CreateAppShortcutFunctionDelegate(
228 extensions::ManagementCreateAppShortcutFunction* function, 228 extensions::ManagementCreateAppShortcutFunction* function,
229 const extensions::Extension* extension) const { 229 const extensions::Extension* extension) const {
230 Browser* browser = chrome::FindBrowserWithProfile( 230 Browser* browser = chrome::FindBrowserWithProfile(
231 Profile::FromBrowserContext(function->browser_context()), 231 Profile::FromBrowserContext(function->browser_context()),
232 chrome::HOST_DESKTOP_TYPE_NATIVE); 232 ui::HOST_DESKTOP_TYPE_NATIVE);
233 if (!browser) { 233 if (!browser) {
234 // Shouldn't happen if we have user gesture. 234 // Shouldn't happen if we have user gesture.
235 function->SetError( 235 function->SetError(
236 extension_management_api_constants::kNoBrowserToCreateShortcut); 236 extension_management_api_constants::kNoBrowserToCreateShortcut);
237 return false; 237 return false;
238 } 238 }
239 239
240 chrome::ShowCreateChromeAppShortcutsDialog( 240 chrome::ShowCreateChromeAppShortcutsDialog(
241 browser->window()->GetNativeWindow(), browser->profile(), extension, 241 browser->window()->GetNativeWindow(), browser->profile(), extension,
242 base::Bind(&extensions::ManagementCreateAppShortcutFunction:: 242 base::Bind(&extensions::ManagementCreateAppShortcutFunction::
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 GURL ChromeManagementAPIDelegate::GetIconURL( 319 GURL ChromeManagementAPIDelegate::GetIconURL(
320 const extensions::Extension* extension, 320 const extensions::Extension* extension,
321 int icon_size, 321 int icon_size,
322 ExtensionIconSet::MatchType match, 322 ExtensionIconSet::MatchType match,
323 bool grayscale, 323 bool grayscale,
324 bool* exists) const { 324 bool* exists) const {
325 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size, 325 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size,
326 match, grayscale, exists); 326 match, grayscale, exists);
327 } 327 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698