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 CHROME_BROWSER_DEVTOOLS_BROWSER_LIST_TABCONTENTS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_BROWSER_LIST_TABCONTENTS_PROVIDER_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_BROWSER_LIST_TABCONTENTS_PROVIDER_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_BROWSER_LIST_TABCONTENTS_PROVIDER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "chrome/browser/ui/host_desktop.h" | 13 #include "chrome/browser/ui/host_desktop.h" |
14 #include "content/public/browser/devtools_http_handler_delegate.h" | 14 #include "content/public/browser/devtools_http_handler_delegate.h" |
15 | 15 |
16 class BrowserListTabContentsProvider | 16 class BrowserListTabContentsProvider |
17 : public content::DevToolsHttpHandlerDelegate { | 17 : public content::DevToolsHttpHandlerDelegate { |
18 public: | 18 public: |
19 static void EnableTethering(); | 19 static void EnableTethering(); |
20 | 20 |
21 explicit BrowserListTabContentsProvider( | 21 explicit BrowserListTabContentsProvider( |
22 chrome::HostDesktopType host_desktop_type); | 22 chrome::HostDesktopType host_desktop_type); |
23 ~BrowserListTabContentsProvider() override; | 23 ~BrowserListTabContentsProvider() override; |
24 | 24 |
25 // DevToolsHttpProtocolHandler::Delegate overrides. | 25 // DevToolsHttpProtocolHandler::Delegate overrides. |
26 std::string GetDiscoveryPageHTML() override; | 26 std::string GetDiscoveryPageHTML() override; |
27 bool BundlesFrontendResources() override; | 27 bool BundlesFrontendResources() override; |
28 base::FilePath GetDebugFrontendDir() override; | 28 base::FilePath GetDebugFrontendDir() override; |
29 scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( | 29 scoped_ptr<net::ServerSocket> CreateSocketForTethering( |
30 net::StreamListenSocket::Delegate* delegate, | |
31 std::string* name) override; | 30 std::string* name) override; |
32 | 31 |
33 private: | 32 private: |
34 chrome::HostDesktopType host_desktop_type_; | 33 chrome::HostDesktopType host_desktop_type_; |
35 int last_tethering_port_; | 34 int last_tethering_port_; |
36 DISALLOW_COPY_AND_ASSIGN(BrowserListTabContentsProvider); | 35 DISALLOW_COPY_AND_ASSIGN(BrowserListTabContentsProvider); |
37 }; | 36 }; |
38 | 37 |
39 #endif // CHROME_BROWSER_DEVTOOLS_BROWSER_LIST_TABCONTENTS_PROVIDER_H_ | 38 #endif // CHROME_BROWSER_DEVTOOLS_BROWSER_LIST_TABCONTENTS_PROVIDER_H_ |
OLD | NEW |