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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 info->id = item.id(); 58 info->id = item.id();
59 info->name = item.name(); 59 info->name = item.name();
60 info->enabled = service->IsExtensionEnabled(info->id); 60 info->enabled = service->IsExtensionEnabled(info->id);
61 info->offline_enabled = item.offline_enabled(); 61 info->offline_enabled = item.offline_enabled();
62 info->version = item.VersionString(); 62 info->version = item.VersionString();
63 info->description = item.description(); 63 info->description = item.description();
64 64
65 if (item.is_app()) { 65 if (item.is_app()) {
66 if (item.is_legacy_packaged_app()) 66 if (item.is_legacy_packaged_app())
67 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_LEGACY_PACKAGED_APP; 67 info->type = developer::ITEM_TYPE_LEGACY_PACKAGED_APP;
68 else if (item.is_hosted_app()) 68 else if (item.is_hosted_app())
69 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_HOSTED_APP; 69 info->type = developer::ITEM_TYPE_HOSTED_APP;
70 else if (item.is_platform_app()) 70 else if (item.is_platform_app())
71 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_PACKAGED_APP; 71 info->type = developer::ITEM_TYPE_PACKAGED_APP;
72 else 72 else
73 NOTREACHED(); 73 NOTREACHED();
74 } else if (item.is_theme()) { 74 } else if (item.is_theme()) {
75 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_THEME; 75 info->type = developer::ITEM_TYPE_THEME;
76 } else if (item.is_extension()) { 76 } else if (item.is_extension()) {
77 info->type = developer::DEVELOPER_PRIVATE_ITEM_TYPE_EXTENSION; 77 info->type = developer::ITEM_TYPE_EXTENSION;
78 } else { 78 } else {
79 NOTREACHED(); 79 NOTREACHED();
80 } 80 }
81 81
82 if (item.location() == Extension::LOAD) { 82 if (item.location() == Extension::LOAD) {
83 info->path.reset( 83 info->path.reset(
84 new std::string(UTF16ToUTF8(item.path().LossyDisplayName()))); 84 new std::string(UTF16ToUTF8(item.path().LossyDisplayName())));
85 } 85 }
86 86
87 info->enabled_incognito = service->IsIncognitoEnabled(item.id()); 87 info->enabled_incognito = service->IsIncognitoEnabled(item.id());
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 DevToolsWindow::OpenDevToolsWindow(host); 287 DevToolsWindow::OpenDevToolsWindow(host);
288 return true; 288 return true;
289 } 289 }
290 290
291 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {} 291 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {}
292 292
293 } // namespace api 293 } // namespace api
294 294
295 } // namespace extensions 295 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698