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

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

Issue 2700663002: Adds keyboard functionality for videos. (Closed)
Patch Set: Merge branch 'real_master' into keypress 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 MediaControlTimelineElement_h 5 #ifndef MediaControlTimelineElement_h
6 #define MediaControlTimelineElement_h 6 #define MediaControlTimelineElement_h
7 7
8 #include "core/html/shadow/MediaControlElementTypes.h" 8 #include "core/html/shadow/MediaControlElementTypes.h"
9 #include "modules/media_controls/elements/MediaControlTimelineMetrics.h" 9 #include "modules/media_controls/elements/MediaControlTimelineMetrics.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class Event; 13 class Event;
14 class MediaControlsImpl; 14 class MediaControlsImpl;
15 15
16 class MediaControlTimelineElement final : public MediaControlInputElement { 16 class MediaControlTimelineElement final : public MediaControlInputElement {
17 public: 17 public:
18 explicit MediaControlTimelineElement(MediaControlsImpl&); 18 explicit MediaControlTimelineElement(MediaControlsImpl&);
19 19
20 // MediaControlInputElement overrides. 20 // MediaControlInputElement overrides.
21 bool WillRespondToMouseClickEvents() override; 21 bool WillRespondToMouseClickEvents() override;
22 22
23 // FIXME: An "earliest possible position" will be needed once that concept 23 // FIXME: An "earliest possible position" will be needed once that concept
24 // is supported by HTMLMediaElement, see https://crbug.com/137275 24 // is supported by HTMLMediaElement, see https://crbug.com/137275
25 void SetPosition(double); 25 void SetPosition(double);
26 void SetDuration(double); 26 void SetDuration(double);
27 27
28 void OnPlaying(); 28 void OnPlaying();
29 29
30 void OnMediaKeyboardEvent(Event* event) { DefaultEventHandler(event); }
31
30 private: 32 private:
31 void DefaultEventHandler(Event*) override; 33 void DefaultEventHandler(Event*) override;
32 bool KeepEventInNode(Event*) override; 34 bool KeepEventInNode(Event*) override;
33 35
34 // Width in CSS pixels * pageZoomFactor (ignores CSS transforms for 36 // Width in CSS pixels * pageZoomFactor (ignores CSS transforms for
35 // simplicity; deliberately ignores pinch zoom's pageScaleFactor). 37 // simplicity; deliberately ignores pinch zoom's pageScaleFactor).
36 int TimelineWidth(); 38 int TimelineWidth();
37 39
38 MediaControlTimelineMetrics metrics_; 40 MediaControlTimelineMetrics metrics_;
39 }; 41 };
40 42
41 } // namespace blink 43 } // namespace blink
42 44
43 #endif // MediaControlTimelineElement 45 #endif // MediaControlTimelineElement
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698