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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.h

Issue 9368046: Allow NaCl for non web store apps if their top level URL is whitelisted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 WebKit::WebPlugin* CreatePlugin( 129 WebKit::WebPlugin* CreatePlugin(
130 content::RenderView* render_view, 130 content::RenderView* render_view,
131 WebKit::WebFrame* frame, 131 WebKit::WebFrame* frame,
132 const WebKit::WebPluginParams& params, 132 const WebKit::WebPluginParams& params,
133 const ChromeViewHostMsg_GetPluginInfo_Status& status, 133 const ChromeViewHostMsg_GetPluginInfo_Status& status,
134 const webkit::WebPluginInfo& plugin, 134 const webkit::WebPluginInfo& plugin,
135 const std::string& actual_mime_type); 135 const std::string& actual_mime_type);
136 136
137 private: 137 private:
138 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction);
139
138 // Returns true if the frame is navigating to an URL either into or out of an 140 // Returns true if the frame is navigating to an URL either into or out of an
139 // extension app's extent. 141 // extension app's extent.
140 bool CrossesExtensionExtents(WebKit::WebFrame* frame, 142 bool CrossesExtensionExtents(WebKit::WebFrame* frame,
141 const GURL& new_url, 143 const GURL& new_url,
142 const ExtensionSet& extensions, 144 const ExtensionSet& extensions,
143 bool is_extension_url, 145 bool is_extension_url,
144 bool is_initial_navigation); 146 bool is_initial_navigation);
145 147
146 // Returns true if the NaCl plugin can be created. If it returns true, as a 148 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type,
147 // side effect, it may add special attributes to params. 149 const webkit::WebPluginInfo& plugin);
148 bool IsNaClAllowed(const webkit::WebPluginInfo& plugin, 150 static bool IsNaClAllowed(const GURL& manifest_url,
149 const GURL& url, 151 const GURL& top_url,
150 const std::string& actual_mime_type, 152 bool is_nacl_unrestricted,
151 bool is_nacl_mime_type, 153 bool is_extension_unrestricted,
152 bool enable_nacl, 154 bool is_extension_from_webstore,
153 WebKit::WebPluginParams& params); 155 WebKit::WebPluginParams& params);
154 156
155 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; 157 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_;
156 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; 158 scoped_ptr<ExtensionDispatcher> extension_dispatcher_;
157 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; 159 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
158 scoped_ptr<RendererNetPredictor> net_predictor_; 160 scoped_ptr<RendererNetPredictor> net_predictor_;
159 scoped_ptr<SpellCheck> spellcheck_; 161 scoped_ptr<SpellCheck> spellcheck_;
160 scoped_ptr<VisitedLinkSlave> visited_link_slave_; 162 scoped_ptr<VisitedLinkSlave> visited_link_slave_;
161 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; 163 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_;
162 164
163 // Set of origins that can use TCP/UDP private APIs from NaCl. 165 // Set of origins that can use TCP/UDP private APIs from NaCl.
164 std::set<std::string> allowed_socket_origins_; 166 std::set<std::string> allowed_socket_origins_;
165 }; 167 };
166 168
167 } // namespace chrome 169 } // namespace chrome
168 170
169 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 171 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698