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

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

Issue 1652983005: Remove Enumeration Histograms from the Blink Platform API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_blink_histograms_5a
Patch Set: Rebase two new histograms were added today Created 4 years, 10 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 24 matching lines...) Expand all
35 #include "core/dom/shadow/ShadowRoot.h" 35 #include "core/dom/shadow/ShadowRoot.h"
36 #include "core/events/MouseEvent.h" 36 #include "core/events/MouseEvent.h"
37 #include "core/frame/LocalFrame.h" 37 #include "core/frame/LocalFrame.h"
38 #include "core/html/HTMLVideoElement.h" 38 #include "core/html/HTMLVideoElement.h"
39 #include "core/html/TimeRanges.h" 39 #include "core/html/TimeRanges.h"
40 #include "core/html/shadow/MediaControls.h" 40 #include "core/html/shadow/MediaControls.h"
41 #include "core/input/EventHandler.h" 41 #include "core/input/EventHandler.h"
42 #include "core/layout/LayoutSlider.h" 42 #include "core/layout/LayoutSlider.h"
43 #include "core/layout/LayoutTheme.h" 43 #include "core/layout/LayoutTheme.h"
44 #include "core/layout/LayoutVideo.h" 44 #include "core/layout/LayoutVideo.h"
45 #include "platform/Histogram.h"
45 #include "platform/RuntimeEnabledFeatures.h" 46 #include "platform/RuntimeEnabledFeatures.h"
46 #include "public/platform/Platform.h"
47 47
48 namespace blink { 48 namespace blink {
49 49
50 using namespace HTMLNames; 50 using namespace HTMLNames;
51 51
52 namespace { 52 namespace {
53 53
54 // This is the duration from mediaControls.css 54 // This is the duration from mediaControls.css
55 const double fadeOutDuration = 0.3; 55 const double fadeOutDuration = 0.3;
56 56
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 616 }
617 617
618 bool MediaControlCastButtonElement::keepEventInNode(Event* event) 618 bool MediaControlCastButtonElement::keepEventInNode(Event* event)
619 { 619 {
620 return isUserInteractionEvent(event); 620 return isUserInteractionEvent(event);
621 } 621 }
622 622
623 void MediaControlCastButtonElement::recordMetrics(CastOverlayMetrics metric) 623 void MediaControlCastButtonElement::recordMetrics(CastOverlayMetrics metric)
624 { 624 {
625 ASSERT(m_isOverlayButton); 625 ASSERT(m_isOverlayButton);
626 Platform::current()->histogramEnumeration("Cast.Sender.Overlay", static_cast <int>(metric), static_cast<int>(CastOverlayMetrics::Count)); 626 DEFINE_STATIC_LOCAL(EnumerationHistogram, overlayHistogram, ("Cast.Sender.Ov erlay", static_cast<int>(CastOverlayMetrics::Count)));
627 overlayHistogram.count(static_cast<int>(metric));
627 } 628 }
628 629
629 // ---------------------------- 630 // ----------------------------
630 631
631 MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement (MediaControls& mediaControls) 632 MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement (MediaControls& mediaControls)
632 : MediaControlTimeDisplayElement(mediaControls, MediaTimeRemainingDisplay) 633 : MediaControlTimeDisplayElement(mediaControls, MediaTimeRemainingDisplay)
633 { 634 {
634 } 635 }
635 636
636 PassRefPtrWillBeRawPtr<MediaControlTimeRemainingDisplayElement> MediaControlTime RemainingDisplayElement::create(MediaControls& mediaControls) 637 PassRefPtrWillBeRawPtr<MediaControlTimeRemainingDisplayElement> MediaControlTime RemainingDisplayElement::create(MediaControls& mediaControls)
(...skipping 11 matching lines...) Expand all
648 } 649 }
649 650
650 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls) 651 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls)
651 { 652 {
652 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls)); 653 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls));
653 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral)); 654 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral));
654 return element.release(); 655 return element.release();
655 } 656 }
656 657
657 } // namespace blink 658 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698