OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 void set_dispatcher( | 219 void set_dispatcher( |
220 const base::WeakPtr<ExtensionFunctionDispatcher>& dispatcher) { | 220 const base::WeakPtr<ExtensionFunctionDispatcher>& dispatcher) { |
221 dispatcher_ = dispatcher; | 221 dispatcher_ = dispatcher; |
222 } | 222 } |
223 ExtensionFunctionDispatcher* dispatcher() const { | 223 ExtensionFunctionDispatcher* dispatcher() const { |
224 return dispatcher_.get(); | 224 return dispatcher_.get(); |
225 } | 225 } |
226 | 226 |
227 protected: | 227 protected: |
228 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; | 228 friend struct content::BrowserThread::DeleteOnThread< |
| 229 content::BrowserThread::UI>; |
229 friend class DeleteTask<UIThreadExtensionFunction>; | 230 friend class DeleteTask<UIThreadExtensionFunction>; |
230 | 231 |
231 virtual ~UIThreadExtensionFunction(); | 232 virtual ~UIThreadExtensionFunction(); |
232 | 233 |
233 virtual void SendResponse(bool success); | 234 virtual void SendResponse(bool success); |
234 | 235 |
235 // Gets the "current" browser, if any. | 236 // Gets the "current" browser, if any. |
236 // | 237 // |
237 // Many extension APIs operate relative to the current browser, which is the | 238 // Many extension APIs operate relative to the current browser, which is the |
238 // browser the calling code is running inside of. For example, popups, tabs, | 239 // browser the calling code is running inside of. For example, popups, tabs, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 } | 308 } |
308 | 309 |
309 void set_extension_info_map(const ExtensionInfoMap* extension_info_map) { | 310 void set_extension_info_map(const ExtensionInfoMap* extension_info_map) { |
310 extension_info_map_ = extension_info_map; | 311 extension_info_map_ = extension_info_map; |
311 } | 312 } |
312 const ExtensionInfoMap* extension_info_map() const { | 313 const ExtensionInfoMap* extension_info_map() const { |
313 return extension_info_map_.get(); | 314 return extension_info_map_.get(); |
314 } | 315 } |
315 | 316 |
316 protected: | 317 protected: |
317 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; | 318 friend struct content::BrowserThread::DeleteOnThread< |
| 319 content::BrowserThread::IO>; |
318 friend class DeleteTask<IOThreadExtensionFunction>; | 320 friend class DeleteTask<IOThreadExtensionFunction>; |
319 | 321 |
320 virtual ~IOThreadExtensionFunction(); | 322 virtual ~IOThreadExtensionFunction(); |
321 | 323 |
322 virtual void Destruct() const; | 324 virtual void Destruct() const; |
323 | 325 |
324 virtual void SendResponse(bool success); | 326 virtual void SendResponse(bool success); |
325 | 327 |
326 private: | 328 private: |
327 base::WeakPtr<ChromeRenderMessageFilter> ipc_sender_; | 329 base::WeakPtr<ChromeRenderMessageFilter> ipc_sender_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 public: | 363 public: |
362 SyncIOThreadExtensionFunction(); | 364 SyncIOThreadExtensionFunction(); |
363 | 365 |
364 virtual void Run() OVERRIDE; | 366 virtual void Run() OVERRIDE; |
365 | 367 |
366 protected: | 368 protected: |
367 virtual ~SyncIOThreadExtensionFunction(); | 369 virtual ~SyncIOThreadExtensionFunction(); |
368 }; | 370 }; |
369 | 371 |
370 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ | 372 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ |
OLD | NEW |