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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/devtools/device/webrtc/webrtc_device_provider.h
diff --git a/chrome/browser/devtools/device/webrtc/webrtc_device_provider.h b/chrome/browser/devtools/device/webrtc/webrtc_device_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..0cae0482fab4b0b3d3b5b81968d4ff8481a2a5d9
--- /dev/null
+++ b/chrome/browser/devtools/device/webrtc/webrtc_device_provider.h
@@ -0,0 +1,53 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_
+#define CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_
+
+#include "chrome/browser/devtools/device/android_device_manager.h"
+#include "content/public/browser/web_ui_controller.h"
+
+namespace content {
+class BrowserContext;
+class WebUI;
+}
+
+// Provides access to remote DevTools targets over WebRTC data channel and GCD.
+class WebRTCDeviceProvider final : public AndroidDeviceManager::DeviceProvider {
+ public:
+ /**
+ * Provides resources for provider's background worker. Background worker
+ * is a windowless page that implements most of functionality of the
+ * provider. It sandboxes WebRTC connections with remote devices and other
+ * provider implementation details.
+ */
+ 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.
+ public:
+ explicit WebUI(content::WebUI* web_ui);
+ ~WebUI() override;
+ };
+
+ explicit WebRTCDeviceProvider(content::BrowserContext* context);
+
+ // AndroidDeviceManager::DeviceProvider implementation.
+ void QueryDevices(const SerialsCallback& callback) override;
+
+ void QueryDeviceInfo(const std::string& serial,
+ const DeviceInfoCallback& callback) override;
+
+ void OpenSocket(const std::string& serial,
+ const std::string& socket_name,
+ const SocketCallback& callback) override;
+
+ private:
+ class MessageHandler;
pfeldman 2014/11/28 15:52:18 Why is it defined here?
SeRya 2014/11/28 16:18:32 Removed.
+
+ ~WebRTCDeviceProvider() override;
+
+ scoped_ptr<content::WebContents> background_worker_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebRTCDeviceProvider);
+};
+
+#endif // CHROME_BROWSER_DEVTOOLS_DEVICE_WEBRTC_WEBRTC_DEVICE_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698