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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.h

Issue 2825493005: Enable smooth transition when show/hide media remoting interstitial. (Closed)
Patch Set: Fix nits. Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 MediaRemotingInterstitial_h 5 #ifndef MediaRemotingInterstitial_h
6 #define MediaRemotingInterstitial_h 6 #define MediaRemotingInterstitial_h
7 7
8 #include "core/html/HTMLDivElement.h" 8 #include "core/html/HTMLDivElement.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 16 matching lines...) Expand all
27 // | (-internal-media-remoting-cast-text-message) 27 // | (-internal-media-remoting-cast-text-message)
28 // \-MediaRemotingExitButtonElement 28 // \-MediaRemotingExitButtonElement
29 // (-internal-media-remoting-disable-button) 29 // (-internal-media-remoting-disable-button)
30 class MediaRemotingInterstitial final : public HTMLDivElement { 30 class MediaRemotingInterstitial final : public HTMLDivElement {
31 public: 31 public:
32 explicit MediaRemotingInterstitial(HTMLVideoElement&); 32 explicit MediaRemotingInterstitial(HTMLVideoElement&);
33 33
34 // Show/Hide Media Remoting interstitial. 34 // Show/Hide Media Remoting interstitial.
35 void Show(); 35 void Show();
36 void Hide(); 36 void Hide();
37
37 void OnPosterImageChanged(); 38 void OnPosterImageChanged();
38 39
39 HTMLVideoElement& GetVideoElement() const { return *video_element_; } 40 HTMLVideoElement& GetVideoElement() const { return *video_element_; }
40 41
41 DECLARE_VIRTUAL_TRACE(); 42 DECLARE_VIRTUAL_TRACE();
42 43
43 private: 44 private:
44 // Node override. 45 // Node override.
45 bool IsMediaRemotingInterstitial() const override { return true; } 46 bool IsMediaRemotingInterstitial() const override { return true; }
47 void DidMoveToNewDocument(Document&) override;
46 48
49 void ToggleInterstitialTimerFired(TimerBase*);
50
51 // Indicates whether the interstitial should be visible. It is set/changed
52 // when SHow()/Hide() is called.
53 bool should_be_visible_ = false;
54
55 TaskRunnerTimer<MediaRemotingInterstitial> toggle_insterstitial_timer_;
47 Member<HTMLVideoElement> video_element_; 56 Member<HTMLVideoElement> video_element_;
48 Member<HTMLImageElement> background_image_; 57 Member<HTMLImageElement> background_image_;
49 Member<MediaRemotingExitButtonElement> exit_button_; 58 Member<MediaRemotingExitButtonElement> exit_button_;
50 Member<MediaRemotingCastIconElement> cast_icon_; 59 Member<MediaRemotingCastIconElement> cast_icon_;
51 Member<MediaRemotingCastMessageElement> cast_text_message_; 60 Member<MediaRemotingCastMessageElement> cast_text_message_;
52 }; 61 };
53 62
54 } // namespace 63 } // namespace
55 64
56 #endif // MediaRemotingInterstitial_h 65 #endif // MediaRemotingInterstitial_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698