| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/developer_private/developer_private_api.
h" | 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/devtools/devtools_window.h" | 10 #include "chrome/browser/devtools/devtools_window.h" |
| 11 #include "chrome/browser/extensions/api/developer_private/developer_private_api_
factory.h" | 11 #include "chrome/browser/extensions/api/developer_private/developer_private_api_
factory.h" |
| 12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
| 13 #include "chrome/browser/extensions/extension_system.h" | 13 #include "chrome/browser/extensions/extension_system.h" |
| 14 #include "chrome/browser/extensions/management_policy.h" | 14 #include "chrome/browser/extensions/management_policy.h" |
| 15 #include "chrome/browser/extensions/updater/extension_updater.h" | 15 #include "chrome/browser/extensions/updater/extension_updater.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 17 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
| 18 #include "chrome/browser/view_type_utils.h" | 18 #include "chrome/browser/view_type_utils.h" |
| 19 #include "chrome/common/extensions/api/developer_private.h" | 19 #include "chrome/common/extensions/api/developer_private.h" |
| 20 #include "chrome/common/extensions/manifest_url_handler.h" |
| 20 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 21 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
| 22 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 23 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
| 24 | 25 |
| 25 using content::RenderViewHost; | 26 using content::RenderViewHost; |
| 26 using extensions::DeveloperPrivateAPI; | 27 using extensions::DeveloperPrivateAPI; |
| 27 using extensions::Extension; | 28 using extensions::Extension; |
| 28 using extensions::ExtensionSystem; | 29 using extensions::ExtensionSystem; |
| 29 | 30 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 info->is_unpacked = (item.location() == Extension::LOAD); | 91 info->is_unpacked = (item.location() == Extension::LOAD); |
| 91 | 92 |
| 92 GURL icon = | 93 GURL icon = |
| 93 ExtensionIconSource::GetIconURL(&item, | 94 ExtensionIconSource::GetIconURL(&item, |
| 94 extension_misc::EXTENSION_ICON_MEDIUM, | 95 extension_misc::EXTENSION_ICON_MEDIUM, |
| 95 ExtensionIconSet::MATCH_BIGGER, | 96 ExtensionIconSet::MATCH_BIGGER, |
| 96 !info->enabled, | 97 !info->enabled, |
| 97 NULL); | 98 NULL); |
| 98 info->icon = icon.spec(); | 99 info->icon = icon.spec(); |
| 99 | 100 |
| 100 info->homepage_url.reset(new std::string(item.GetHomepageURL().spec())); | 101 info->homepage_url.reset(new std::string( |
| 102 extensions::ManifestURL::GetHomepageURL(&item).spec())); |
| 101 if (!item.options_url().is_empty()) { | 103 if (!item.options_url().is_empty()) { |
| 102 info->options_url.reset(new std::string(item.options_url().spec())); | 104 info->options_url.reset(new std::string(item.options_url().spec())); |
| 103 } | 105 } |
| 104 | 106 |
| 105 if (!item.update_url().is_empty()) { | 107 if (!item.update_url().is_empty()) { |
| 106 info->update_url.reset(new std::string( | 108 info->update_url.reset(new std::string( |
| 107 item.update_url().spec())); | 109 item.update_url().spec())); |
| 108 } | 110 } |
| 109 | 111 |
| 110 if (item.is_app()) { | 112 if (item.is_app()) { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 285 |
| 284 DevToolsWindow::OpenDevToolsWindow(host); | 286 DevToolsWindow::OpenDevToolsWindow(host); |
| 285 return true; | 287 return true; |
| 286 } | 288 } |
| 287 | 289 |
| 288 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {} | 290 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {} |
| 289 | 291 |
| 290 } // namespace api | 292 } // namespace api |
| 291 | 293 |
| 292 } // namespace extensions | 294 } // namespace extensions |
| OLD | NEW |