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

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

Issue 518653002: Add the "options_ui" extension manifest field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 (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 "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "apps/app_window.h" 8 #include "apps/app_window.h"
9 #include "apps/app_window_registry.h" 9 #include "apps/app_window_registry.h"
10 #include "apps/saved_files_service.h" 10 #include "apps/saved_files_service.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "extensions/browser/view_type_utils.h" 57 #include "extensions/browser/view_type_utils.h"
58 #include "extensions/common/constants.h" 58 #include "extensions/common/constants.h"
59 #include "extensions/common/extension_resource.h" 59 #include "extensions/common/extension_resource.h"
60 #include "extensions/common/extension_set.h" 60 #include "extensions/common/extension_set.h"
61 #include "extensions/common/install_warning.h" 61 #include "extensions/common/install_warning.h"
62 #include "extensions/common/manifest.h" 62 #include "extensions/common/manifest.h"
63 #include "extensions/common/manifest_handlers/background_info.h" 63 #include "extensions/common/manifest_handlers/background_info.h"
64 #include "extensions/common/manifest_handlers/icons_handler.h" 64 #include "extensions/common/manifest_handlers/icons_handler.h"
65 #include "extensions/common/manifest_handlers/incognito_info.h" 65 #include "extensions/common/manifest_handlers/incognito_info.h"
66 #include "extensions/common/manifest_handlers/offline_enabled_info.h" 66 #include "extensions/common/manifest_handlers/offline_enabled_info.h"
67 #include "extensions/common/manifest_handlers/options_page_info.h"
67 #include "extensions/common/permissions/permissions_data.h" 68 #include "extensions/common/permissions/permissions_data.h"
68 #include "extensions/common/switches.h" 69 #include "extensions/common/switches.h"
69 #include "grit/theme_resources.h" 70 #include "grit/theme_resources.h"
70 #include "net/base/net_util.h" 71 #include "net/base/net_util.h"
71 #include "ui/base/l10n/l10n_util.h" 72 #include "ui/base/l10n/l10n_util.h"
72 #include "ui/base/resource/resource_bundle.h" 73 #include "ui/base/resource/resource_bundle.h"
73 #include "ui/base/webui/web_ui_util.h" 74 #include "ui/base/webui/web_ui_util.h"
74 #include "webkit/browser/fileapi/external_mount_points.h" 75 #include "webkit/browser/fileapi/external_mount_points.h"
75 #include "webkit/browser/fileapi/file_system_context.h" 76 #include "webkit/browser/fileapi/file_system_context.h"
76 #include "webkit/browser/fileapi/file_system_operation.h" 77 #include "webkit/browser/fileapi/file_system_operation.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 info->incognito_enabled = util::IsIncognitoEnabled(item.id(), GetProfile()); 426 info->incognito_enabled = util::IsIncognitoEnabled(item.id(), GetProfile());
426 info->wants_file_access = item.wants_file_access(); 427 info->wants_file_access = item.wants_file_access();
427 info->allow_file_access = util::AllowFileAccess(item.id(), GetProfile()); 428 info->allow_file_access = util::AllowFileAccess(item.id(), GetProfile());
428 info->allow_reload = Manifest::IsUnpackedLocation(item.location()); 429 info->allow_reload = Manifest::IsUnpackedLocation(item.location());
429 info->is_unpacked = Manifest::IsUnpackedLocation(item.location()); 430 info->is_unpacked = Manifest::IsUnpackedLocation(item.location());
430 info->terminated = registry->terminated_extensions().Contains(item.id()); 431 info->terminated = registry->terminated_extensions().Contains(item.id());
431 info->allow_incognito = item.can_be_incognito_enabled(); 432 info->allow_incognito = item.can_be_incognito_enabled();
432 433
433 info->homepage_url.reset(new std::string( 434 info->homepage_url.reset(new std::string(
434 ManifestURL::GetHomepageURL(&item).spec())); 435 ManifestURL::GetHomepageURL(&item).spec()));
435 if (!ManifestURL::GetOptionsPage(&item).is_empty()) { 436 if (!OptionsPageInfo::GetOptionsPage(&item).is_empty()) {
436 info->options_url.reset( 437 info->options_url.reset(
437 new std::string(ManifestURL::GetOptionsPage(&item).spec())); 438 new std::string(OptionsPageInfo::GetOptionsPage(&item).spec()));
438 } 439 }
439 440
440 if (!ManifestURL::GetUpdateURL(&item).is_empty()) { 441 if (!ManifestURL::GetUpdateURL(&item).is_empty()) {
441 info->update_url.reset( 442 info->update_url.reset(
442 new std::string(ManifestURL::GetUpdateURL(&item).spec())); 443 new std::string(ManifestURL::GetUpdateURL(&item).spec()));
443 } 444 }
444 445
445 if (item.is_app()) { 446 if (item.is_app()) {
446 info->app_launch_url.reset( 447 info->app_launch_url.reset(
447 new std::string(AppLaunchInfo::GetFullLaunchURL(&item).spec())); 448 new std::string(AppLaunchInfo::GetFullLaunchURL(&item).spec()));
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 } 1397 }
1397 1398
1398 error_ui_util::HandleOpenDevTools(dict); 1399 error_ui_util::HandleOpenDevTools(dict);
1399 1400
1400 return true; 1401 return true;
1401 } 1402 }
1402 1403
1403 } // namespace api 1404 } // namespace api
1404 1405
1405 } // namespace extensions 1406 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698