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

Unified Diff: third_party/WebKit/Source/modules/media_controls/elements/MediaControlTimelineElement.h

Issue 2820343002: Media Controls: move timeline related code to modules. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/media_controls/elements/MediaControlTimelineElement.h
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTimelineElement.h b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTimelineElement.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea412ba606c2ee627a3913f30a50a90791a25800
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTimelineElement.h
@@ -0,0 +1,43 @@
+// Copyright 2017 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.
+
+#ifndef MediaControlTimelineElement_h
+#define MediaControlTimelineElement_h
+
+#include "core/html/shadow/MediaControlElementTypes.h"
+#include "modules/media_controls/elements/MediaControlTimelineMetrics.h"
+
+namespace blink {
+
+class Event;
+class MediaControlsImpl;
+
+class MediaControlTimelineElement final : public MediaControlInputElement {
+ public:
+ explicit MediaControlTimelineElement(MediaControlsImpl&);
+
+ // MediaControlInputElement overrides.
+ bool WillRespondToMouseClickEvents() override;
+
+ // FIXME: An "earliest possible position" will be needed once that concept
+ // is supported by HTMLMediaElement, see https://crbug.com/137275
+ void SetPosition(double);
+ void SetDuration(double);
+
+ void OnPlaying();
+
+ private:
+ void DefaultEventHandler(Event*) override;
+ bool KeepEventInNode(Event*) override;
+
+ // Width in CSS pixels * pageZoomFactor (ignores CSS transforms for
+ // simplicity; deliberately ignores pinch zoom's pageScaleFactor).
+ int TimelineWidth();
+
+ MediaControlTimelineMetrics metrics_;
+};
+
+} // namespace blink
+
+#endif // MediaControlTimelineElement

Powered by Google App Engine
This is Rietveld 408576698