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

Side by Side Diff: chrome/renderer/extensions/chrome_extensions_renderer_client.cc

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/extensions/chrome_extensions_renderer_client.h" 5 #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 13 matching lines...) Expand all
24 #include "content/public/renderer/render_thread.h" 24 #include "content/public/renderer/render_thread.h"
25 #include "extensions/common/constants.h" 25 #include "extensions/common/constants.h"
26 #include "extensions/common/extension.h" 26 #include "extensions/common/extension.h"
27 #include "extensions/common/extension_set.h" 27 #include "extensions/common/extension_set.h"
28 #include "extensions/common/switches.h" 28 #include "extensions/common/switches.h"
29 #include "extensions/renderer/dispatcher.h" 29 #include "extensions/renderer/dispatcher.h"
30 #include "extensions/renderer/extension_frame_helper.h" 30 #include "extensions/renderer/extension_frame_helper.h"
31 #include "extensions/renderer/extension_helper.h" 31 #include "extensions/renderer/extension_helper.h"
32 #include "extensions/renderer/extensions_render_frame_observer.h" 32 #include "extensions/renderer/extensions_render_frame_observer.h"
33 #include "extensions/renderer/guest_view/extensions_guest_view_container.h" 33 #include "extensions/renderer/guest_view/extensions_guest_view_container.h"
34 #include "extensions/renderer/guest_view/extensions_guest_view_container_dispatc her.h"
35 #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_con tainer.h" 34 #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_con tainer.h"
36 #include "extensions/renderer/script_context.h" 35 #include "extensions/renderer/script_context.h"
37 #include "third_party/WebKit/public/platform/WebURL.h" 36 #include "third_party/WebKit/public/platform/WebURL.h"
38 #include "third_party/WebKit/public/web/WebDocument.h" 37 #include "third_party/WebKit/public/web/WebDocument.h"
39 #include "third_party/WebKit/public/web/WebLocalFrame.h" 38 #include "third_party/WebKit/public/web/WebLocalFrame.h"
40 #include "third_party/WebKit/public/web/WebPluginParams.h" 39 #include "third_party/WebKit/public/web/WebPluginParams.h"
41 40
42 using extensions::Extension; 41 using extensions::Extension;
43 42
44 namespace { 43 namespace {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // injects it using SetExtensionDispatcher(). Don't overwrite it. 138 // injects it using SetExtensionDispatcher(). Don't overwrite it.
140 if (!extension_dispatcher_) { 139 if (!extension_dispatcher_) {
141 extension_dispatcher_.reset( 140 extension_dispatcher_.reset(
142 new extensions::Dispatcher(extension_dispatcher_delegate_.get())); 141 new extensions::Dispatcher(extension_dispatcher_delegate_.get()));
143 } 142 }
144 permissions_policy_delegate_.reset( 143 permissions_policy_delegate_.reset(
145 new extensions::RendererPermissionsPolicyDelegate( 144 new extensions::RendererPermissionsPolicyDelegate(
146 extension_dispatcher_.get())); 145 extension_dispatcher_.get()));
147 resource_request_policy_.reset( 146 resource_request_policy_.reset(
148 new extensions::ResourceRequestPolicy(extension_dispatcher_.get())); 147 new extensions::ResourceRequestPolicy(extension_dispatcher_.get()));
149 guest_view_container_dispatcher_.reset(
150 new extensions::ExtensionsGuestViewContainerDispatcher());
151 148
152 thread->AddObserver(extension_dispatcher_.get()); 149 thread->AddObserver(extension_dispatcher_.get());
153 thread->AddObserver(guest_view_container_dispatcher_.get());
154 thread->AddFilter(new CastIPCDispatcher(thread->GetIOMessageLoopProxy())); 150 thread->AddFilter(new CastIPCDispatcher(thread->GetIOMessageLoopProxy()));
155 } 151 }
156 152
157 void ChromeExtensionsRendererClient::RenderFrameCreated( 153 void ChromeExtensionsRendererClient::RenderFrameCreated(
158 content::RenderFrame* render_frame) { 154 content::RenderFrame* render_frame) {
159 new extensions::ExtensionsRenderFrameObserver(render_frame); 155 new extensions::ExtensionsRenderFrameObserver(render_frame);
160 new extensions::ExtensionFrameHelper(render_frame, 156 new extensions::ExtensionFrameHelper(render_frame,
161 extension_dispatcher_.get()); 157 extension_dispatcher_.get());
162 extension_dispatcher_->OnRenderFrameCreated(render_frame); 158 extension_dispatcher_->OnRenderFrameCreated(render_frame);
163 } 159 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 content::BrowserPluginDelegate* 292 content::BrowserPluginDelegate*
297 ChromeExtensionsRendererClient::CreateBrowserPluginDelegate( 293 ChromeExtensionsRendererClient::CreateBrowserPluginDelegate(
298 content::RenderFrame* render_frame, 294 content::RenderFrame* render_frame,
299 const std::string& mime_type, 295 const std::string& mime_type,
300 const GURL& original_url) { 296 const GURL& original_url) {
301 if (mime_type == content::kBrowserPluginMimeType) 297 if (mime_type == content::kBrowserPluginMimeType)
302 return new extensions::ExtensionsGuestViewContainer(render_frame); 298 return new extensions::ExtensionsGuestViewContainer(render_frame);
303 return new extensions::MimeHandlerViewContainer(render_frame, mime_type, 299 return new extensions::MimeHandlerViewContainer(render_frame, mime_type,
304 original_url); 300 original_url);
305 } 301 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_extensions_renderer_client.h ('k') | chrome/renderer/guest_view/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698