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

Side by Side Diff: media/blink/webmediaplayer_impl.h

Issue 2083123003: Always create a ContentVideoView when entering fullscreen on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mm
Patch Set: rebase Created 4 years, 5 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 | media/blink/webmediaplayer_impl.cc » ('j') | media/blink/webmediaplayer_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 void DoLoad(LoadType load_type, 253 void DoLoad(LoadType load_type,
254 const blink::WebURL& url, 254 const blink::WebURL& url,
255 CORSMode cors_mode); 255 CORSMode cors_mode);
256 256
257 // Called after asynchronous initialization of a data source completed. 257 // Called after asynchronous initialization of a data source completed.
258 void DataSourceInitialized(bool success); 258 void DataSourceInitialized(bool success);
259 259
260 // Called when the data source is downloading or paused. 260 // Called when the data source is downloading or paused.
261 void NotifyDownloading(bool is_downloading); 261 void NotifyDownloading(bool is_downloading);
262 262
263 // Called by SurfaceManager when a surface is created.
264 void OnSurfaceCreated(int surface_id);
265
266 // Called by GpuVideoDecoder on Android to request a surface to render to (if
267 // necessary).
263 void OnSurfaceRequested(const SurfaceCreatedCB& surface_created_cb); 268 void OnSurfaceRequested(const SurfaceCreatedCB& surface_created_cb);
264 269
265 // Creates a Renderer via the |renderer_factory_|. 270 // Creates a Renderer via the |renderer_factory_|.
266 std::unique_ptr<Renderer> CreateRenderer(); 271 std::unique_ptr<Renderer> CreateRenderer();
267 272
268 // Finishes starting the pipeline due to a call to load(). 273 // Finishes starting the pipeline due to a call to load().
269 void StartPipeline(); 274 void StartPipeline();
270 275
271 // Helpers that set the network/ready state and notifies the client if 276 // Helpers that set the network/ready state and notifies the client if
272 // they've changed. 277 // they've changed.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 421
417 // Tracks whether to issue time changed notifications during buffering state 422 // Tracks whether to issue time changed notifications during buffering state
418 // changes. 423 // changes.
419 bool should_notify_time_changed_; 424 bool should_notify_time_changed_;
420 425
421 bool fullscreen_; 426 bool fullscreen_;
422 427
423 // Whether the current decoder requires a restart on fullscreen transitions. 428 // Whether the current decoder requires a restart on fullscreen transitions.
424 bool decoder_requires_restart_for_fullscreen_; 429 bool decoder_requires_restart_for_fullscreen_;
425 430
426 // What to return from supportsOverlayFullscreenVideo(). This is usually
427 // equal to |decoder_requires_restart_for_fullscreen_| except that it doesn't
428 // change while we're in fullscreen. See supportsOverlayFullscreenVideo().
429 bool supports_overlay_fullscreen_video_;
430
431 blink::WebMediaPlayerClient* client_; 431 blink::WebMediaPlayerClient* client_;
432 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client_; 432 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client_;
433 433
434 // WebMediaPlayer notifies the |delegate_| of playback state changes using 434 // WebMediaPlayer notifies the |delegate_| of playback state changes using
435 // |delegate_id_|; an id provided after registering with the delegate. The 435 // |delegate_id_|; an id provided after registering with the delegate. The
436 // WebMediaPlayer may also receive directives (play, pause) from the delegate 436 // WebMediaPlayer may also receive directives (play, pause) from the delegate
437 // via the WebMediaPlayerDelegate::Observer interface after registration. 437 // via the WebMediaPlayerDelegate::Observer interface after registration.
438 base::WeakPtr<WebMediaPlayerDelegate> delegate_; 438 base::WeakPtr<WebMediaPlayerDelegate> delegate_;
439 int delegate_id_; 439 int delegate_id_;
440 440
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // for a transient sound. Playout volume is derived by volume * multiplier. 489 // for a transient sound. Playout volume is derived by volume * multiplier.
490 double volume_; 490 double volume_;
491 double volume_multiplier_; 491 double volume_multiplier_;
492 492
493 std::unique_ptr<RendererFactory> renderer_factory_; 493 std::unique_ptr<RendererFactory> renderer_factory_;
494 494
495 // For requesting surfaces on behalf of the Android H/W decoder in fullscreen. 495 // For requesting surfaces on behalf of the Android H/W decoder in fullscreen.
496 // This will be null everywhere but Android. 496 // This will be null everywhere but Android.
497 SurfaceManager* surface_manager_; 497 SurfaceManager* surface_manager_;
498 498
499 // The current fullscreen surface id. Populated while in fullscreen once the
500 // surface is created.
501 int fullscreen_surface_id_;
502
503 // If a surface is requested before it's finished being created, the request
504 // is saved and satisfied once the surface is available.
505 SurfaceCreatedCB pending_surface_request_cb_;
506
499 // Suppresses calls to OnPipelineError() after destruction / shutdown has been 507 // Suppresses calls to OnPipelineError() after destruction / shutdown has been
500 // started; prevents us from spuriously logging errors that are transient or 508 // started; prevents us from spuriously logging errors that are transient or
501 // unimportant. 509 // unimportant.
502 bool suppress_destruction_errors_; 510 bool suppress_destruction_errors_;
503 511
504 // State indicating if it's okay to suspend or not. Updated on the first time 512 // State indicating if it's okay to suspend or not. Updated on the first time
505 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame 513 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame
506 // from the compositor will be queried to see if suspend is supported; the 514 // from the compositor will be queried to see if suspend is supported; the
507 // state will be set to YES or NO respectively if a frame is available. 515 // state will be set to YES or NO respectively if a frame is available.
508 enum class CanSuspendState { UNKNOWN, YES, NO }; 516 enum class CanSuspendState { UNKNOWN, YES, NO };
509 CanSuspendState can_suspend_state_; 517 CanSuspendState can_suspend_state_;
510 518
511 // Called some-time after OnHidden() if the media was suspended in a playing 519 // Called some-time after OnHidden() if the media was suspended in a playing
512 // state as part of the call to OnHidden(). 520 // state as part of the call to OnHidden().
513 base::OneShotTimer background_pause_timer_; 521 base::OneShotTimer background_pause_timer_;
514 522
515 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 523 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
516 }; 524 };
517 525
518 } // namespace media 526 } // namespace media
519 527
520 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 528 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | media/blink/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698