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

Side by Side Diff: third_party/WebKit/Source/platform/testing/EmptyWebMediaPlayer.h

Issue 2729613007: Fixing a crash in MediaCustomControlsFullscreenDetector when the page is destroyed (Closed)
Patch Set: . Created 3 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "public/platform/WebMediaPlayer.h"
6
7 #ifndef EmptyWebMediaPlayer_h
8 #define EmptyWebMediaPlayer_h
9
10 namespace blink {
11
12 class EmptyWebMediaPlayer : public WebMediaPlayer {
mlamouri (slow - plz ping) 2017/03/07 17:50:16 Can you add class-level comments?
Zhiqiang Zhang (Slow) 2017/03/07 18:29:02 Done.
13 public:
14 void load(LoadType, const WebMediaPlayerSource&, CORSMode) override {}
mlamouri (slow - plz ping) 2017/03/07 17:50:16 Add dtor?
Zhiqiang Zhang (Slow) 2017/03/07 18:29:02 Done.
15 void play() override {}
16 void pause() override {}
17 bool supportsSave() const override { return false; }
18 void seek(double seconds) override {}
19 void setRate(double) override {}
20 void setVolume(double) override {}
21 WebTimeRanges buffered() const override;
22 WebTimeRanges seekable() const override;
23 void setSinkId(const WebString& sinkId,
24 const WebSecurityOrigin&,
25 WebSetSinkIdCallbacks*) override {}
26 bool hasVideo() const override { return false; }
27 bool hasAudio() const override { return false; }
28 WebSize naturalSize() const override;
29 bool paused() const override { return false; }
30 bool seeking() const override { return false; }
31 double duration() const override { return 0.0; }
32 double currentTime() const override { return 0.0; }
33 NetworkState getNetworkState() const override { return NetworkStateEmpty; }
34 ReadyState getReadyState() const override { return ReadyStateHaveNothing; }
35 WebString getErrorMessage() override { return WebString(); }
36 bool didLoadingProgress() override { return false; }
37 bool hasSingleSecurityOrigin() const override { return true; }
38 bool didPassCORSAccessCheck() const override { return true; }
39 double mediaTimeForTimeValue(double timeValue) const override {
40 return timeValue;
41 };
42 unsigned decodedFrameCount() const override { return 0; }
43 unsigned droppedFrameCount() const override { return 0; }
44 size_t audioDecodedByteCount() const override { return 0; }
45 size_t videoDecodedByteCount() const override { return 0; }
46 void paint(WebCanvas*, const WebRect&, cc::PaintFlags&) override {}
47 };
48
49 } // namespace blink
50
51 #endif // EmptyWebMediaPlayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698