Skip to content

Commit

Permalink
Revert 232345 "Moved extension_api to src/extensions/common"
Browse files Browse the repository at this point in the history
> Moved extension_api to src/extensions/common
> 
> This is part of the move of extensions code into the extensions
> component. This change does not move the generated API data and API
> resources.
> 
> [email protected]
> BUG=162530
> 
> Review URL: https://codereview.chromium.org/50743005

[email protected]

Review URL: https://codereview.chromium.org/59493003

git-svn-id: svn://svn.chromium.org/chrome/branches/1700/src@232965 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
[email protected] committed Nov 5, 2013
1 parent 27ae760 commit 97758f0
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/events.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/common/extension_api.h"

using extensions::api::events::Rule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/metrics/histogram.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/value_store/value_store_util.h"
#include "extensions/common/extension_api.h"
#include "chrome/common/extensions/api/extension_api.h"

namespace util = value_store_util;

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/event_router.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
Expand All @@ -36,7 +37,6 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "extensions/browser/lazy_background_task_queue.h"
#include "extensions/common/extension_api.h"
#include "extensions/common/extension_urls.h"

using base::DictionaryValue;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/extension_function.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/renderer_host/chrome_render_message_filter.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "extensions/common/extension_api.h"

using content::BrowserThread;
using content::RenderViewHost;
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/extensions/extension_function_dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
#include "chrome/browser/external_protocol/external_protocol_handler.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/chrome_render_message_filter.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/result_codes.h"
#include "extensions/common/extension_api.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
#include "webkit/common/resource_type.h"
Expand Down
8 changes: 8 additions & 0 deletions chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@
'common/extensions/api/extension_action/page_action_handler.h',
'common/extensions/api/extension_action/script_badge_handler.cc',
'common/extensions/api/extension_action/script_badge_handler.h',
'common/extensions/api/extension_api.cc',
'common/extensions/api/extension_api.h',
'common/extensions/api/extension_api_stub.cc',
'common/extensions/api/file_browser_handlers/file_browser_handler.cc',
'common/extensions/api/file_browser_handlers/file_browser_handler.h',
'common/extensions/api/file_handlers/file_handlers_parser.cc',
Expand Down Expand Up @@ -411,13 +414,17 @@
],
'conditions': [
['enable_extensions==1', {
'sources!': [
'common/extensions/api/extension_api_stub.cc',
],
'dependencies': [
'../device/bluetooth/bluetooth.gyp:device_bluetooth',
'../device/usb/usb.gyp:device_usb',
],
}, { # enable_extensions == 0
'sources/': [
['exclude', '^common/extensions/api/'],
['include', 'common/extensions/api/extension_api_stub.cc'],
['include', 'common/extensions/api/extension_action/action_info.cc'],
['include', 'common/extensions/api/extension_action/action_info.h'],
['include', 'common/extensions/api/i18n/default_locale_handler.cc'],
Expand Down Expand Up @@ -450,6 +457,7 @@
['OS != "ios"', {
'dependencies': [
'<(DEPTH)/chrome/app/policy/cloud_policy_codegen.gyp:policy',
'<(DEPTH)/chrome/common/extensions/api/api.gyp:api',
'<(DEPTH)/components/components.gyp:autofill_core_common',
'<(DEPTH)/components/nacl_common.gyp:nacl_common',
'<(DEPTH)/ipc/ipc.gyp:ipc',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/common/extension_api.h"
#include "chrome/common/extensions/api/extension_api.h"

#include <algorithm>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_COMMON_EXTENSION_API_H_
#define EXTENSIONS_COMMON_EXTENSION_API_H_
#ifndef CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_H_
#define CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_H_

#include <map>
#include <string>
Expand Down Expand Up @@ -138,4 +138,4 @@ class ExtensionAPI {

} // namespace extensions

#endif // EXTENSIONS_COMMON_EXTENSION_API_H_
#endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_H_
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Stub methods to be used when extensions are disabled
// i.e. ENABLE_EXTENSIONS is not defined

#include "extensions/common/extension_api.h"
#include "chrome/common/extensions/api/extension_api.h"

#include "extensions/common/features/feature.h"

Expand Down
2 changes: 1 addition & 1 deletion chrome/common/extensions/api/extension_api_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/common/extension_api.h"
#include "chrome/common/extensions/api/extension_api.h"

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/extensions/chrome_v8_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_split.h"
#include "base/values.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/features/base_feature_provider.h"
Expand All @@ -16,7 +17,6 @@
#include "chrome/renderer/extensions/user_script_slave.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/extension_api.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h"
#include "third_party/WebKit/public/web/WebView.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/extensions/chrome_v8_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
#include "chrome/renderer/extensions/dispatcher.h"
#include "content/public/renderer/render_view.h"
#include "extensions/common/extension_api.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/extensions/dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/crash_keys.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/common/extensions/api/messaging/message.h"
#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension.h"
Expand Down Expand Up @@ -75,7 +76,6 @@
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_api.h"
#include "extensions/common/extension_urls.h"
#include "extensions/common/features/feature.h"
#include "extensions/common/features/feature_provider.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/extensions/render_view_observer_natives.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#include "chrome/renderer/extensions/render_view_observer_natives.h"

#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/renderer/extensions/dispatcher.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_observer.h"
#include "extensions/common/extension_api.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h"

Expand Down
2 changes: 1 addition & 1 deletion chrome/renderer/extensions/v8_schema_registry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

#include "base/logging.h"
#include "base/values.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
#include "chrome/renderer/extensions/object_backed_native_handler.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/extension_api.h"

using content::V8ValueConverter;

Expand Down
14 changes: 1 addition & 13 deletions extensions/common/DEPS
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
include_rules = [
"+third_party/re2",

# Temporarily allowed includes as part of the app shell/extensions refactor.
#
# NOTE: Please do not add includes without talking to the app shell team;
# see OWNERS for this directory.
#
# TODO(benwells): Remove these. http://crbug.com/162530
"+chrome/common/extensions/api/generated_schemas.h",
"+chrome/common/extensions/extension.h",
"+chrome/common/extensions/permissions/permissions_data.h",
"+grit/common_resources.h",
"+grit/extensions_api_resources.h"
"+third_party/re2"
]
19 changes: 0 additions & 19 deletions extensions/extensions.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
'target_name': 'extensions_common',
'type': 'static_library',
'dependencies': [
# TODO(benwells): figure out what to do with the api target and
# api resources compiled into the chrome resource bundle.
# http://crbug.com/162530
'../chrome/chrome_resources.gyp:chrome_resources',
'../chrome/common/extensions/api/api.gyp:api',
'../content/content.gyp:content_common',
'../third_party/re2/re2.gyp:re2',
],
Expand All @@ -36,9 +31,6 @@
'common/event_filtering_info.h',
'common/event_matcher.cc',
'common/event_matcher.h',
'common/extension_api.cc',
'common/extension_api.h',
'common/extension_api_stub.cc',
'common/extension_paths.cc',
'common/extension_paths.h',
'common/extension_resource.cc',
Expand Down Expand Up @@ -103,17 +95,6 @@
],
# Disable c4267 warnings until we fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
'conditions': [
['enable_extensions==1', {
'sources!': [
'common/extension_api_stub.cc',
],
}, { # enable_extensions == 0
'sources!': [
'common/extension_api.cc',
],
}],
],
},
{
'target_name': 'extensions_browser',
Expand Down

0 comments on commit 97758f0

Please sign in to comment.