Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: chrome/renderer/extensions/dispatcher.h

Issue 145463002: Extensions: Send the tab id to platform apps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix null pointer deref Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698