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

Side by Side Diff: content/renderer/pepper/pepper_media_stream_video_track_host.cc

Issue 1915793002: Remove a |readonly| member of MediaStreamTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a |readonly| argument in unittest files 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "content/renderer/pepper/pepper_media_stream_video_track_host.h" 5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 return PP_OK; 503 return PP_OK;
504 } 504 }
505 505
506 void PepperMediaStreamVideoTrackHost::InitBlinkTrack() { 506 void PepperMediaStreamVideoTrackHost::InitBlinkTrack() {
507 std::string source_id; 507 std::string source_id;
508 base::Base64Encode(base::RandBytesAsString(64), &source_id); 508 base::Base64Encode(base::RandBytesAsString(64), &source_id);
509 blink::WebMediaStreamSource webkit_source; 509 blink::WebMediaStreamSource webkit_source;
510 webkit_source.initialize(base::UTF8ToUTF16(source_id), 510 webkit_source.initialize(base::UTF8ToUTF16(source_id),
511 blink::WebMediaStreamSource::TypeVideo, 511 blink::WebMediaStreamSource::TypeVideo,
512 base::UTF8ToUTF16(kPepperVideoSourceName), 512 base::UTF8ToUTF16(kPepperVideoSourceName),
513 false /* remote */, true /* readonly */); 513 false /* remote */);
514 webkit_source.setExtraData(this); 514 webkit_source.setExtraData(this);
515 515
516 const bool enabled = true; 516 const bool enabled = true;
517 blink::WebMediaConstraints constraints; 517 blink::WebMediaConstraints constraints;
518 constraints.initialize(); 518 constraints.initialize();
519 track_ = MediaStreamVideoTrack::CreateVideoTrack( 519 track_ = MediaStreamVideoTrack::CreateVideoTrack(
520 this, constraints, 520 this, constraints,
521 base::Bind( 521 base::Bind(
522 &PepperMediaStreamVideoTrackHost::OnTrackStarted, 522 &PepperMediaStreamVideoTrackHost::OnTrackStarted,
523 base::Unretained(this)), 523 base::Unretained(this)),
524 enabled); 524 enabled);
525 } 525 }
526 526
527 void PepperMediaStreamVideoTrackHost::OnTrackStarted( 527 void PepperMediaStreamVideoTrackHost::OnTrackStarted(
528 MediaStreamSource* source, 528 MediaStreamSource* source,
529 MediaStreamRequestResult result, 529 MediaStreamRequestResult result,
530 const blink::WebString& result_name) { 530 const blink::WebString& result_name) {
531 DVLOG(3) << "OnTrackStarted result: " << result; 531 DVLOG(3) << "OnTrackStarted result: " << result;
532 } 532 }
533 533
534 } // namespace content 534 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698