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

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

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 years, 10 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/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/bookmark_app_helper.h" 10 #include "chrome/browser/extensions/bookmark_app_helper.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 bool show_programmatic_uninstall_ui) const { 236 bool show_programmatic_uninstall_ui) const {
237 return scoped_ptr<extensions::UninstallDialogDelegate>( 237 return scoped_ptr<extensions::UninstallDialogDelegate>(
238 new ManagementUninstallFunctionUninstallDialogDelegate( 238 new ManagementUninstallFunctionUninstallDialogDelegate(
239 function, target_extension, show_programmatic_uninstall_ui)); 239 function, target_extension, show_programmatic_uninstall_ui));
240 } 240 }
241 241
242 bool ChromeManagementAPIDelegate::CreateAppShortcutFunctionDelegate( 242 bool ChromeManagementAPIDelegate::CreateAppShortcutFunctionDelegate(
243 extensions::ManagementCreateAppShortcutFunction* function, 243 extensions::ManagementCreateAppShortcutFunction* function,
244 const extensions::Extension* extension) const { 244 const extensions::Extension* extension) const {
245 Browser* browser = chrome::FindBrowserWithProfile( 245 Browser* browser = chrome::FindBrowserWithProfile(
246 Profile::FromBrowserContext(function->browser_context()), 246 Profile::FromBrowserContext(function->browser_context()));
247 chrome::HOST_DESKTOP_TYPE_NATIVE);
248 if (!browser) { 247 if (!browser) {
249 // Shouldn't happen if we have user gesture. 248 // Shouldn't happen if we have user gesture.
250 function->SetError( 249 function->SetError(
251 extension_management_api_constants::kNoBrowserToCreateShortcut); 250 extension_management_api_constants::kNoBrowserToCreateShortcut);
252 return false; 251 return false;
253 } 252 }
254 253
255 chrome::ShowCreateChromeAppShortcutsDialog( 254 chrome::ShowCreateChromeAppShortcutsDialog(
256 browser->window()->GetNativeWindow(), browser->profile(), extension, 255 browser->window()->GetNativeWindow(), browser->profile(), extension,
257 base::Bind(&extensions::ManagementCreateAppShortcutFunction:: 256 base::Bind(&extensions::ManagementCreateAppShortcutFunction::
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 332
334 GURL ChromeManagementAPIDelegate::GetIconURL( 333 GURL ChromeManagementAPIDelegate::GetIconURL(
335 const extensions::Extension* extension, 334 const extensions::Extension* extension,
336 int icon_size, 335 int icon_size,
337 ExtensionIconSet::MatchType match, 336 ExtensionIconSet::MatchType match,
338 bool grayscale, 337 bool grayscale,
339 bool* exists) const { 338 bool* exists) const {
340 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size, 339 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size,
341 match, grayscale, exists); 340 match, grayscale, exists);
342 } 341 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.cc ('k') | chrome/browser/extensions/api/management/management_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698