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_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> |
11 | 11 |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "ipc/ipc_message.h" | 14 #include "ipc/ipc_sender.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 | 16 |
17 class ChromeRenderMessageFilter; | 17 class ChromeRenderMessageFilter; |
18 class ExtensionFunction; | 18 class ExtensionFunction; |
19 class ExtensionWindowController; | 19 class ExtensionWindowController; |
20 class ExtensionInfoMap; | 20 class ExtensionInfoMap; |
21 class Profile; | 21 class Profile; |
22 struct ExtensionHostMsg_Request_Params; | 22 struct ExtensionHostMsg_Request_Params; |
23 | 23 |
24 namespace content { | 24 namespace content { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Helper to create an ExtensionFunction to handle the function given by | 113 // Helper to create an ExtensionFunction to handle the function given by |
114 // |params|. Can be called on any thread. | 114 // |params|. Can be called on any thread. |
115 // Does not set subclass properties, or include_incognito. | 115 // Does not set subclass properties, or include_incognito. |
116 static ExtensionFunction* CreateExtensionFunction( | 116 static ExtensionFunction* CreateExtensionFunction( |
117 const ExtensionHostMsg_Request_Params& params, | 117 const ExtensionHostMsg_Request_Params& params, |
118 const extensions::Extension* extension, | 118 const extensions::Extension* extension, |
119 int requesting_process_id, | 119 int requesting_process_id, |
120 const extensions::ProcessMap& process_map, | 120 const extensions::ProcessMap& process_map, |
121 extensions::ExtensionAPI* api, | 121 extensions::ExtensionAPI* api, |
122 void* profile, | 122 void* profile, |
123 IPC::Message::Sender* ipc_sender, | 123 IPC::Sender* ipc_sender, |
124 int routing_id); | 124 int routing_id); |
125 | 125 |
126 // Helper to send an access denied error to the requesting renderer. Can be | 126 // Helper to send an access denied error to the requesting renderer. Can be |
127 // called on any thread. | 127 // called on any thread. |
128 static void SendAccessDenied(IPC::Message::Sender* ipc_sender, | 128 static void SendAccessDenied(IPC::Sender* ipc_sender, |
129 int routing_id, | 129 int routing_id, |
130 int request_id); | 130 int request_id); |
131 | 131 |
132 Profile* profile_; | 132 Profile* profile_; |
133 | 133 |
134 Delegate* delegate_; | 134 Delegate* delegate_; |
135 }; | 135 }; |
136 | 136 |
137 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ | 137 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ |
OLD | NEW |