| 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 CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_DELEGATE_H_ |
| 6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_DELEGATE_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "content/public/browser/devtools_http_handler_delegate.h" | 10 #include "content/public/browser/devtools_http_handler_delegate.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 class BrowserContext; | 14 class BrowserContext; |
| 15 class DevToolsHttpHandler; | 15 class DevToolsHttpHandler; |
| 16 | 16 |
| 17 class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { | 17 class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { |
| 18 public: | 18 public: |
| 19 explicit ShellDevToolsDelegate(BrowserContext* browser_context); | 19 explicit ShellDevToolsDelegate(BrowserContext* browser_context); |
| 20 virtual ~ShellDevToolsDelegate(); | 20 virtual ~ShellDevToolsDelegate(); |
| 21 | 21 |
| 22 // Stops http server. | 22 // Stops http server. |
| 23 void Stop(); | 23 void Stop(); |
| 24 | 24 |
| 25 // DevToolsHttpProtocolHandler::Delegate overrides. | 25 // DevToolsHttpProtocolHandler::Delegate overrides. |
| 26 virtual std::string GetDiscoveryPageHTML() OVERRIDE; | 26 virtual std::string GetDiscoveryPageHTML() OVERRIDE; |
| 27 virtual bool BundlesFrontendResources() OVERRIDE; | 27 virtual bool BundlesFrontendResources() OVERRIDE; |
| 28 virtual base::FilePath GetDebugFrontendDir() OVERRIDE; | 28 virtual base::FilePath GetDebugFrontendDir() OVERRIDE; |
| 29 virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; | 29 virtual bool SupportsPageThumbnails() OVERRIDE; |
| 30 virtual RenderViewHost* CreateNewTarget() OVERRIDE; | 30 virtual std::string GetPageThumbnailData(const std::string& id) OVERRIDE; |
| 31 virtual TargetType GetTargetType(RenderViewHost*) OVERRIDE; | 31 virtual Target* CreateNewTarget() OVERRIDE; |
| 32 virtual std::string GetViewDescription(content::RenderViewHost*) OVERRIDE; | 32 virtual bool ActivateTarget(const std::string& id) OVERRIDE; |
| 33 virtual bool CloseTarget(const std::string& id) OVERRIDE; |
| 34 virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost( |
| 35 const std::string& id) OVERRIDE; |
| 36 virtual void RequestTargets(TargetCallback callback) OVERRIDE; |
| 33 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( | 37 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( |
| 34 net::StreamListenSocket::Delegate* delegate, | 38 net::StreamListenSocket::Delegate* delegate, |
| 35 std::string* name) OVERRIDE; | 39 std::string* name) OVERRIDE; |
| 36 | 40 |
| 37 DevToolsHttpHandler* devtools_http_handler() { | 41 DevToolsHttpHandler* devtools_http_handler() { |
| 38 return devtools_http_handler_; | 42 return devtools_http_handler_; |
| 39 } | 43 } |
| 40 | 44 |
| 41 private: | 45 private: |
| 42 BrowserContext* browser_context_; | 46 BrowserContext* browser_context_; |
| 43 DevToolsHttpHandler* devtools_http_handler_; | 47 DevToolsHttpHandler* devtools_http_handler_; |
| 44 | 48 |
| 45 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsDelegate); |
| 46 }; | 50 }; |
| 47 | 51 |
| 48 } // namespace content | 52 } // namespace content |
| 49 | 53 |
| 50 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_DELEGATE_H_ | 54 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_DELEGATE_H_ |
| OLD | NEW |