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

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

Issue 2439543003: Do not use overlays when VR shell is enabled. (Closed)
Patch Set: address final comments (and a rebase) Created 4 years 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 | « content/renderer/render_frame_impl.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 unsigned int type, 171 unsigned int type,
172 bool premultiply_alpha, 172 bool premultiply_alpha,
173 bool flip_y) override; 173 bool flip_y) override;
174 174
175 blink::WebAudioSourceProvider* getAudioSourceProvider() override; 175 blink::WebAudioSourceProvider* getAudioSourceProvider() override;
176 176
177 void setContentDecryptionModule( 177 void setContentDecryptionModule(
178 blink::WebContentDecryptionModule* cdm, 178 blink::WebContentDecryptionModule* cdm,
179 blink::WebContentDecryptionModuleResult result) override; 179 blink::WebContentDecryptionModuleResult result) override;
180 180
181 void SetEnableFullscreenOverlays(bool enable_overlays);
181 bool supportsOverlayFullscreenVideo() override; 182 bool supportsOverlayFullscreenVideo() override;
182 void enteredFullscreen() override; 183 void enteredFullscreen() override;
183 void exitedFullscreen() override; 184 void exitedFullscreen() override;
184 void becameDominantVisibleContent(bool isDominant) override; 185 void becameDominantVisibleContent(bool isDominant) override;
185 186
186 // WebMediaPlayerDelegate::Observer implementation. 187 // WebMediaPlayerDelegate::Observer implementation.
187 void OnHidden() override; 188 void OnHidden() override;
188 void OnShown() override; 189 void OnShown() override;
189 bool OnSuspendRequested(bool must_suspend) override; 190 bool OnSuspendRequested(bool must_suspend) override;
190 void OnPlay() override; 191 void OnPlay() override;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // The current overlay surface id. Populated while in fullscreen once the 530 // The current overlay surface id. Populated while in fullscreen once the
530 // surface is created. 531 // surface is created.
531 int overlay_surface_id_; 532 int overlay_surface_id_;
532 533
533 // If a surface is requested before it's finished being created, the request 534 // If a surface is requested before it's finished being created, the request
534 // is saved and satisfied once the surface is available. If the decoder does 535 // is saved and satisfied once the surface is available. If the decoder does
535 // not require restart to change surfaces, this is callback is kept until 536 // not require restart to change surfaces, this is callback is kept until
536 // cleared by the decoder. 537 // cleared by the decoder.
537 SurfaceCreatedCB set_surface_cb_; 538 SurfaceCreatedCB set_surface_cb_;
538 539
539 // Force to use SurfaceView instead of SurfaceTexture on Android. 540 // On Android an overlay surface means using
541 // SurfaceView instead of SurfaceTexture.
542
543 // Use overlays for all video.
540 bool force_video_overlays_; 544 bool force_video_overlays_;
541 545
542 // Prevent use of SurfaceView on Android. (Ignored when 546 // Use overlays for fullscreen video.
543 // |force_video_overlays_| is true.) 547 // (Implied if |force_video_overlays_| is true.)
544 bool disable_fullscreen_video_overlays_; 548 bool enable_fullscreen_video_overlays_;
545 549
546 // Suppresses calls to OnPipelineError() after destruction / shutdown has been 550 // Suppresses calls to OnPipelineError() after destruction / shutdown has been
547 // started; prevents us from spuriously logging errors that are transient or 551 // started; prevents us from spuriously logging errors that are transient or
548 // unimportant. 552 // unimportant.
549 bool suppress_destruction_errors_; 553 bool suppress_destruction_errors_;
550 554
551 // State indicating if it's okay to suspend or not. Updated on the first time 555 // State indicating if it's okay to suspend or not. Updated on the first time
552 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame 556 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame
553 // from the compositor will be queried to see if suspend is supported; the 557 // from the compositor will be queried to see if suspend is supported; the
554 // state will be set to YES or NO respectively if a frame is available. 558 // state will be set to YES or NO respectively if a frame is available.
(...skipping 27 matching lines...) Expand all
582 586
583 // Whether the player is currently in autoplay muted state. 587 // Whether the player is currently in autoplay muted state.
584 bool autoplay_muted_ = false; 588 bool autoplay_muted_ = false;
585 589
586 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 590 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
587 }; 591 };
588 592
589 } // namespace media 593 } // namespace media
590 594
591 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 595 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698