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

Unified Diff: extensions/shell/renderer/shell_content_renderer_client.cc

Issue 412713002: Move apps/shell to extensions/shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 40% Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: extensions/shell/renderer/shell_content_renderer_client.cc
diff --git a/apps/shell/renderer/shell_content_renderer_client.cc b/extensions/shell/renderer/shell_content_renderer_client.cc
similarity index 76%
rename from apps/shell/renderer/shell_content_renderer_client.cc
rename to extensions/shell/renderer/shell_content_renderer_client.cc
index 70e0698ce500e9aa73a8e830d7b6be9764709fbc..c7a9be6d227da2969d9efe8679714e2bbd002368 100644
--- a/apps/shell/renderer/shell_content_renderer_client.cc
+++ b/extensions/shell/renderer/shell_content_renderer_client.cc
@@ -2,12 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/shell/renderer/shell_content_renderer_client.h"
+#include "extensions/shell/renderer/shell_content_renderer_client.h"
-#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 "apps/shell/renderer/shell_renderer_main_delegate.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"
@@ -15,12 +11,16 @@
#include "extensions/common/extensions_client.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/extension_helper.h"
+#include "extensions/shell/common/shell_extensions_client.h"
+#include "extensions/shell/renderer/shell_dispatcher_delegate.h"
+#include "extensions/shell/renderer/shell_extensions_renderer_client.h"
+#include "extensions/shell/renderer/shell_renderer_main_delegate.h"
using blink::WebFrame;
using blink::WebString;
using content::RenderThread;
-namespace apps {
+namespace extensions {
namespace {
@@ -30,7 +30,7 @@ class ShellFrameHelper
public content::RenderFrameObserverTracker<ShellFrameHelper> {
public:
ShellFrameHelper(content::RenderFrame* render_frame,
- extensions::Dispatcher* extension_dispatcher);
+ Dispatcher* extension_dispatcher);
virtual ~ShellFrameHelper();
// RenderFrameObserver implementation.
@@ -38,18 +38,20 @@ class ShellFrameHelper
int world_id) OVERRIDE;
private:
- extensions::Dispatcher* extension_dispatcher_;
+ Dispatcher* extension_dispatcher_;
DISALLOW_COPY_AND_ASSIGN(ShellFrameHelper);
};
ShellFrameHelper::ShellFrameHelper(content::RenderFrame* render_frame,
- extensions::Dispatcher* extension_dispatcher)
+ Dispatcher* extension_dispatcher)
: content::RenderFrameObserver(render_frame),
content::RenderFrameObserverTracker<ShellFrameHelper>(render_frame),
- extension_dispatcher_(extension_dispatcher) {}
+ extension_dispatcher_(extension_dispatcher) {
+}
-ShellFrameHelper::~ShellFrameHelper() {}
+ShellFrameHelper::~ShellFrameHelper() {
+}
void ShellFrameHelper::WillReleaseScriptContext(v8::Handle<v8::Context> context,
int world_id) {
@@ -64,22 +66,23 @@ ShellContentRendererClient::ShellContentRendererClient(
: delegate_(delegate.Pass()) {
}
-ShellContentRendererClient::~ShellContentRendererClient() {}
+ShellContentRendererClient::~ShellContentRendererClient() {
+}
void ShellContentRendererClient::RenderThreadStarted() {
RenderThread* thread = RenderThread::Get();
extensions_client_.reset(new ShellExtensionsClient);
- extensions::ExtensionsClient::Set(extensions_client_.get());
+ ExtensionsClient::Set(extensions_client_.get());
extensions_renderer_client_.reset(new ShellExtensionsRendererClient);
- extensions::ExtensionsRendererClient::Set(extensions_renderer_client_.get());
+ ExtensionsRendererClient::Set(extensions_renderer_client_.get());
extension_dispatcher_delegate_.reset(new ShellDispatcherDelegate());
// Must be initialized after ExtensionsRendererClient.
extension_dispatcher_.reset(
- new extensions::Dispatcher(extension_dispatcher_delegate_.get()));
+ new Dispatcher(extension_dispatcher_delegate_.get()));
thread->AddObserver(extension_dispatcher_.get());
// TODO(jamescook): Init WebSecurityPolicy for chrome-extension: schemes.
@@ -96,7 +99,7 @@ void ShellContentRendererClient::RenderFrameCreated(
void ShellContentRendererClient::RenderViewCreated(
content::RenderView* render_view) {
- new extensions::ExtensionHelper(render_view, extension_dispatcher_.get());
+ new ExtensionHelper(render_view, extension_dispatcher_.get());
if (delegate_)
delegate_->OnViewCreated(render_view);
}
@@ -112,7 +115,9 @@ bool ShellContentRendererClient::WillSendRequest(
}
void ShellContentRendererClient::DidCreateScriptContext(
- WebFrame* frame, v8::Handle<v8::Context> context, int extension_group,
+ WebFrame* frame,
+ v8::Handle<v8::Context> context,
+ int extension_group,
int world_id) {
extension_dispatcher_->DidCreateScriptContext(
frame, context, extension_group, world_id);
@@ -123,4 +128,4 @@ bool ShellContentRendererClient::ShouldEnableSiteIsolationPolicy() const {
return false;
}
-} // namespace apps
+} // namespace extensions
« no previous file with comments | « extensions/shell/renderer/shell_content_renderer_client.h ('k') | extensions/shell/renderer/shell_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698