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

Side by Side Diff: extensions/renderer/api/display_source/wifi_display/wifi_display_media_manager.cc

Issue 2004193004: [chrome.displaySource] Fix display source to use the current video sink API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/renderer/api/display_source/wifi_display/wifi_display_media _manager.h" 5 #include "extensions/renderer/api/display_source/wifi_display/wifi_display_media _manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/task_runner_util.h" 9 #include "base/task_runner_util.h"
10 #include "content/public/common/service_registry.h" 10 #include "content/public/common/service_registry.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 : track_(track), 66 : track_(track),
67 callback_(callback) { 67 callback_(callback) {
68 } 68 }
69 69
70 ~WiFiDisplayVideoSink() override { 70 ~WiFiDisplayVideoSink() override {
71 DisconnectFromTrack(); 71 DisconnectFromTrack();
72 } 72 }
73 73
74 void Start() { 74 void Start() {
75 // Callback is invoked on IO thread. 75 // Callback is invoked on IO thread.
76 ConnectToTrack(track_, callback_); 76 ConnectToTrack(track_, callback_, false);
77 } 77 }
78 78
79 private: 79 private:
80 blink::WebMediaStreamTrack track_; 80 blink::WebMediaStreamTrack track_;
81 content::VideoCaptureDeliverFrameCB callback_; 81 content::VideoCaptureDeliverFrameCB callback_;
82 DISALLOW_COPY_AND_ASSIGN(WiFiDisplayVideoSink); 82 DISALLOW_COPY_AND_ASSIGN(WiFiDisplayVideoSink);
83 }; 83 };
84 84
85 WiFiDisplayMediaManager::WiFiDisplayMediaManager( 85 WiFiDisplayMediaManager::WiFiDisplayMediaManager(
86 const blink::WebMediaStreamTrack& video_track, 86 const blink::WebMediaStreamTrack& video_track,
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 media::BindToCurrentLoop(on_completed)); 485 media::BindToCurrentLoop(on_completed));
486 } 486 }
487 487
488 void WiFiDisplayMediaManager::ConnectToRemoteService( 488 void WiFiDisplayMediaManager::ConnectToRemoteService(
489 WiFiDisplayMediaServiceRequest request) { 489 WiFiDisplayMediaServiceRequest request) {
490 DCHECK(content::RenderThread::Get()); 490 DCHECK(content::RenderThread::Get());
491 service_registry_->ConnectToRemoteService(std::move(request)); 491 service_registry_->ConnectToRemoteService(std::move(request));
492 } 492 }
493 493
494 } // namespace extensions 494 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698