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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 // Shared implementation of the various MessageInvoke IPCs. | 137 // Shared implementation of the various MessageInvoke IPCs. |
138 void InvokeModuleSystemMethod( | 138 void InvokeModuleSystemMethod( |
139 content::RenderView* render_view, | 139 content::RenderView* render_view, |
140 const std::string& extension_id, | 140 const std::string& extension_id, |
141 const std::string& module_name, | 141 const std::string& module_name, |
142 const std::string& function_name, | 142 const std::string& function_name, |
143 const base::ListValue& args, | 143 const base::ListValue& args, |
144 bool user_gesture); | 144 bool user_gesture); |
145 | 145 |
| 146 void ClearPortData(int port_id); |
| 147 |
146 private: | 148 private: |
147 friend class ::ChromeRenderViewTest; | 149 friend class ::ChromeRenderViewTest; |
148 FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest, | 150 FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest, |
149 CannotScriptWebstore); | 151 CannotScriptWebstore); |
150 typedef void (*BindingInstaller)(ModuleSystem* module_system, | 152 typedef void (*BindingInstaller)(ModuleSystem* module_system, |
151 v8::Handle<v8::Object> chrome); | 153 v8::Handle<v8::Object> chrome); |
152 | 154 |
153 // RenderProcessObserver implementation: | 155 // RenderProcessObserver implementation: |
154 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 156 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
155 virtual void WebKitInitialized() OVERRIDE; | 157 virtual void WebKitInitialized() OVERRIDE; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 // them. | 304 // them. |
303 std::map<std::string, BindingInstaller> lazy_bindings_map_; | 305 std::map<std::string, BindingInstaller> lazy_bindings_map_; |
304 | 306 |
305 // Sends API requests to the extension host. | 307 // Sends API requests to the extension host. |
306 scoped_ptr<RequestSender> request_sender_; | 308 scoped_ptr<RequestSender> request_sender_; |
307 | 309 |
308 // The platforms system font family and size; | 310 // The platforms system font family and size; |
309 std::string system_font_family_; | 311 std::string system_font_family_; |
310 std::string system_font_size_; | 312 std::string system_font_size_; |
311 | 313 |
| 314 // Mapping of port IDs to tabs. If there is no tab, the value would be -1. |
| 315 std::map<int, int> port_to_tab_id_map_; |
| 316 |
312 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 317 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
313 }; | 318 }; |
314 | 319 |
315 } // namespace extensions | 320 } // namespace extensions |
316 | 321 |
317 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 322 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
OLD | NEW |