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" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class DictionaryValue; | 13 class DictionaryValue; |
| 14 class ListValue; |
14 } | 15 } |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 class RenderView; | 18 class RenderView; |
18 } | 19 } |
19 | 20 |
20 namespace v8 { | 21 namespace v8 { |
21 class Extension; | 22 class Extension; |
22 } | 23 } |
23 | 24 |
(...skipping 24 matching lines...) Expand all Loading... |
48 const std::string& target_extension_id, | 49 const std::string& target_extension_id, |
49 const GURL& source_url, | 50 const GURL& source_url, |
50 content::RenderView* restrict_to_render_view); | 51 content::RenderView* restrict_to_render_view); |
51 | 52 |
52 // Delivers a message sent using content script messaging to some of the | 53 // Delivers a message sent using content script messaging to some of the |
53 // contexts in |bindings_context_set|. If |restrict_to_render_view| is | 54 // contexts in |bindings_context_set|. If |restrict_to_render_view| is |
54 // specified, only contexts in that render view will receive the message. | 55 // specified, only contexts in that render view will receive the message. |
55 static void DeliverMessage( | 56 static void DeliverMessage( |
56 const ChromeV8ContextSet::ContextSet& context_set, | 57 const ChromeV8ContextSet::ContextSet& context_set, |
57 int target_port_id, | 58 int target_port_id, |
58 const std::string& message, | 59 const base::ListValue& message, |
59 content::RenderView* restrict_to_render_view); | 60 content::RenderView* restrict_to_render_view); |
60 | 61 |
61 // Dispatches the Port.onDisconnect event in response to the channel being | 62 // Dispatches the Port.onDisconnect event in response to the channel being |
62 // closed. | 63 // closed. |
63 static void DispatchOnDisconnect( | 64 static void DispatchOnDisconnect( |
64 const ChromeV8ContextSet::ContextSet& context_set, | 65 const ChromeV8ContextSet::ContextSet& context_set, |
65 int port_id, | 66 int port_id, |
66 const std::string& error_message, | 67 const std::string& error_message, |
67 content::RenderView* restrict_to_render_view); | 68 content::RenderView* restrict_to_render_view); |
68 }; | 69 }; |
69 | 70 |
70 } // namespace | 71 } // namespace |
71 | 72 |
72 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ | 73 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ |
OLD | NEW |