| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class IOThreadExtensionFunction; | 32 class IOThreadExtensionFunction; |
| 33 | 33 |
| 34 namespace base { | 34 namespace base { |
| 35 class ListValue; | 35 class ListValue; |
| 36 class Value; | 36 class Value; |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace content { | 39 namespace content { |
| 40 class BrowserContext; | 40 class BrowserContext; |
| 41 class RenderFrameHost; | 41 class RenderFrameHost; |
| 42 class RenderViewHost; | |
| 43 class WebContents; | 42 class WebContents; |
| 44 } | 43 } |
| 45 | 44 |
| 46 namespace extensions { | 45 namespace extensions { |
| 47 class ExtensionFunctionDispatcher; | 46 class ExtensionFunctionDispatcher; |
| 48 class IOThreadExtensionMessageFilter; | 47 class IOThreadExtensionMessageFilter; |
| 49 class QuotaLimitHeuristic; | 48 class QuotaLimitHeuristic; |
| 50 } | 49 } |
| 51 | 50 |
| 52 namespace IPC { | 51 namespace IPC { |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 // Should return true if it processed the message. | 502 // Should return true if it processed the message. |
| 504 virtual bool OnMessageReceived(const IPC::Message& message); | 503 virtual bool OnMessageReceived(const IPC::Message& message); |
| 505 | 504 |
| 506 // Set the browser context which contains the extension that has originated | 505 // Set the browser context which contains the extension that has originated |
| 507 // this function call. | 506 // this function call. |
| 508 void set_browser_context(content::BrowserContext* context) { | 507 void set_browser_context(content::BrowserContext* context) { |
| 509 context_ = context; | 508 context_ = context; |
| 510 } | 509 } |
| 511 content::BrowserContext* browser_context() const { return context_; } | 510 content::BrowserContext* browser_context() const { return context_; } |
| 512 | 511 |
| 513 // DEPRECATED: Please use render_frame_host(). | |
| 514 // TODO(devlin): Remove this once all callers are updated to use | |
| 515 // render_frame_host(). | |
| 516 content::RenderViewHost* render_view_host_do_not_use() const; | |
| 517 | |
| 518 void SetRenderFrameHost(content::RenderFrameHost* render_frame_host); | 512 void SetRenderFrameHost(content::RenderFrameHost* render_frame_host); |
| 519 content::RenderFrameHost* render_frame_host() const { | 513 content::RenderFrameHost* render_frame_host() const { |
| 520 return render_frame_host_; | 514 return render_frame_host_; |
| 521 } | 515 } |
| 522 | 516 |
| 523 void set_dispatcher(const base::WeakPtr< | 517 void set_dispatcher(const base::WeakPtr< |
| 524 extensions::ExtensionFunctionDispatcher>& dispatcher) { | 518 extensions::ExtensionFunctionDispatcher>& dispatcher) { |
| 525 dispatcher_ = dispatcher; | 519 dispatcher_ = dispatcher; |
| 526 } | 520 } |
| 527 extensions::ExtensionFunctionDispatcher* dispatcher() const { | 521 extensions::ExtensionFunctionDispatcher* dispatcher() const { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 private: | 688 private: |
| 695 // If you're hitting a compile error here due to "final" - great! You're | 689 // If you're hitting a compile error here due to "final" - great! You're |
| 696 // doing the right thing, you just need to extend UIThreadExtensionFunction | 690 // doing the right thing, you just need to extend UIThreadExtensionFunction |
| 697 // instead of SyncExtensionFunction. | 691 // instead of SyncExtensionFunction. |
| 698 ResponseAction Run() final; | 692 ResponseAction Run() final; |
| 699 | 693 |
| 700 DISALLOW_COPY_AND_ASSIGN(SyncExtensionFunction); | 694 DISALLOW_COPY_AND_ASSIGN(SyncExtensionFunction); |
| 701 }; | 695 }; |
| 702 | 696 |
| 703 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ | 697 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
| OLD | NEW |