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

Side by Side Diff: Source/core/html/shadow/MediaControlsChromiumAndroid.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/html/shadow/MediaControlsChromiumAndroid.h" 27 #include "core/html/shadow/MediaControlsChromiumAndroid.h"
28 28
29 #include "bindings/v8/ExceptionState.h" 29 #include "bindings/v8/ExceptionState.h"
30 #include "bindings/v8/ExceptionStatePlaceholder.h" 30 #include "bindings/v8/ExceptionStatePlaceholder.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 MediaControlsChromiumAndroid::MediaControlsChromiumAndroid(Document* document) 34 MediaControlsChromiumAndroid::MediaControlsChromiumAndroid(Document& document)
35 : MediaControlsChromium(document) 35 : MediaControlsChromium(document)
36 , m_overlayPlayButton(0) 36 , m_overlayPlayButton(0)
37 , m_overlayEnclosure(0) 37 , m_overlayEnclosure(0)
38 { 38 {
39 } 39 }
40 40
41 PassRefPtr<MediaControls> MediaControls::create(Document* document) 41 PassRefPtr<MediaControls> MediaControls::create(Document& document)
42 { 42 {
43 return MediaControlsChromiumAndroid::createControls(document); 43 return MediaControlsChromiumAndroid::createControls(document);
44 } 44 }
45 45
46 PassRefPtr<MediaControlsChromiumAndroid> MediaControlsChromiumAndroid::createCon trols(Document* document) 46 PassRefPtr<MediaControlsChromiumAndroid> MediaControlsChromiumAndroid::createCon trols(Document& document)
47 { 47 {
48 if (!document->page()) 48 if (!document.page())
49 return 0; 49 return 0;
50 50
51 RefPtr<MediaControlsChromiumAndroid> controls = adoptRef(new MediaControlsCh romiumAndroid(document)); 51 RefPtr<MediaControlsChromiumAndroid> controls = adoptRef(new MediaControlsCh romiumAndroid(document));
52 52
53 TrackExceptionState es; 53 TrackExceptionState es;
54 54
55 RefPtr<MediaControlOverlayEnclosureElement> overlayEnclosure = MediaControlO verlayEnclosureElement::create(document); 55 RefPtr<MediaControlOverlayEnclosureElement> overlayEnclosure = MediaControlO verlayEnclosureElement::create(document);
56 RefPtr<MediaControlOverlayPlayButtonElement> overlayPlayButton = MediaContro lOverlayPlayButtonElement::create(document); 56 RefPtr<MediaControlOverlayPlayButtonElement> overlayPlayButton = MediaContro lOverlayPlayButtonElement::create(document);
57 controls->m_overlayPlayButton = overlayPlayButton.get(); 57 controls->m_overlayPlayButton = overlayPlayButton.get();
58 overlayEnclosure->appendChild(overlayPlayButton.release(), es); 58 overlayEnclosure->appendChild(overlayPlayButton.release(), es);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 m_overlayPlayButton->updateDisplayType(); 90 m_overlayPlayButton->updateDisplayType();
91 MediaControlsChromium::playbackStopped(); 91 MediaControlsChromium::playbackStopped();
92 } 92 }
93 93
94 void MediaControlsChromiumAndroid::insertTextTrackContainer(PassRefPtr<MediaCont rolTextTrackContainerElement> textTrackContainer) 94 void MediaControlsChromiumAndroid::insertTextTrackContainer(PassRefPtr<MediaCont rolTextTrackContainerElement> textTrackContainer)
95 { 95 {
96 // Insert it before the overlay play button so it always displays behind it. 96 // Insert it before the overlay play button so it always displays behind it.
97 m_overlayEnclosure->insertBefore(textTrackContainer, m_overlayPlayButton); 97 m_overlayEnclosure->insertBefore(textTrackContainer, m_overlayPlayButton);
98 } 98 }
99 } 99 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlsChromiumAndroid.h ('k') | Source/core/html/shadow/MeterShadowElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698