| 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" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 info->id = item.id(); | 57 info->id = item.id(); |
| 58 info->name = item.name(); | 58 info->name = item.name(); |
| 59 info->enabled = service->IsExtensionEnabled(info->id); | 59 info->enabled = service->IsExtensionEnabled(info->id); |
| 60 info->offline_enabled = item.offline_enabled(); | 60 info->offline_enabled = item.offline_enabled(); |
| 61 info->version = item.VersionString(); | 61 info->version = item.VersionString(); |
| 62 info->description = item.description(); | 62 info->description = item.description(); |
| 63 | 63 |
| 64 if (item.is_app()) { | 64 if (item.is_app()) { |
| 65 if (item.is_legacy_packaged_app()) | 65 if (item.is_legacy_packaged_app()) |
| 66 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_LEGACY_PACKAGED_APP; | 66 info->type = developer::ITEM_TYPE_LEGACY_PACKAGED_APP; |
| 67 else if (item.is_hosted_app()) | 67 else if (item.is_hosted_app()) |
| 68 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_HOSTED_APP; | 68 info->type = developer::ITEM_TYPE_HOSTED_APP; |
| 69 else if (item.is_platform_app()) | 69 else if (item.is_platform_app()) |
| 70 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_PACKAGED_APP; | 70 info->type = developer::ITEM_TYPE_PACKAGED_APP; |
| 71 else | 71 else |
| 72 NOTREACHED(); | 72 NOTREACHED(); |
| 73 } else if (item.is_theme()) { | 73 } else if (item.is_theme()) { |
| 74 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_THEME; | 74 info->type = developer::ITEM_TYPE_THEME; |
| 75 } else if (item.is_extension()) { | 75 } else if (item.is_extension()) { |
| 76 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_EXTENSION; | 76 info->type = developer::ITEM_TYPE_EXTENSION; |
| 77 } else { | 77 } else { |
| 78 NOTREACHED(); | 78 NOTREACHED(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 if (item.location() == Extension::LOAD) { | 81 if (item.location() == Extension::LOAD) { |
| 82 info->path.reset( | 82 info->path.reset( |
| 83 new std::string(UTF16ToUTF8(item.path().LossyDisplayName()))); | 83 new std::string(UTF16ToUTF8(item.path().LossyDisplayName()))); |
| 84 } | 84 } |
| 85 | 85 |
| 86 info->enabled_incognito = service->IsIncognitoEnabled(item.id()); | 86 info->enabled_incognito = service->IsIncognitoEnabled(item.id()); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 DevToolsWindow::OpenDevToolsWindow(host); | 284 DevToolsWindow::OpenDevToolsWindow(host); |
| 285 return true; | 285 return true; |
| 286 } | 286 } |
| 287 | 287 |
| 288 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {} | 288 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {} |
| 289 | 289 |
| 290 } // namespace api | 290 } // namespace api |
| 291 | 291 |
| 292 } // namespace extensions | 292 } // namespace extensions |
| OLD | NEW |