| OLD | NEW |
| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 &ChromeAppForLinkDelegate::OnFaviconForApp, | 265 &ChromeAppForLinkDelegate::OnFaviconForApp, |
| 266 base::Unretained(delegate), | 266 base::Unretained(delegate), |
| 267 scoped_refptr<extensions::ManagementGenerateAppForLinkFunction>( | 267 scoped_refptr<extensions::ManagementGenerateAppForLinkFunction>( |
| 268 function), | 268 function), |
| 269 context, title, launch_url), | 269 context, title, launch_url), |
| 270 &delegate->cancelable_task_tracker_); | 270 &delegate->cancelable_task_tracker_); |
| 271 | 271 |
| 272 return scoped_ptr<extensions::AppForLinkDelegate>(delegate); | 272 return scoped_ptr<extensions::AppForLinkDelegate>(delegate); |
| 273 } | 273 } |
| 274 | 274 |
| 275 bool ChromeManagementAPIDelegate::CanHostedAppsOpenInWindows() const { |
| 276 return extensions::util::CanHostedAppsOpenInWindows(); |
| 277 } |
| 278 |
| 275 bool ChromeManagementAPIDelegate::IsNewBookmarkAppsEnabled() const { | 279 bool ChromeManagementAPIDelegate::IsNewBookmarkAppsEnabled() const { |
| 276 return extensions::util::IsNewBookmarkAppsEnabled(); | 280 return extensions::util::IsNewBookmarkAppsEnabled(); |
| 277 } | 281 } |
| 278 | 282 |
| 279 void ChromeManagementAPIDelegate::EnableExtension( | 283 void ChromeManagementAPIDelegate::EnableExtension( |
| 280 content::BrowserContext* context, | 284 content::BrowserContext* context, |
| 281 const std::string& extension_id) const { | 285 const std::string& extension_id) const { |
| 282 extensions::ExtensionSystem::Get(context) | 286 extensions::ExtensionSystem::Get(context) |
| 283 ->extension_service() | 287 ->extension_service() |
| 284 ->EnableExtension(extension_id); | 288 ->EnableExtension(extension_id); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 314 | 318 |
| 315 GURL ChromeManagementAPIDelegate::GetIconURL( | 319 GURL ChromeManagementAPIDelegate::GetIconURL( |
| 316 const extensions::Extension* extension, | 320 const extensions::Extension* extension, |
| 317 int icon_size, | 321 int icon_size, |
| 318 ExtensionIconSet::MatchType match, | 322 ExtensionIconSet::MatchType match, |
| 319 bool grayscale, | 323 bool grayscale, |
| 320 bool* exists) const { | 324 bool* exists) const { |
| 321 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size, | 325 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size, |
| 322 match, grayscale, exists); | 326 match, grayscale, exists); |
| 323 } | 327 } |
| OLD | NEW |