Index: content/public/browser/devtools_http_handler_delegate.h |
=================================================================== |
--- content/public/browser/devtools_http_handler_delegate.h (revision 133430) |
+++ content/public/browser/devtools_http_handler_delegate.h (working copy) |
@@ -11,11 +11,28 @@ |
namespace content { |
+class RenderViewHost; |
class WebContents; |
class DevToolsHttpHandlerDelegate { |
public: |
- typedef std::vector<WebContents*> InspectableTabs; |
+ // Interface responsible for mapping RenderViewHost instances to/from string |
+ // identifiers. |
+ class BindingHandler { |
pfeldman
2012/04/25 05:45:15
If this binding is really optional, I'd rather mov
Marshall
2012/04/25 15:14:57
Done.
|
+ public: |
+ virtual ~BindingHandler() {} |
+ |
+ // Returns the mapping of RenderViewHost to identifier. |
+ virtual std::string GetRenderViewHostIdentifier(RenderViewHost* rvh) = 0; |
pfeldman
2012/04/25 05:45:15
If you rename the interface to RenderViewHostBindi
Marshall
2012/04/25 15:14:57
Done.
|
+ |
+ // Return the mapping of identifier to RenderViewHost. |
+ virtual RenderViewHost* GetRenderViewHostBinding( |
+ const std::string& identifier) = 0; |
+ |
+ // Called when the binding has been reset. |
+ virtual void ResetRenderViewHostBinding() = 0; |
+ }; |
+ |
virtual ~DevToolsHttpHandlerDelegate() {} |
// Should return discovery page HTML that should list available tabs |
@@ -28,6 +45,12 @@ |
// Returns URL that front-end files are available at, empty string if |
// no internal server is available. |
virtual std::string GetFrontendResourcesBaseURL() = 0; |
+ |
+ // Return a BindingHandler instance or NULL to use the default binding |
+ // implementation. The caller will take ownership of the returned pointer. |
+ virtual BindingHandler* GetBindingHandler() { |
+ return NULL; |
+ } |
}; |
} // namespace content |