| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "core/paint/VideoPainter.h" | 5 #include "core/paint/VideoPainter.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/html/HTMLMediaElement.h" | 9 #include "core/html/HTMLMediaElement.h" |
| 10 #include "core/loader/EmptyClients.h" | 10 #include "core/loader/EmptyClients.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 ReadyState getReadyState() const override { return m_readyState; } | 60 ReadyState getReadyState() const override { return m_readyState; } |
| 61 WebString getErrorMessage() override { return WebString(); } | 61 WebString getErrorMessage() override { return WebString(); } |
| 62 bool didLoadingProgress() override { return false; } | 62 bool didLoadingProgress() override { return false; } |
| 63 bool hasSingleSecurityOrigin() const override { return true; } | 63 bool hasSingleSecurityOrigin() const override { return true; } |
| 64 bool didPassCORSAccessCheck() const override { return true; } | 64 bool didPassCORSAccessCheck() const override { return true; } |
| 65 double mediaTimeForTimeValue(double timeValue) const override { return timeV
alue; } | 65 double mediaTimeForTimeValue(double timeValue) const override { return timeV
alue; } |
| 66 unsigned decodedFrameCount() const override { return 0; } | 66 unsigned decodedFrameCount() const override { return 0; } |
| 67 unsigned droppedFrameCount() const override { return 0; } | 67 unsigned droppedFrameCount() const override { return 0; } |
| 68 size_t audioDecodedByteCount() const override { return 0; } | 68 size_t audioDecodedByteCount() const override { return 0; } |
| 69 size_t videoDecodedByteCount() const override { return 0; } | 69 size_t videoDecodedByteCount() const override { return 0; } |
| 70 void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermode::Mode
) override {} | 70 void paint(WebCanvas*, const WebRect&, SkPaint&) override {} |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 WebMediaPlayerClient* m_client; | 73 WebMediaPlayerClient* m_client; |
| 74 std::unique_ptr<WebLayer> m_webLayer; | 74 std::unique_ptr<WebLayer> m_webLayer; |
| 75 NetworkState m_networkState = NetworkStateEmpty; | 75 NetworkState m_networkState = NetworkStateEmpty; |
| 76 ReadyState m_readyState = ReadyStateHaveNothing; | 76 ReadyState m_readyState = ReadyStateHaveNothing; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 class StubFrameLoaderClient : public EmptyFrameLoaderClient { | 79 class StubFrameLoaderClient : public EmptyFrameLoaderClient { |
| 80 public: | 80 public: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 HTMLMediaElement* element = toHTMLMediaElement(document().body()->firstChild
()); | 135 HTMLMediaElement* element = toHTMLMediaElement(document().body()->firstChild
()); |
| 136 StubWebMediaPlayer* player = static_cast<StubWebMediaPlayer*>(element->webMe
diaPlayer()); | 136 StubWebMediaPlayer* player = static_cast<StubWebMediaPlayer*>(element->webMe
diaPlayer()); |
| 137 const WebLayer* layer = player->getWebLayer(); | 137 const WebLayer* layer = player->getWebLayer(); |
| 138 ASSERT_TRUE(layer); | 138 ASSERT_TRUE(layer); |
| 139 EXPECT_TRUE(hasLayerAttached(*layer)); | 139 EXPECT_TRUE(hasLayerAttached(*layer)); |
| 140 EXPECT_EQ(WebSize(300, 200), layer->bounds()); | 140 EXPECT_EQ(WebSize(300, 200), layer->bounds()); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace | 143 } // namespace |
| 144 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |