summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 22:04:06 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 22:04:06 +0000
commitb6cd47221942b3b7352a87d03dcce2855bed0e79 (patch)
treec027b9e8985f4a36db1cbcbecc91f366a06b54e1
parentbb1855136eab4e0ab80f204aab56b433d09f66be (diff)
downloadchromium_src-b6cd47221942b3b7352a87d03dcce2855bed0e79.zip
chromium_src-b6cd47221942b3b7352a87d03dcce2855bed0e79.tar.gz
chromium_src-b6cd47221942b3b7352a87d03dcce2855bed0e79.tar.bz2
Move renderer ExtensionHelper into //extensions
This breaks another //extensions -> //chrome circular dependency. * Split out Chrome-specific parts of ExtensionHelper to ChromeExtensionHelper * Move ExtensionHelper to //extensions * Move UserScriptScheduler to //extensions (a dependency of ExtensionHelper) * Tighten DEPS BUG=162530 TEST=compiles, existing browser_tests TBR=bbudge@chromium.org for mechanical header file move touching chrome/renderer/pepper Review URL: https://codereview.chromium.org/261733002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267647 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/shell/renderer/shell_content_renderer_client.cc2
-rw-r--r--chrome/chrome_renderer.gypi6
-rw-r--r--chrome/renderer/chrome_content_renderer_client.cc4
-rw-r--r--chrome/renderer/extensions/app_bindings.cc2
-rw-r--r--chrome/renderer/extensions/chrome_extension_helper.cc60
-rw-r--r--chrome/renderer/extensions/chrome_extension_helper.h43
-rw-r--r--chrome/renderer/extensions/tab_finder.cc2
-rw-r--r--chrome/renderer/pepper/pepper_extensions_common_host.cc2
-rw-r--r--extensions/DEPS1
-rw-r--r--extensions/extensions.gyp14
-rw-r--r--extensions/renderer/console.cc2
-rw-r--r--extensions/renderer/dispatcher.cc2
-rw-r--r--extensions/renderer/event_bindings.cc2
-rw-r--r--extensions/renderer/extension_helper.cc (renamed from chrome/renderer/extensions/extension_helper.cc)44
-rw-r--r--extensions/renderer/extension_helper.h (renamed from chrome/renderer/extensions/extension_helper.h)23
-rw-r--r--extensions/renderer/lazy_background_page_native_handler.cc2
-rw-r--r--extensions/renderer/runtime_custom_bindings.cc2
-rw-r--r--extensions/renderer/user_script_scheduler.cc (renamed from chrome/renderer/extensions/user_script_scheduler.cc)8
-rw-r--r--extensions/renderer/user_script_scheduler.h (renamed from chrome/renderer/extensions/user_script_scheduler.h)8
19 files changed, 140 insertions, 89 deletions
diff --git a/apps/shell/renderer/shell_content_renderer_client.cc b/apps/shell/renderer/shell_content_renderer_client.cc
index c2a7984..e0217fd 100644
--- a/apps/shell/renderer/shell_content_renderer_client.cc
+++ b/apps/shell/renderer/shell_content_renderer_client.cc
@@ -7,13 +7,13 @@
#include "apps/shell/common/shell_extensions_client.h"
#include "apps/shell/renderer/shell_dispatcher_delegate.h"
#include "apps/shell/renderer/shell_extensions_renderer_client.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_frame_observer_tracker.h"
#include "content/public/renderer/render_thread.h"
#include "extensions/common/extensions_client.h"
#include "extensions/renderer/dispatcher.h"
+#include "extensions/renderer/extension_helper.h"
using blink::WebFrame;
using blink::WebString;
diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi
index 949a0a8..3cff141 100644
--- a/chrome/chrome_renderer.gypi
+++ b/chrome/chrome_renderer.gypi
@@ -52,6 +52,8 @@
'renderer/extensions/app_window_custom_bindings.h',
'renderer/extensions/cast_streaming_native_handler.cc',
'renderer/extensions/cast_streaming_native_handler.h',
+ 'renderer/extensions/chrome_extension_helper.cc',
+ 'renderer/extensions/chrome_extension_helper.h',
'renderer/extensions/chrome_extensions_dispatcher_delegate.cc',
'renderer/extensions/chrome_extensions_dispatcher_delegate.h',
'renderer/extensions/chrome_extensions_renderer_client.cc',
@@ -62,8 +64,6 @@
'renderer/extensions/chrome_v8_extension_handler.h',
'renderer/extensions/extension_frame_helper.cc',
'renderer/extensions/extension_frame_helper.h',
- 'renderer/extensions/extension_helper.cc',
- 'renderer/extensions/extension_helper.h',
'renderer/extensions/extension_localization_peer.cc',
'renderer/extensions/extension_localization_peer.h',
'renderer/extensions/file_browser_handler_custom_bindings.cc',
@@ -90,8 +90,6 @@
'renderer/extensions/tab_finder.h',
'renderer/extensions/tabs_custom_bindings.cc',
'renderer/extensions/tabs_custom_bindings.h',
- 'renderer/extensions/user_script_scheduler.cc',
- 'renderer/extensions/user_script_scheduler.h',
'renderer/extensions/webstore_bindings.cc',
'renderer/extensions/webstore_bindings.h',
'renderer/isolated_world_ids.h',
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 467248e..044a9af 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -31,10 +31,10 @@
#include "chrome/renderer/chrome_render_process_observer.h"
#include "chrome/renderer/chrome_render_view_observer.h"
#include "chrome/renderer/content_settings_observer.h"
+#include "chrome/renderer/extensions/chrome_extension_helper.h"
#include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h"
#include "chrome/renderer/extensions/chrome_extensions_renderer_client.h"
#include "chrome/renderer/extensions/extension_frame_helper.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h"
#include "chrome/renderer/extensions/resource_request_policy.h"
#include "chrome/renderer/external_extension.h"
@@ -82,6 +82,7 @@
#include "extensions/common/extension_urls.h"
#include "extensions/common/switches.h"
#include "extensions/renderer/dispatcher.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/script_context.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -418,6 +419,7 @@ void ChromeContentRendererClient::RenderFrameCreated(
void ChromeContentRendererClient::RenderViewCreated(
content::RenderView* render_view) {
new extensions::ExtensionHelper(render_view, extension_dispatcher_.get());
+ new extensions::ChromeExtensionHelper(render_view);
new PageLoadHistograms(render_view);
#if defined(ENABLE_PRINTING)
new printing::PrintWebViewHelper(render_view);
diff --git a/chrome/renderer/extensions/app_bindings.cc b/chrome/renderer/extensions/app_bindings.cc
index 6e12d12..f08213c 100644
--- a/chrome/renderer/extensions/app_bindings.cc
+++ b/chrome/renderer/extensions/app_bindings.cc
@@ -11,7 +11,6 @@
#include "base/values.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/extension_messages.h"
@@ -19,6 +18,7 @@
#include "extensions/common/manifest.h"
#include "extensions/renderer/console.h"
#include "extensions/renderer/dispatcher.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/script_context.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
diff --git a/chrome/renderer/extensions/chrome_extension_helper.cc b/chrome/renderer/extensions/chrome_extension_helper.cc
new file mode 100644
index 0000000..05ffc18
--- /dev/null
+++ b/chrome/renderer/extensions/chrome_extension_helper.cc
@@ -0,0 +1,60 @@
+// Copyright 2014 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 "chrome/renderer/extensions/chrome_extension_helper.h"
+
+#include "base/strings/string16.h"
+#include "chrome/common/extensions/chrome_extension_messages.h"
+#include "chrome/renderer/web_apps.h"
+#include "content/public/common/url_constants.h"
+#include "content/public/renderer/render_view.h"
+#include "ipc/ipc_message_macros.h"
+#include "third_party/WebKit/public/web/WebView.h"
+#include "url/gurl.h"
+
+namespace extensions {
+
+ChromeExtensionHelper::ChromeExtensionHelper(content::RenderView* render_view)
+ : content::RenderViewObserver(render_view),
+ content::RenderViewObserverTracker<ChromeExtensionHelper>(render_view) {
+}
+
+ChromeExtensionHelper::~ChromeExtensionHelper() {
+}
+
+bool ChromeExtensionHelper::OnMessageReceived(
+ const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(ChromeExtensionHelper, message)
+ IPC_MESSAGE_HANDLER(ChromeExtensionMsg_GetApplicationInfo,
+ OnGetApplicationInfo)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void ChromeExtensionHelper::OnGetApplicationInfo(int page_id) {
+ WebApplicationInfo app_info;
+ if (page_id == render_view()->GetPageId()) {
+ base::string16 error;
+ web_apps::ParseWebAppFromWebDocument(
+ render_view()->GetWebView()->mainFrame(), &app_info, &error);
+ }
+
+ // Prune out any data URLs in the set of icons. The browser process expects
+ // any icon with a data URL to have originated from a favicon. We don't want
+ // to decode arbitrary data URLs in the browser process. See
+ // http://b/issue?id=1162972
+ for (size_t i = 0; i < app_info.icons.size(); ++i) {
+ if (app_info.icons[i].url.SchemeIs(content::kDataScheme)) {
+ app_info.icons.erase(app_info.icons.begin() + i);
+ --i;
+ }
+ }
+
+ Send(new ChromeExtensionHostMsg_DidGetApplicationInfo(
+ routing_id(), page_id, app_info));
+}
+
+} // namespace extensions
diff --git a/chrome/renderer/extensions/chrome_extension_helper.h b/chrome/renderer/extensions/chrome_extension_helper.h
new file mode 100644
index 0000000..e26ccda
--- /dev/null
+++ b/chrome/renderer/extensions/chrome_extension_helper.h
@@ -0,0 +1,43 @@
+// Copyright 2014 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 CHROME_RENDERER_EXTENSIONS_CHROME_EXTENSION_HELPER_H_
+#define CHROME_RENDERER_EXTENSIONS_CHROME_EXTENSION_HELPER_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/public/renderer/render_view_observer.h"
+#include "content/public/renderer/render_view_observer_tracker.h"
+
+struct WebApplicationInfo;
+
+namespace extensions {
+
+// RenderView plumbing for Chrome-specific extension features.
+// See also extensions/renderer/extension_helper.h.
+class ChromeExtensionHelper
+ : public content::RenderViewObserver,
+ public content::RenderViewObserverTracker<ChromeExtensionHelper> {
+ public:
+ explicit ChromeExtensionHelper(content::RenderView* render_view);
+ virtual ~ChromeExtensionHelper();
+
+ private:
+ // RenderViewObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // IPC message handlers.
+ void OnGetApplicationInfo(int page_id);
+
+ // The app info that we are processing. This is used when installing an app
+ // via application definition. The in-progress web app is stored here while
+ // its manifest and icons are downloaded.
+ scoped_ptr<WebApplicationInfo> pending_app_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeExtensionHelper);
+};
+
+} // namespace extensions
+
+#endif // CHROME_RENDERER_EXTENSIONS_CHROME_EXTENSION_HELPER_H_
diff --git a/chrome/renderer/extensions/tab_finder.cc b/chrome/renderer/extensions/tab_finder.cc
index 76623aa..6884622 100644
--- a/chrome/renderer/extensions/tab_finder.cc
+++ b/chrome/renderer/extensions/tab_finder.cc
@@ -4,8 +4,8 @@
#include "chrome/renderer/extensions/tab_finder.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
+#include "extensions/renderer/extension_helper.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
diff --git a/chrome/renderer/pepper/pepper_extensions_common_host.cc b/chrome/renderer/pepper/pepper_extensions_common_host.cc
index 2b8c76f..6f19ea5 100644
--- a/chrome/renderer/pepper/pepper_extensions_common_host.cc
+++ b/chrome/renderer/pepper/pepper_extensions_common_host.cc
@@ -8,10 +8,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "extensions/renderer/dispatcher.h"
+#include "extensions/renderer/extension_helper.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h"
#include "ppapi/host/host_message_context.h"
diff --git a/extensions/DEPS b/extensions/DEPS
index 4dabc14..bb58d4f 100644
--- a/extensions/DEPS
+++ b/extensions/DEPS
@@ -13,7 +13,6 @@ include_rules = [
#
# TODO(jamescook): Remove these. http://crbug.com/162530
"!chrome/browser/chrome_notification_types.h",
- "!chrome/renderer/extensions/extension_helper.h",
"!grit/common_resources.h",
'!grit/extensions_api_resources.h',
# This is needed for renderer JS sources which should eventually move to
diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp
index faa7790..4411dae6 100644
--- a/extensions/extensions.gyp
+++ b/extensions/extensions.gyp
@@ -413,6 +413,11 @@
{
'target_name': 'extensions_renderer',
'type': 'static_library',
+ 'dependencies': [
+ 'extensions_resources.gyp:extensions_resources',
+ '../chrome/chrome_resources.gyp:chrome_resources',
+ '../third_party/WebKit/public/blink.gyp:blink',
+ ],
'include_dirs': [
'..',
],
@@ -448,6 +453,8 @@
'renderer/dom_activity_logger.h',
'renderer/event_bindings.cc',
'renderer/event_bindings.h',
+ 'renderer/extension_helper.cc',
+ 'renderer/extension_helper.h',
'renderer/extensions_renderer_client.cc',
'renderer/extensions_renderer_client.h',
'renderer/extension_groups.h',
@@ -498,6 +505,8 @@
'renderer/test_features_native_handler.h',
'renderer/user_gestures_native_handler.cc',
'renderer/user_gestures_native_handler.h',
+ 'renderer/user_script_scheduler.cc',
+ 'renderer/user_script_scheduler.h',
'renderer/user_script_slave.cc',
'renderer/user_script_slave.h',
'renderer/utils_native_handler.cc',
@@ -507,11 +516,6 @@
'renderer/v8_schema_registry.cc',
'renderer/v8_schema_registry.h',
],
- 'dependencies': [
- 'extensions_resources.gyp:extensions_resources',
- '../chrome/chrome_resources.gyp:chrome_resources',
- '../third_party/WebKit/public/blink.gyp:blink',
- ],
# Disable c4267 warnings until we fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
'conditions': [
diff --git a/extensions/renderer/console.cc b/extensions/renderer/console.cc
index f7ae995..7429104 100644
--- a/extensions/renderer/console.cc
+++ b/extensions/renderer/console.cc
@@ -10,10 +10,10 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_visitor.h"
#include "extensions/renderer/dispatcher.h"
+#include "extensions/renderer/extension_helper.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 93fa434..75b2e43 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -13,7 +13,6 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/values.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/render_thread.h"
@@ -50,6 +49,7 @@
#include "extensions/renderer/dom_activity_logger.h"
#include "extensions/renderer/event_bindings.h"
#include "extensions/renderer/extension_groups.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/extensions_renderer_client.h"
#include "extensions/renderer/file_system_natives.h"
#include "extensions/renderer/i18n_custom_bindings.h"
diff --git a/extensions/renderer/event_bindings.cc b/extensions/renderer/event_bindings.cc
index 0ebd08e..331e6512 100644
--- a/extensions/renderer/event_bindings.cc
+++ b/extensions/renderer/event_bindings.cc
@@ -13,7 +13,6 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/v8_value_converter.h"
@@ -23,6 +22,7 @@
#include "extensions/common/manifest_handlers/background_info.h"
#include "extensions/common/value_counter.h"
#include "extensions/renderer/dispatcher.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/object_backed_native_handler.h"
#include "url/gurl.h"
#include "v8/include/v8.h"
diff --git a/chrome/renderer/extensions/extension_helper.cc b/extensions/renderer/extension_helper.cc
index 885b107..915097b 100644
--- a/chrome/renderer/extensions/extension_helper.cc
+++ b/extensions/renderer/extension_helper.cc
@@ -1,23 +1,10 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 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 "chrome/renderer/extensions/extension_helper.h"
+#include "extensions/renderer/extension_helper.h"
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "base/command_line.h"
-#include "base/json/json_string_value_serializer.h"
#include "base/lazy_instance.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/extensions/chrome_extension_messages.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/url_constants.h"
-#include "chrome/renderer/extensions/chrome_v8_context.h"
-#include "chrome/renderer/extensions/user_script_scheduler.h"
-#include "chrome/renderer/web_apps.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_visitor.h"
#include "extensions/common/api/messaging/message.h"
@@ -26,6 +13,7 @@
#include "extensions/renderer/console.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/messaging_bindings.h"
+#include "extensions/renderer/user_script_scheduler.h"
#include "extensions/renderer/user_script_slave.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
@@ -143,7 +131,6 @@ ExtensionHelper::ExtensionHelper(content::RenderView* render_view,
: content::RenderViewObserver(render_view),
content::RenderViewObserverTracker<ExtensionHelper>(render_view),
dispatcher_(dispatcher),
- pending_app_icon_requests_(0),
view_type_(VIEW_TYPE_INVALID),
tab_id_(-1),
browser_window_id_(-1) {
@@ -163,8 +150,6 @@ bool ExtensionHelper::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ExtensionMsg_DispatchOnDisconnect,
OnExtensionDispatchOnDisconnect)
IPC_MESSAGE_HANDLER(ExtensionMsg_ExecuteCode, OnExecuteCode)
- IPC_MESSAGE_HANDLER(ChromeExtensionMsg_GetApplicationInfo,
- OnGetApplicationInfo)
IPC_MESSAGE_HANDLER(ExtensionMsg_SetTabId, OnSetTabId)
IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateBrowserWindowId,
OnUpdateBrowserWindowId)
@@ -330,29 +315,6 @@ void ExtensionHelper::OnExecuteCode(
i->second->ExecuteCode(params);
}
-void ExtensionHelper::OnGetApplicationInfo(int page_id) {
- WebApplicationInfo app_info;
- if (page_id == render_view()->GetPageId()) {
- base::string16 error;
- web_apps::ParseWebAppFromWebDocument(
- render_view()->GetWebView()->mainFrame(), &app_info, &error);
- }
-
- // Prune out any data URLs in the set of icons. The browser process expects
- // any icon with a data URL to have originated from a favicon. We don't want
- // to decode arbitrary data URLs in the browser process. See
- // http://b/issue?id=1162972
- for (size_t i = 0; i < app_info.icons.size(); ++i) {
- if (app_info.icons[i].url.SchemeIs(content::kDataScheme)) {
- app_info.icons.erase(app_info.icons.begin() + i);
- --i;
- }
- }
-
- Send(new ChromeExtensionHostMsg_DidGetApplicationInfo(
- routing_id(), page_id, app_info));
-}
-
void ExtensionHelper::OnNotifyRendererViewType(ViewType type) {
view_type_ = type;
}
diff --git a/chrome/renderer/extensions/extension_helper.h b/extensions/renderer/extension_helper.h
index c06a5f0..486db54 100644
--- a/chrome/renderer/extensions/extension_helper.h
+++ b/extensions/renderer/extension_helper.h
@@ -1,26 +1,21 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 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 CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
-#define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
+#ifndef EXTENSIONS_RENDERER_EXTENSION_HELPER_H_
+#define EXTENSIONS_RENDERER_EXTENSION_HELPER_H_
-#include <map>
#include <vector>
-#include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
#include "content/public/common/console_message_level.h"
#include "content/public/renderer/render_view_observer.h"
#include "content/public/renderer/render_view_observer_tracker.h"
#include "extensions/common/view_type.h"
-#include "third_party/WebKit/public/platform/WebURLResponse.h"
class GURL;
class SkBitmap;
struct ExtensionMsg_ExecuteCode_Params;
struct ExtensionMsg_ExternalConnectionInfo;
-struct WebApplicationInfo;
namespace base {
class DictionaryValue;
@@ -92,7 +87,6 @@ class ExtensionHelper
void OnExtensionDispatchOnDisconnect(int port_id,
const std::string& error_message);
void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params);
- void OnGetApplicationInfo(int page_id);
void OnNotifyRendererViewType(ViewType view_type);
void OnSetTabId(int tab_id);
void OnUpdateBrowserWindowId(int window_id);
@@ -102,15 +96,6 @@ class ExtensionHelper
Dispatcher* dispatcher_;
- // The app info that we are processing. This is used when installing an app
- // via application definition. The in-progress web app is stored here while
- // its manifest and icons are downloaded.
- scoped_ptr<WebApplicationInfo> pending_app_info_;
-
- // The number of app icon requests outstanding. When this reaches zero, we're
- // done processing an app definition file.
- int pending_app_icon_requests_;
-
// Type of view attached with RenderView.
ViewType view_type_;
@@ -125,4 +110,4 @@ class ExtensionHelper
} // namespace extensions
-#endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
+#endif // EXTENSIONS_RENDERER_EXTENSION_HELPER_H_
diff --git a/extensions/renderer/lazy_background_page_native_handler.cc b/extensions/renderer/lazy_background_page_native_handler.cc
index b7c72cd..c8a31fe 100644
--- a/extensions/renderer/lazy_background_page_native_handler.cc
+++ b/extensions/renderer/lazy_background_page_native_handler.cc
@@ -5,10 +5,10 @@
#include "extensions/renderer/lazy_background_page_native_handler.h"
#include "base/bind.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/manifest_handlers/background_info.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/script_context.h"
namespace extensions {
diff --git a/extensions/renderer/runtime_custom_bindings.cc b/extensions/renderer/runtime_custom_bindings.cc
index 7ed2ad2..3815abc 100644
--- a/extensions/renderer/runtime_custom_bindings.cc
+++ b/extensions/renderer/runtime_custom_bindings.cc
@@ -7,7 +7,6 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/extension.h"
@@ -16,6 +15,7 @@
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/manifest.h"
#include "extensions/renderer/api_activity_logger.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/script_context.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
diff --git a/chrome/renderer/extensions/user_script_scheduler.cc b/extensions/renderer/user_script_scheduler.cc
index 1ff5445..9c82fb7a 100644
--- a/chrome/renderer/extensions/user_script_scheduler.cc
+++ b/extensions/renderer/user_script_scheduler.cc
@@ -1,15 +1,12 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 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 "chrome/renderer/extensions/user_script_scheduler.h"
+#include "extensions/renderer/user_script_scheduler.h"
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
-#include "chrome/renderer/chrome_render_process_observer.h"
-#include "chrome/renderer/extensions/chrome_v8_context.h"
-#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/v8_value_converter.h"
#include "extensions/common/error_utils.h"
@@ -19,6 +16,7 @@
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/dom_activity_logger.h"
#include "extensions/renderer/extension_groups.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/user_script_slave.h"
#include "third_party/WebKit/public/platform/WebString.h"
diff --git a/chrome/renderer/extensions/user_script_scheduler.h b/extensions/renderer/user_script_scheduler.h
index 5dc24f8..4e8a45b 100644
--- a/chrome/renderer/extensions/user_script_scheduler.h
+++ b/extensions/renderer/user_script_scheduler.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 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 CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SCHEDULER_H_
-#define CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SCHEDULER_H_
+#ifndef EXTENSIONS_RENDERER_USER_SCRIPT_SCHEDULER_H_
+#define EXTENSIONS_RENDERER_USER_SCRIPT_SCHEDULER_H_
#include <map>
#include <queue>
@@ -92,4 +92,4 @@ class UserScriptScheduler {
} // namespace extensions
-#endif // CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SCHEDULER_H_
+#endif // EXTENSIONS_RENDERER_USER_SCRIPT_SCHEDULER_H_