Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: chrome/browser/devtools/device/webrtc/webrtc_device_provider.h

Issue 746663002: Stub for WebRTCDeviceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webclient
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 remote Clank instances using WebRTC data channel and GCD.
dgozman 2014/11/27 13:45:27 Not Clank, but any components/devtools_bridge embe
SeRya 2014/11/27 14:15:09 So far our primary goal is Clank. I think specific
17 class WebRTCDeviceProvider final : public AndroidDeviceManager::DeviceProvider {
18 public:
19 class MessageHandler;
20
21 /**
22 * Provides resources for provider's background worker. Background worker
23 * is a windowless page what implements most of functionality of the
dgozman 2014/11/27 13:45:27 typo: what->that
SeRya 2014/11/27 14:15:09 Done.
24 * provider. It sandboxes WebRTC connections with remote devices and other
25 * provider implementation details.
26 */
27 class WebUI : public content::WebUIController {
28 public:
29 explicit WebUI(content::WebUI* web_ui);
30 ~WebUI() override;
31
32 private:
33 friend class WebRTCDeviceProvider;
34
35 scoped_ptr<MessageHandler> const handler_;
36 };
37
38 explicit WebRTCDeviceProvider(content::BrowserContext* context);
39
40 void QueryDevices(const SerialsCallback& callback) override;
41
42 void QueryDeviceInfo(const std::string& serial,
43 const DeviceInfoCallback& callback) override;
44
45 void OpenSocket(const std::string& serial,
46 const std::string& socket_name,
47 const SocketCallback& callback) override;
48
49 private:
50 ~WebRTCDeviceProvider();
51
52 scoped_ptr<content::WebContents> background_worker_;
53 MessageHandler* handler_;
54
55 DISALLOW_COPY_AND_ASSIGN(WebRTCDeviceProvider);
56 };
57
58 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698