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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 605013002: Refactor MediaSourceDelegate destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mp4_stream_parser_hack
Patch Set: Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 #if defined(VIDEO_HOLE) 452 #if defined(VIDEO_HOLE)
453 // A rectangle represents the geometry of video frame, when computed last 453 // A rectangle represents the geometry of video frame, when computed last
454 // time. 454 // time.
455 gfx::RectF last_computed_rect_; 455 gfx::RectF last_computed_rect_;
456 456
457 // Whether to use the video overlay for all embedded video. 457 // Whether to use the video overlay for all embedded video.
458 // True only for testing. 458 // True only for testing.
459 bool force_use_overlay_embedded_video_; 459 bool force_use_overlay_embedded_video_;
460 #endif // defined(VIDEO_HOLE) 460 #endif // defined(VIDEO_HOLE)
461 461
462 scoped_ptr<MediaSourceDelegate,
463 MediaSourceDelegate::Destroyer> media_source_delegate_;
464
465 // Internal pending playback state. 462 // Internal pending playback state.
466 // Store a playback request that cannot be started immediately. 463 // Store a playback request that cannot be started immediately.
467 bool pending_playback_; 464 bool pending_playback_;
468 465
469 MediaPlayerHostMsg_Initialize_Type player_type_; 466 MediaPlayerHostMsg_Initialize_Type player_type_;
470 467
471 // Whether the browser is currently connected to a remote media player. 468 // Whether the browser is currently connected to a remote media player.
472 bool is_remote_; 469 bool is_remote_;
473 470
474 scoped_refptr<media::MediaLog> media_log_; 471 scoped_refptr<media::MediaLog> media_log_;
(...skipping 29 matching lines...) Expand all
504 // Whether the resource is local. 501 // Whether the resource is local.
505 bool is_local_resource_; 502 bool is_local_resource_;
506 503
507 // base::TickClock used by |interpolator_|. 504 // base::TickClock used by |interpolator_|.
508 base::DefaultTickClock default_tick_clock_; 505 base::DefaultTickClock default_tick_clock_;
509 506
510 // Tracks the most recent media time update and provides interpolated values 507 // Tracks the most recent media time update and provides interpolated values
511 // as playback progresses. 508 // as playback progresses.
512 media::TimeDeltaInterpolator interpolator_; 509 media::TimeDeltaInterpolator interpolator_;
513 510
511 scoped_ptr<MediaSourceDelegate> media_source_delegate_;
512
514 // NOTE: Weak pointers must be invalidated before all other member variables. 513 // NOTE: Weak pointers must be invalidated before all other member variables.
515 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 514 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
516 515
517 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 516 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
518 }; 517 };
519 518
520 } // namespace content 519 } // namespace content
521 520
522 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 521 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698