Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 void set_test_delegate(DelegateForTests* delegate) { | 295 void set_test_delegate(DelegateForTests* delegate) { |
| 296 delegate_ = delegate; | 296 delegate_ = delegate; |
| 297 } | 297 } |
| 298 | 298 |
| 299 // Called when a message was received. | 299 // Called when a message was received. |
| 300 // Should return true if it processed the message. | 300 // Should return true if it processed the message. |
| 301 virtual bool OnMessageReceived(const IPC::Message& message); | 301 virtual bool OnMessageReceived(const IPC::Message& message); |
| 302 | 302 |
| 303 // Set the browser context which contains the extension that has originated | 303 // Set the browser context which contains the extension that has originated |
| 304 // this function call. | 304 // this function call. |
| 305 void set_context(content::BrowserContext* context) { context_ = context; } | 305 void set_browser_context(content::BrowserContext* context) { |
| 306 content::BrowserContext* context() const { return context_; } | 306 context_ = context; |
| 307 } | |
| 308 content::BrowserContext* browser_context() const { return context_; } | |
|
James Cook
2014/02/27 22:16:00
Hooray!
| |
| 307 | 309 |
| 308 void SetRenderViewHost(content::RenderViewHost* render_view_host); | 310 void SetRenderViewHost(content::RenderViewHost* render_view_host); |
| 309 content::RenderViewHost* render_view_host() const { | 311 content::RenderViewHost* render_view_host() const { |
| 310 return render_view_host_; | 312 return render_view_host_; |
| 311 } | 313 } |
| 312 void SetRenderFrameHost(content::RenderFrameHost* render_frame_host); | 314 void SetRenderFrameHost(content::RenderFrameHost* render_frame_host); |
| 313 content::RenderFrameHost* render_frame_host() const { | 315 content::RenderFrameHost* render_frame_host() const { |
| 314 return render_frame_host_; | 316 return render_frame_host_; |
| 315 } | 317 } |
| 316 | 318 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 443 public: | 445 public: |
| 444 SyncIOThreadExtensionFunction(); | 446 SyncIOThreadExtensionFunction(); |
| 445 | 447 |
| 446 virtual void Run() OVERRIDE; | 448 virtual void Run() OVERRIDE; |
| 447 | 449 |
| 448 protected: | 450 protected: |
| 449 virtual ~SyncIOThreadExtensionFunction(); | 451 virtual ~SyncIOThreadExtensionFunction(); |
| 450 }; | 452 }; |
| 451 | 453 |
| 452 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ | 454 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
| OLD | NEW |