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

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

Issue 10703111: Cleanup: make ExtensionRequestSender manage its IPC responses directly, rather (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert sceopd_observer change Created 8 years, 5 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Resets all functions to their initial implementation. 78 // Resets all functions to their initial implementation.
79 static void ResetFunctions(); 79 static void ResetFunctions();
80 80
81 // Dispatches an IO-thread extension function. Only used for specific 81 // Dispatches an IO-thread extension function. Only used for specific
82 // functions that must be handled on the IO-thread. 82 // functions that must be handled on the IO-thread.
83 static void DispatchOnIOThread( 83 static void DispatchOnIOThread(
84 ExtensionInfoMap* extension_info_map, 84 ExtensionInfoMap* extension_info_map,
85 void* profile, 85 void* profile,
86 int render_process_id, 86 int render_process_id,
87 base::WeakPtr<ChromeRenderMessageFilter> ipc_sender, 87 base::WeakPtr<ChromeRenderMessageFilter> ipc_sender,
88 int routing_id,
89 const ExtensionHostMsg_Request_Params& params); 88 const ExtensionHostMsg_Request_Params& params);
90 89
91 // Public constructor. Callers must ensure that: 90 // Public constructor. Callers must ensure that:
92 // - |delegate| outlives this object. 91 // - |delegate| outlives this object.
93 // - This object outlives any RenderViewHost's passed to created 92 // - This object outlives any RenderViewHost's passed to created
94 // ExtensionFunctions. 93 // ExtensionFunctions.
95 ExtensionFunctionDispatcher(Profile* profile, Delegate* delegate); 94 ExtensionFunctionDispatcher(Profile* profile, Delegate* delegate);
96 95
97 ~ExtensionFunctionDispatcher(); 96 ~ExtensionFunctionDispatcher();
98 97
(...skipping 14 matching lines...) Expand all
113 // Helper to create an ExtensionFunction to handle the function given by 112 // Helper to create an ExtensionFunction to handle the function given by
114 // |params|. Can be called on any thread. 113 // |params|. Can be called on any thread.
115 // Does not set subclass properties, or include_incognito. 114 // Does not set subclass properties, or include_incognito.
116 static ExtensionFunction* CreateExtensionFunction( 115 static ExtensionFunction* CreateExtensionFunction(
117 const ExtensionHostMsg_Request_Params& params, 116 const ExtensionHostMsg_Request_Params& params,
118 const extensions::Extension* extension, 117 const extensions::Extension* extension,
119 int requesting_process_id, 118 int requesting_process_id,
120 const extensions::ProcessMap& process_map, 119 const extensions::ProcessMap& process_map,
121 extensions::ExtensionAPI* api, 120 extensions::ExtensionAPI* api,
122 void* profile, 121 void* profile,
123 IPC::Sender* ipc_sender, 122 IPC::Sender* ipc_sender);
124 int routing_id);
125 123
126 // Helper to send an access denied error to the requesting renderer. Can be 124 // Helper to send an access denied error to the requesting renderer. Can be
127 // called on any thread. 125 // called on any thread.
128 static void SendAccessDenied(IPC::Sender* ipc_sender, 126 static void SendAccessDenied(IPC::Sender* ipc_sender, int request_id);
129 int routing_id,
130 int request_id);
131 127
132 Profile* profile_; 128 Profile* profile_;
133 129
134 Delegate* delegate_; 130 Delegate* delegate_;
135 }; 131 };
136 132
137 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_ 133 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698