OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_ | |
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_ | |
7 | |
8 #include "chrome/browser/devtools/device/android_device_manager.h" | |
9 #include "content/public/browser/web_ui_controller.h" | |
10 | |
11 namespace content { | |
12 class BrowserContext; | |
13 class WebUI; | |
14 } | |
15 | |
16 // Provides access to remote DevTools targets over WebRTC data channel and GCD. | |
17 class WebRTCDeviceProvider final : public AndroidDeviceManager::DeviceProvider { | |
18 public: | |
19 /** | |
20 * Provides resources for provider's background worker. Background worker | |
21 * is a windowless page that implements most of functionality of the | |
22 * provider. It sandboxes WebRTC connections with remote devices and other | |
23 * provider implementation details. | |
24 */ | |
25 class WebUI : public content::WebUIController { | |
26 public: | |
27 explicit WebUI(content::WebUI* web_ui); | |
28 ~WebUI() override; | |
29 }; | |
30 | |
31 explicit WebRTCDeviceProvider(content::BrowserContext* context); | |
32 | |
33 void QueryDevices(const SerialsCallback& callback) override; | |
dgozman
2014/11/28 12:58:06
nit: we usually mark override sections like this:
SeRya
2014/11/28 13:07:17
Done.
| |
34 | |
35 void QueryDeviceInfo(const std::string& serial, | |
36 const DeviceInfoCallback& callback) override; | |
37 | |
38 void OpenSocket(const std::string& serial, | |
39 const std::string& socket_name, | |
40 const SocketCallback& callback) override; | |
41 | |
42 private: | |
43 class MessageHandler; | |
44 | |
45 ~WebRTCDeviceProvider(); | |
dgozman
2014/11/28 12:58:06
override
SeRya
2014/11/28 13:07:17
Done.
| |
46 | |
47 scoped_ptr<content::WebContents> background_worker_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(WebRTCDeviceProvider); | |
50 }; | |
51 | |
52 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_ | |
OLD | NEW |