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 { | |
pfeldman
2014/11/28 15:52:18
Seems like it should be a sibling class.
pfeldman
2014/11/28 15:52:18
This should be a private detail of the provider.
| |
26 public: | |
27 explicit WebUI(content::WebUI* web_ui); | |
28 ~WebUI() override; | |
29 }; | |
30 | |
31 explicit WebRTCDeviceProvider(content::BrowserContext* context); | |
32 | |
33 // AndroidDeviceManager::DeviceProvider implementation. | |
34 void QueryDevices(const SerialsCallback& callback) override; | |
35 | |
36 void QueryDeviceInfo(const std::string& serial, | |
37 const DeviceInfoCallback& callback) override; | |
38 | |
39 void OpenSocket(const std::string& serial, | |
40 const std::string& socket_name, | |
41 const SocketCallback& callback) override; | |
42 | |
43 private: | |
44 class MessageHandler; | |
pfeldman
2014/11/28 15:52:18
Why is it defined here?
SeRya
2014/11/28 16:18:32
Removed.
| |
45 | |
46 ~WebRTCDeviceProvider() override; | |
47 | |
48 scoped_ptr<content::WebContents> background_worker_; | |
49 | |
50 DISALLOW_COPY_AND_ASSIGN(WebRTCDeviceProvider); | |
51 }; | |
52 | |
53 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_ | |
OLD | NEW |