| OLD | NEW |
| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 WebKit::WebPlugin* CreatePlugin( | 127 WebKit::WebPlugin* CreatePlugin( |
| 128 content::RenderView* render_view, | 128 content::RenderView* render_view, |
| 129 WebKit::WebFrame* frame, | 129 WebKit::WebFrame* frame, |
| 130 const WebKit::WebPluginParams& params, | 130 const WebKit::WebPluginParams& params, |
| 131 const ChromeViewHostMsg_GetPluginInfo_Status& status, | 131 const ChromeViewHostMsg_GetPluginInfo_Status& status, |
| 132 const webkit::WebPluginInfo& plugin, | 132 const webkit::WebPluginInfo& plugin, |
| 133 const std::string& actual_mime_type); | 133 const std::string& actual_mime_type); |
| 134 | 134 |
| 135 private: | 135 private: |
| 136 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); |
| 137 |
| 136 // Returns true if the frame is navigating to an URL either into or out of an | 138 // Returns true if the frame is navigating to an URL either into or out of an |
| 137 // extension app's extent. | 139 // extension app's extent. |
| 138 bool CrossesExtensionExtents(WebKit::WebFrame* frame, | 140 bool CrossesExtensionExtents(WebKit::WebFrame* frame, |
| 139 const GURL& new_url, | 141 const GURL& new_url, |
| 140 const ExtensionSet& extensions, | 142 const ExtensionSet& extensions, |
| 141 bool is_extension_url, | 143 bool is_extension_url, |
| 142 bool is_initial_navigation); | 144 bool is_initial_navigation); |
| 143 | 145 |
| 144 // Returns true if the NaCl plugin can be created. If it returns true, as a | 146 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, |
| 145 // side effect, it may add special attributes to params. | 147 const webkit::WebPluginInfo& plugin); |
| 146 bool IsNaClAllowed(const webkit::WebPluginInfo& plugin, | 148 static bool IsNaClAllowed(const GURL& manifest_url, |
| 147 const GURL& url, | 149 const GURL& top_url, |
| 148 const std::string& actual_mime_type, | 150 bool is_nacl_unrestricted, |
| 149 bool is_nacl_mime_type, | 151 bool is_extension_unrestricted, |
| 150 bool enable_nacl, | 152 bool is_extension_from_webstore, |
| 151 WebKit::WebPluginParams& params); | 153 WebKit::WebPluginParams* params); |
| 152 | 154 |
| 153 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; | 155 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; |
| 154 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; | 156 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; |
| 155 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; | 157 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; |
| 156 scoped_ptr<RendererNetPredictor> net_predictor_; | 158 scoped_ptr<RendererNetPredictor> net_predictor_; |
| 157 scoped_ptr<SpellCheck> spellcheck_; | 159 scoped_ptr<SpellCheck> spellcheck_; |
| 158 scoped_ptr<VisitedLinkSlave> visited_link_slave_; | 160 scoped_ptr<VisitedLinkSlave> visited_link_slave_; |
| 159 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 161 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
| 160 }; | 162 }; |
| 161 | 163 |
| 162 } // namespace chrome | 164 } // namespace chrome |
| 163 | 165 |
| 164 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 166 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |