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

Side by Side Diff: chrome/browser/extensions/extension_function_dispatcher.h

Issue 9969136: Reland r130462: Implement FeatureProvider for ExtensionAPI." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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
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_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 10 matching lines...) Expand all
21 class ExtensionInfoMap; 21 class ExtensionInfoMap;
22 class Profile; 22 class Profile;
23 struct ExtensionHostMsg_Request_Params; 23 struct ExtensionHostMsg_Request_Params;
24 24
25 namespace content { 25 namespace content {
26 class RenderViewHost; 26 class RenderViewHost;
27 class WebContents; 27 class WebContents;
28 } 28 }
29 29
30 namespace extensions { 30 namespace extensions {
31 class ExtensionAPI;
31 class ProcessMap; 32 class ProcessMap;
32 } 33 }
33 34
34 // A factory function for creating new ExtensionFunction instances. 35 // A factory function for creating new ExtensionFunction instances.
35 typedef ExtensionFunction* (*ExtensionFunctionFactory)(); 36 typedef ExtensionFunction* (*ExtensionFunctionFactory)();
36 37
37 // ExtensionFunctionDispatcher receives requests to execute functions from 38 // ExtensionFunctionDispatcher receives requests to execute functions from
38 // Chrome extensions running in a RenderViewHost and dispatches them to the 39 // Chrome extensions running in a RenderViewHost and dispatches them to the
39 // appropriate handler. It lives entirely on the UI thread. 40 // appropriate handler. It lives entirely on the UI thread.
40 // 41 //
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 120
120 private: 121 private:
121 // Helper to create an ExtensionFunction to handle the function given by 122 // Helper to create an ExtensionFunction to handle the function given by
122 // |params|. Can be called on any thread. 123 // |params|. Can be called on any thread.
123 // Does not set subclass properties, or include_incognito. 124 // Does not set subclass properties, or include_incognito.
124 static ExtensionFunction* CreateExtensionFunction( 125 static ExtensionFunction* CreateExtensionFunction(
125 const ExtensionHostMsg_Request_Params& params, 126 const ExtensionHostMsg_Request_Params& params,
126 const Extension* extension, 127 const Extension* extension,
127 int requesting_process_id, 128 int requesting_process_id,
128 const extensions::ProcessMap& process_map, 129 const extensions::ProcessMap& process_map,
130 extensions::ExtensionAPI* api,
129 void* profile, 131 void* profile,
130 IPC::Message::Sender* ipc_sender, 132 IPC::Message::Sender* ipc_sender,
131 int routing_id); 133 int routing_id);
132 134
133 // Helper to send an access denied error to the requesting renderer. Can be 135 // Helper to send an access denied error to the requesting renderer. Can be
134 // called on any thread. 136 // called on any thread.
135 static void SendAccessDenied(IPC::Message::Sender* ipc_sender, 137 static void SendAccessDenied(IPC::Message::Sender* ipc_sender,
136 int routing_id, 138 int routing_id,
137 int request_id); 139 int request_id);
138 140
139 Profile* profile_; 141 Profile* profile_;
140 142
141 Delegate* delegate_; 143 Delegate* delegate_;
142 }; 144 };
143 145
144 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ 146 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698