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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp

Issue 2814703002: Media Controls: move time display elements to media_controls module. (Closed)
Patch Set: review comments 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 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 } 1026 }
1027 1027
1028 void MediaControlCastButtonElement::RecordMetrics(CastOverlayMetrics metric) { 1028 void MediaControlCastButtonElement::RecordMetrics(CastOverlayMetrics metric) {
1029 DCHECK(is_overlay_button_); 1029 DCHECK(is_overlay_button_);
1030 DEFINE_STATIC_LOCAL( 1030 DEFINE_STATIC_LOCAL(
1031 EnumerationHistogram, overlay_histogram, 1031 EnumerationHistogram, overlay_histogram,
1032 ("Cast.Sender.Overlay", static_cast<int>(CastOverlayMetrics::kCount))); 1032 ("Cast.Sender.Overlay", static_cast<int>(CastOverlayMetrics::kCount)));
1033 overlay_histogram.Count(static_cast<int>(metric)); 1033 overlay_histogram.Count(static_cast<int>(metric));
1034 } 1034 }
1035 1035
1036 // ----------------------------
1037
1038 MediaControlTimeRemainingDisplayElement::
1039 MediaControlTimeRemainingDisplayElement(MediaControls& media_controls)
1040 : MediaControlTimeDisplayElement(media_controls,
1041 kMediaTimeRemainingDisplay) {}
1042
1043 MediaControlTimeRemainingDisplayElement*
1044 MediaControlTimeRemainingDisplayElement::Create(MediaControls& media_controls) {
1045 MediaControlTimeRemainingDisplayElement* element =
1046 new MediaControlTimeRemainingDisplayElement(media_controls);
1047 element->SetShadowPseudoId(
1048 AtomicString("-webkit-media-controls-time-remaining-display"));
1049 return element;
1050 }
1051
1052 // ----------------------------
1053
1054 MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement(
1055 MediaControls& media_controls)
1056 : MediaControlTimeDisplayElement(media_controls, kMediaCurrentTimeDisplay) {
1057 }
1058
1059 MediaControlCurrentTimeDisplayElement*
1060 MediaControlCurrentTimeDisplayElement::Create(MediaControls& media_controls) {
1061 MediaControlCurrentTimeDisplayElement* element =
1062 new MediaControlCurrentTimeDisplayElement(media_controls);
1063 element->SetShadowPseudoId(
1064 AtomicString("-webkit-media-controls-current-time-display"));
1065 return element;
1066 }
1067
1068 } // namespace blink 1036 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698