OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SHELL_DEVTOOLS_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_SHELL_DEVTOOLS_DELEGATE_H_ |
6 #define CONTENT_SHELL_SHELL_DEVTOOLS_DELEGATE_H_ | 6 #define CONTENT_SHELL_SHELL_DEVTOOLS_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "content/public/browser/devtools_http_handler_delegate.h" | 12 #include "content/public/browser/devtools_http_handler_delegate.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
| 16 class BrowserContext; |
16 class DevToolsHttpHandler; | 17 class DevToolsHttpHandler; |
17 | 18 |
18 class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { | 19 class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { |
19 public: | 20 public: |
20 explicit ShellDevToolsDelegate(int port); | 21 ShellDevToolsDelegate(BrowserContext* browser_context, int port); |
21 virtual ~ShellDevToolsDelegate(); | 22 virtual ~ShellDevToolsDelegate(); |
22 | 23 |
23 // Stops http server. | 24 // Stops http server. |
24 void Stop(); | 25 void Stop(); |
25 | 26 |
26 // DevToolsHttpProtocolHandler::Delegate overrides. | 27 // DevToolsHttpProtocolHandler::Delegate overrides. |
27 virtual std::string GetDiscoveryPageHTML() OVERRIDE; | 28 virtual std::string GetDiscoveryPageHTML() OVERRIDE; |
28 virtual bool BundlesFrontendResources() OVERRIDE; | 29 virtual bool BundlesFrontendResources() OVERRIDE; |
29 virtual FilePath GetDebugFrontendDir() OVERRIDE; | 30 virtual FilePath GetDebugFrontendDir() OVERRIDE; |
30 virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; | 31 virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; |
| 32 virtual RenderViewHost* CreateNewTarget() OVERRIDE; |
31 | 33 |
32 DevToolsHttpHandler* devtools_http_handler() { | 34 DevToolsHttpHandler* devtools_http_handler() { |
33 return devtools_http_handler_; | 35 return devtools_http_handler_; |
34 } | 36 } |
35 | 37 |
36 private: | 38 private: |
| 39 BrowserContext* browser_context_; |
37 DevToolsHttpHandler* devtools_http_handler_; | 40 DevToolsHttpHandler* devtools_http_handler_; |
38 | 41 |
39 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsDelegate); | 42 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsDelegate); |
40 }; | 43 }; |
41 | 44 |
42 } // namespace content | 45 } // namespace content |
43 | 46 |
44 #endif // CONTENT_SHELL_SHELL_DEVTOOLS_DELEGATE_H_ | 47 #endif // CONTENT_SHELL_SHELL_DEVTOOLS_DELEGATE_H_ |
OLD | NEW |