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

Side by Side Diff: extensions/shell/renderer/shell_content_renderer_client.cc

Issue 1181493002: [Patch 3 of 6] Split out content/child's SiteIsolationPolicy into two new classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_policy_to_sniffer2
Patch Set: Add crbug. Created 5 years, 6 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
« no previous file with comments | « extensions/shell/renderer/shell_content_renderer_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "extensions/shell/renderer/shell_content_renderer_client.h" 5 #include "extensions/shell/renderer/shell_content_renderer_client.h"
6 6
7 #include "content/public/common/content_constants.h" 7 #include "content/public/common/content_constants.h"
8 #include "content/public/renderer/render_frame.h" 8 #include "content/public/renderer/render_frame.h"
9 #include "content/public/renderer/render_frame_observer.h" 9 #include "content/public/renderer/render_frame_observer.h"
10 #include "content/public/renderer/render_frame_observer_tracker.h" 10 #include "content/public/renderer/render_frame_observer_tracker.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #if !defined(DISABLE_NACL) 123 #if !defined(DISABLE_NACL)
124 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed. 124 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed.
125 // We must defer certain plugin events for NaCl instances since we switch 125 // We must defer certain plugin events for NaCl instances since we switch
126 // from the in-process to the out-of-process proxy after instantiating them. 126 // from the in-process to the out-of-process proxy after instantiating them.
127 return module_name == nacl::kNaClPluginName; 127 return module_name == nacl::kNaClPluginName;
128 #else 128 #else
129 return false; 129 return false;
130 #endif 130 #endif
131 } 131 }
132 132
133 bool ShellContentRendererClient::ShouldEnableSiteIsolationPolicy() const { 133 bool ShellContentRendererClient::ShouldGatherSiteIsolationStats() const {
134 // Extension renderers don't need site isolation.
135 return false; 134 return false;
136 } 135 }
137 136
138 content::BrowserPluginDelegate* 137 content::BrowserPluginDelegate*
139 ShellContentRendererClient::CreateBrowserPluginDelegate( 138 ShellContentRendererClient::CreateBrowserPluginDelegate(
140 content::RenderFrame* render_frame, 139 content::RenderFrame* render_frame,
141 const std::string& mime_type, 140 const std::string& mime_type,
142 const GURL& original_url) { 141 const GURL& original_url) {
143 if (mime_type == content::kBrowserPluginMimeType) { 142 if (mime_type == content::kBrowserPluginMimeType) {
144 return new extensions::ExtensionsGuestViewContainer(render_frame); 143 return new extensions::ExtensionsGuestViewContainer(render_frame);
145 } else { 144 } else {
146 return new extensions::MimeHandlerViewContainer( 145 return new extensions::MimeHandlerViewContainer(
147 render_frame, mime_type, original_url); 146 render_frame, mime_type, original_url);
148 } 147 }
149 } 148 }
150 149
151 ExtensionsClient* ShellContentRendererClient::CreateExtensionsClient() { 150 ExtensionsClient* ShellContentRendererClient::CreateExtensionsClient() {
152 return new ShellExtensionsClient; 151 return new ShellExtensionsClient;
153 } 152 }
154 153
155 } // namespace extensions 154 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/renderer/shell_content_renderer_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698