| 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_EXTENSIONS_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 const std::string& api); | 230 const std::string& api); |
| 231 | 231 |
| 232 // Determines whether |frame| is loading a platform app resource URL. (this | 232 // Determines whether |frame| is loading a platform app resource URL. (this |
| 233 // evaluates to true for iframes in platform apps and sandboxed resources that | 233 // evaluates to true for iframes in platform apps and sandboxed resources that |
| 234 // are not in the same origin). | 234 // are not in the same origin). |
| 235 bool IsWithinPlatformApp(const WebKit::WebFrame* frame); | 235 bool IsWithinPlatformApp(const WebKit::WebFrame* frame); |
| 236 | 236 |
| 237 // Returns the Feature::Context type of context for a JavaScript context. | 237 // Returns the Feature::Context type of context for a JavaScript context. |
| 238 Feature::Context ClassifyJavaScriptContext(const std::string& extension_id, | 238 Feature::Context ClassifyJavaScriptContext(const std::string& extension_id, |
| 239 int extension_group, | 239 int extension_group, |
| 240 const ExtensionURLInfo& url_info); | 240 const GURL& url); |
| 241 | 241 |
| 242 // Gets |field| from |object| or creates it as an empty object if it doesn't | 242 // Gets |field| from |object| or creates it as an empty object if it doesn't |
| 243 // exist. | 243 // exist. |
| 244 v8::Handle<v8::Object> GetOrCreateObject(v8::Handle<v8::Object> object, | 244 v8::Handle<v8::Object> GetOrCreateObject(v8::Handle<v8::Object> object, |
| 245 const std::string& field); | 245 const std::string& field); |
| 246 | 246 |
| 247 // True if this renderer is running extensions. | 247 // True if this renderer is running extensions. |
| 248 bool is_extension_process_; | 248 bool is_extension_process_; |
| 249 | 249 |
| 250 // Contains all loaded extensions. This is essentially the renderer | 250 // Contains all loaded extensions. This is essentially the renderer |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 294 |
| 295 // Sends API requests to the extension host. | 295 // Sends API requests to the extension host. |
| 296 scoped_ptr<RequestSender> request_sender_; | 296 scoped_ptr<RequestSender> request_sender_; |
| 297 | 297 |
| 298 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 298 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 299 }; | 299 }; |
| 300 | 300 |
| 301 } // namespace extensions | 301 } // namespace extensions |
| 302 | 302 |
| 303 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 303 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
| OLD | NEW |