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

Unified Diff: extensions/renderer/api/display_source/display_source_session.cc

Issue 1540563002: [chrome.displaySource] Add WiFi Display session class skeleton and mojo service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 11 months 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: extensions/renderer/api/display_source/display_source_session.cc
diff --git a/extensions/renderer/api/display_source/display_source_session.cc b/extensions/renderer/api/display_source/display_source_session.cc
index 8e66b6f2c2e38f3f521991b02c2d41dc95f51b29..df830079b057bd9ff6509d101e3cdfc5dfe33bf6 100644
--- a/extensions/renderer/api/display_source/display_source_session.cc
+++ b/extensions/renderer/api/display_source/display_source_session.cc
@@ -4,15 +4,24 @@
#include "extensions/renderer/api/display_source/display_source_session.h"
+#if defined(ENABLE_WIFI_DISPLAY)
+#include "extensions/renderer/api/display_source/wifi_display/wifi_display_session.h"
+#endif
+
namespace extensions {
-DisplaySourceSession::DisplaySourceSession()
- : state_(Idle) {
+DisplaySourceSessionParams::DisplaySourceSessionParams()
+ : auth_method(api::display_source::AUTHENTICATION_METHOD_NONE) {
}
-DisplaySourceSession::~DisplaySourceSession() {
+DisplaySourceSessionParams::~DisplaySourceSessionParams() = default;
+
+DisplaySourceSession::DisplaySourceSession()
+ : state_(Idle) {
}
+DisplaySourceSession::~DisplaySourceSession() = default;
+
void DisplaySourceSession::SetCallbacks(
const SinkIdCallback& started_callback,
const SinkIdCallback& terminated_callback,
@@ -27,10 +36,10 @@ void DisplaySourceSession::SetCallbacks(
}
scoped_ptr<DisplaySourceSession> DisplaySourceSessionFactory::CreateSession(
- int sink_id,
- const blink::WebMediaStreamTrack& video_track,
- const blink::WebMediaStreamTrack& audio_track,
- scoped_ptr<DisplaySourceAuthInfo> auth_info) {
+ const DisplaySourceSessionParams& params) {
+#if defined(ENABLE_WIFI_DISPLAY)
+ return scoped_ptr<DisplaySourceSession>(new WiFiDisplaySession(params));
+#endif
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698