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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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) 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 15 matching lines...) Expand all
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/html/shadow/MediaControls.h" 28 #include "core/html/shadow/MediaControls.h"
29 29
30 #include "bindings/v8/ExceptionStatePlaceholder.h" 30 #include "bindings/v8/ExceptionStatePlaceholder.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 static const double timeWithoutMouseMovementBeforeHidingFullscreenControls = 3; 34 static const double timeWithoutMouseMovementBeforeHidingFullscreenControls = 3;
35 35
36 MediaControls::MediaControls(Document* document) 36 MediaControls::MediaControls(Document& document)
37 : HTMLDivElement(HTMLNames::divTag, document) 37 : HTMLDivElement(HTMLNames::divTag, document)
38 , m_mediaController(0) 38 , m_mediaController(0)
39 , m_panel(0) 39 , m_panel(0)
40 , m_textDisplayContainer(0) 40 , m_textDisplayContainer(0)
41 , m_playButton(0) 41 , m_playButton(0)
42 , m_currentTimeDisplay(0) 42 , m_currentTimeDisplay(0)
43 , m_timeline(0) 43 , m_timeline(0)
44 , m_panelMuteButton(0) 44 , m_panelMuteButton(0)
45 , m_volumeSlider(0) 45 , m_volumeSlider(0)
46 , m_toggleClosedCaptionsButton(0) 46 , m_toggleClosedCaptionsButton(0)
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 if (!relatedTarget) 345 if (!relatedTarget)
346 return false; 346 return false;
347 return contains(relatedTarget->toNode()); 347 return contains(relatedTarget->toNode());
348 } 348 }
349 349
350 void MediaControls::createTextTrackDisplay() 350 void MediaControls::createTextTrackDisplay()
351 { 351 {
352 if (m_textDisplayContainer) 352 if (m_textDisplayContainer)
353 return; 353 return;
354 354
355 RefPtr<MediaControlTextTrackContainerElement> textDisplayContainer = MediaCo ntrolTextTrackContainerElement::create(&document()); 355 RefPtr<MediaControlTextTrackContainerElement> textDisplayContainer = MediaCo ntrolTextTrackContainerElement::create(document());
356 m_textDisplayContainer = textDisplayContainer.get(); 356 m_textDisplayContainer = textDisplayContainer.get();
357 357
358 if (m_mediaController) 358 if (m_mediaController)
359 m_textDisplayContainer->setMediaController(m_mediaController); 359 m_textDisplayContainer->setMediaController(m_mediaController);
360 360
361 // Insert it before the first controller element so it always displays behin d the controls. 361 // Insert it before the first controller element so it always displays behin d the controls.
362 insertBefore(textDisplayContainer.release(), m_panel, IGNORE_EXCEPTION); 362 insertBefore(textDisplayContainer.release(), m_panel, IGNORE_EXCEPTION);
363 } 363 }
364 364
365 void MediaControls::showTextTrackDisplay() 365 void MediaControls::showTextTrackDisplay()
(...skipping 12 matching lines...) Expand all
378 378
379 void MediaControls::updateTextTrackDisplay() 379 void MediaControls::updateTextTrackDisplay()
380 { 380 {
381 if (!m_textDisplayContainer) 381 if (!m_textDisplayContainer)
382 createTextTrackDisplay(); 382 createTextTrackDisplay();
383 383
384 m_textDisplayContainer->updateDisplay(); 384 m_textDisplayContainer->updateDisplay();
385 } 385 }
386 386
387 } 387 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | Source/core/html/shadow/MediaControlsChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698