| 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_MISCELLANEOUS_BINDINGS_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/renderer/extensions/chrome_v8_context_set.h" | 10 #include "chrome/renderer/extensions/chrome_v8_context_set.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 // Manually implements some random JavaScript bindings for the extension system. | 28 // Manually implements some random JavaScript bindings for the extension system. |
| 29 // | 29 // |
| 30 // TODO(aa): This should all get re-implemented using SchemaGeneratedBindings. | 30 // TODO(aa): This should all get re-implemented using SchemaGeneratedBindings. |
| 31 // If anything needs to be manual for some reason, it should be implemented in | 31 // If anything needs to be manual for some reason, it should be implemented in |
| 32 // its own class. | 32 // its own class. |
| 33 class MiscellaneousBindings { | 33 class MiscellaneousBindings { |
| 34 public: | 34 public: |
| 35 // Creates an instance of the extension. | 35 // Creates an instance of the extension. |
| 36 static ChromeV8Extension* Get(Dispatcher* dispatcher, | 36 static ChromeV8Extension* Get(Dispatcher* dispatcher, |
| 37 v8::Handle<v8::Context> context); | 37 ChromeV8Context* context); |
| 38 | 38 |
| 39 // Dispatches the Port.onConnect content script messaging event to some | 39 // Dispatches the Port.onConnect content script messaging event to some |
| 40 // contexts in |contexts|. If |restrict_to_render_view| is specified, only | 40 // contexts in |contexts|. If |restrict_to_render_view| is specified, only |
| 41 // contexts in that render view will receive the message. | 41 // contexts in that render view will receive the message. |
| 42 static void DispatchOnConnect( | 42 static void DispatchOnConnect( |
| 43 const ChromeV8ContextSet::ContextSet& contexts, | 43 const ChromeV8ContextSet::ContextSet& contexts, |
| 44 int target_port_id, | 44 int target_port_id, |
| 45 const std::string& channel_name, | 45 const std::string& channel_name, |
| 46 const base::DictionaryValue& source_tab, | 46 const base::DictionaryValue& source_tab, |
| 47 const std::string& source_extension_id, | 47 const std::string& source_extension_id, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 63 static void DispatchOnDisconnect( | 63 static void DispatchOnDisconnect( |
| 64 const ChromeV8ContextSet::ContextSet& context_set, | 64 const ChromeV8ContextSet::ContextSet& context_set, |
| 65 int port_id, | 65 int port_id, |
| 66 const std::string& error_message, | 66 const std::string& error_message, |
| 67 content::RenderView* restrict_to_render_view); | 67 content::RenderView* restrict_to_render_view); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace | 70 } // namespace |
| 71 | 71 |
| 72 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ | 72 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ |
| OLD | NEW |