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

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

Issue 2166523003: Add ref count to service workers for extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync@tott Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // Message handlers. 95 // Message handlers.
96 // The response is sent to the corresponding render view in an 96 // The response is sent to the corresponding render view in an
97 // ExtensionMsg_Response message. 97 // ExtensionMsg_Response message.
98 void Dispatch(const ExtensionHostMsg_Request_Params& params, 98 void Dispatch(const ExtensionHostMsg_Request_Params& params,
99 content::RenderFrameHost* render_frame_host, 99 content::RenderFrameHost* render_frame_host,
100 int render_process_id); 100 int render_process_id);
101 101
102 // Called when an ExtensionFunction is done executing, after it has sent 102 // Called when an ExtensionFunction is done executing, after it has sent
103 // a response (if any) to the extension. 103 // a response (if any) to the extension.
104 void OnExtensionFunctionCompleted(const Extension* extension); 104 void OnExtensionFunctionCompleted(const Extension* extension,
105 bool is_from_service_worker);
105 106
106 // See the Delegate class for documentation on these methods. 107 // See the Delegate class for documentation on these methods.
107 // TODO(devlin): None of these belong here. We should kill 108 // TODO(devlin): None of these belong here. We should kill
108 // ExtensionFunctionDispatcher::Delegate. 109 // ExtensionFunctionDispatcher::Delegate.
109 WindowController* GetExtensionWindowController() const; 110 WindowController* GetExtensionWindowController() const;
110 content::WebContents* GetAssociatedWebContents() const; 111 content::WebContents* GetAssociatedWebContents() const;
111 content::WebContents* GetVisibleWebContents() const; 112 content::WebContents* GetVisibleWebContents() const;
112 113
113 // The BrowserContext that this dispatcher is associated with. 114 // The BrowserContext that this dispatcher is associated with.
114 content::BrowserContext* browser_context() { return browser_context_; } 115 content::BrowserContext* browser_context() { return browser_context_; }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 std::unique_ptr<UIThreadWorkerResponseCallbackWrapper>>; 183 std::unique_ptr<UIThreadWorkerResponseCallbackWrapper>>;
183 // TODO(lazyboy): The map entries are cleared upon RenderProcessHost shutown, 184 // TODO(lazyboy): The map entries are cleared upon RenderProcessHost shutown,
184 // we should really be clearing it on service worker shutdown. 185 // we should really be clearing it on service worker shutdown.
185 UIThreadWorkerResponseCallbackWrapperMap 186 UIThreadWorkerResponseCallbackWrapperMap
186 ui_thread_response_callback_wrappers_for_worker_; 187 ui_thread_response_callback_wrappers_for_worker_;
187 }; 188 };
188 189
189 } // namespace extensions 190 } // namespace extensions
190 191
191 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_ 192 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_function.cc ('k') | extensions/browser/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698