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

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

Issue 923563003: Remove MediaControls::textTracksChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 349 }
350 350
351 void MediaControls::refreshClosedCaptionsButtonVisibility() 351 void MediaControls::refreshClosedCaptionsButtonVisibility()
352 { 352 {
353 if (mediaElement().hasClosedCaptions()) 353 if (mediaElement().hasClosedCaptions())
354 m_toggleClosedCaptionsButton->show(); 354 m_toggleClosedCaptionsButton->show();
355 else 355 else
356 m_toggleClosedCaptionsButton->hide(); 356 m_toggleClosedCaptionsButton->hide();
357 } 357 }
358 358
359 void MediaControls::textTracksChanged()
360 {
361 refreshClosedCaptionsButtonVisibility();
362 }
363
364 static Element* elementFromCenter(Element& element) 359 static Element* elementFromCenter(Element& element)
365 { 360 {
366 RefPtrWillBeRawPtr<ClientRect> clientRect = element.getBoundingClientRect(); 361 RefPtrWillBeRawPtr<ClientRect> clientRect = element.getBoundingClientRect();
367 int centerX = static_cast<int>((clientRect->left() + clientRect->right()) / 2); 362 int centerX = static_cast<int>((clientRect->left() + clientRect->right()) / 2);
368 int centerY = static_cast<int>((clientRect->top() + clientRect->bottom()) / 2); 363 int centerY = static_cast<int>((clientRect->top() + clientRect->bottom()) / 2);
369 364
370 return element.document().elementFromPoint(centerX , centerY); 365 return element.document().elementFromPoint(centerX , centerY);
371 } 366 }
372 367
373 void MediaControls::tryShowOverlayCastButton() 368 void MediaControls::tryShowOverlayCastButton()
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 visitor->trace(m_toggleClosedCaptionsButton); 566 visitor->trace(m_toggleClosedCaptionsButton);
572 visitor->trace(m_fullScreenButton); 567 visitor->trace(m_fullScreenButton);
573 visitor->trace(m_durationDisplay); 568 visitor->trace(m_durationDisplay);
574 visitor->trace(m_enclosure); 569 visitor->trace(m_enclosure);
575 visitor->trace(m_castButton); 570 visitor->trace(m_castButton);
576 visitor->trace(m_overlayCastButton); 571 visitor->trace(m_overlayCastButton);
577 HTMLDivElement::trace(visitor); 572 HTMLDivElement::trace(visitor);
578 } 573 }
579 574
580 } 575 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698