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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.cpp

Issue 2780403004: Create core/html/media/ and move auxiliary media files in it. (Closed)
Patch Set: actually add autoplay files 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.cpp
deleted file mode 100644
index 45ddcbbbd32aa80bd9c5384893d1980a2d08de51..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/html/HTMLMediaElementControlsList.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/html/HTMLMediaElementControlsList.h"
-
-#include "core/html/HTMLMediaElement.h"
-
-namespace blink {
-
-namespace {
-
-const char kNoDownload[] = "nodownload";
-const char kNoFullscreen[] = "nofullscreen";
-const char kNoRemotePlayback[] = "noremoteplayback";
-
-const char* kSupportedTokens[] = {kNoDownload, kNoFullscreen,
- kNoRemotePlayback};
-
-} // namespace
-
-HTMLMediaElementControlsList::HTMLMediaElementControlsList(
- HTMLMediaElement* element)
- : DOMTokenList(this), m_element(element) {}
-
-HTMLMediaElementControlsList::~HTMLMediaElementControlsList() = default;
-
-DEFINE_TRACE(HTMLMediaElementControlsList) {
- visitor->trace(m_element);
- DOMTokenList::trace(visitor);
- DOMTokenListObserver::trace(visitor);
-}
-
-bool HTMLMediaElementControlsList::validateTokenValue(
- const AtomicString& tokenValue,
- ExceptionState&) const {
- for (const char* supportedToken : kSupportedTokens) {
- if (tokenValue == supportedToken)
- return true;
- }
- return false;
-}
-
-void HTMLMediaElementControlsList::valueWasSet() {
- m_element->controlsListValueWasSet();
-}
-
-bool HTMLMediaElementControlsList::shouldHideDownload() const {
- return tokens().contains(kNoDownload);
-}
-
-bool HTMLMediaElementControlsList::shouldHideFullscreen() const {
- return tokens().contains(kNoFullscreen);
-}
-
-bool HTMLMediaElementControlsList::shouldHideRemotePlayback() const {
- return tokens().contains(kNoRemotePlayback);
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698