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

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

Issue 187423004: Remove unused MediaControls* in MediaControlToggleClosedCaptionsButtonElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const 393 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const
394 { 394 {
395 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play- button", AtomicString::ConstructFromLiteral)); 395 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play- button", AtomicString::ConstructFromLiteral));
396 return id; 396 return id;
397 } 397 }
398 398
399 399
400 // ---------------------------- 400 // ----------------------------
401 401
402 MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsB uttonElement(Document& document, MediaControls*) 402 MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsB uttonElement(Document& document)
403 : MediaControlInputElement(document, MediaShowClosedCaptionsButton) 403 : MediaControlInputElement(document, MediaShowClosedCaptionsButton)
404 { 404 {
405 } 405 }
406 406
407 PassRefPtr<MediaControlToggleClosedCaptionsButtonElement> MediaControlToggleClos edCaptionsButtonElement::create(Document& document, MediaControls* controls) 407 PassRefPtr<MediaControlToggleClosedCaptionsButtonElement> MediaControlToggleClos edCaptionsButtonElement::create(Document& document)
408 { 408 {
409 ASSERT(controls); 409 RefPtr<MediaControlToggleClosedCaptionsButtonElement> button = adoptRef(new MediaControlToggleClosedCaptionsButtonElement(document));
410
411 RefPtr<MediaControlToggleClosedCaptionsButtonElement> button = adoptRef(new MediaControlToggleClosedCaptionsButtonElement(document, controls));
412 button->ensureUserAgentShadowRoot(); 410 button->ensureUserAgentShadowRoot();
413 button->setType("button"); 411 button->setType("button");
414 button->hide(); 412 button->hide();
415 return button.release(); 413 return button.release();
416 } 414 }
417 415
418 void MediaControlToggleClosedCaptionsButtonElement::updateDisplayType() 416 void MediaControlToggleClosedCaptionsButtonElement::updateDisplayType()
419 { 417 {
420 bool captionsVisible = mediaController()->closedCaptionsVisible(); 418 bool captionsVisible = mediaController()->closedCaptionsVisible();
421 setDisplayType(captionsVisible ? MediaHideClosedCaptionsButton : MediaShowCl osedCaptionsButton); 419 setDisplayType(captionsVisible ? MediaHideClosedCaptionsButton : MediaShowCl osedCaptionsButton);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 float fontSize = smallestDimension * 0.05f; 788 float fontSize = smallestDimension * 0.05f;
791 if (fontSize != m_fontSize) { 789 if (fontSize != m_fontSize) {
792 m_fontSize = fontSize; 790 m_fontSize = fontSize;
793 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX); 791 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX);
794 } 792 }
795 } 793 }
796 794
797 // ---------------------------- 795 // ----------------------------
798 796
799 } // namespace WebCore 797 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlElements.h ('k') | Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698