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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 , m_enclosure(0) 52 , m_enclosure(0)
53 , m_hideFullscreenControlsTimer(this, &MediaControls::hideFullscreenControls TimerFired) 53 , m_hideFullscreenControlsTimer(this, &MediaControls::hideFullscreenControls TimerFired)
54 , m_isFullscreen(false) 54 , m_isFullscreen(false)
55 , m_isMouseOverControls(false) 55 , m_isMouseOverControls(false)
56 { 56 {
57 } 57 }
58 58
59 PassRefPtr<MediaControls> MediaControls::create(Document& document) 59 PassRefPtr<MediaControls> MediaControls::create(Document& document)
60 { 60 {
61 if (!document.page()) 61 if (!document.page())
62 return 0; 62 return nullptr;
63 63
64 RefPtr<MediaControls> controls; 64 RefPtr<MediaControls> controls;
65 #if OS(ANDROID) 65 #if OS(ANDROID)
66 controls = adoptRef(new MediaControlsAndroid(document)); 66 controls = adoptRef(new MediaControlsAndroid(document));
67 #else 67 #else
68 controls = adoptRef(new MediaControls(document)); 68 controls = adoptRef(new MediaControls(document));
69 #endif 69 #endif
70 70
71 if (controls->initializeControls(document)) 71 if (controls->initializeControls(document))
72 return controls.release(); 72 return controls.release();
73 73
74 return 0; 74 return nullptr;
75 } 75 }
76 76
77 bool MediaControls::initializeControls(Document& document) 77 bool MediaControls::initializeControls(Document& document)
78 { 78 {
79 // Create an enclosing element for the panel so we can visually offset the c ontrols correctly. 79 // Create an enclosing element for the panel so we can visually offset the c ontrols correctly.
80 RefPtr<MediaControlPanelEnclosureElement> enclosure = MediaControlPanelEnclo sureElement::create(document); 80 RefPtr<MediaControlPanelEnclosureElement> enclosure = MediaControlPanelEnclo sureElement::create(document);
81 81
82 RefPtr<MediaControlPanelElement> panel = MediaControlPanelElement::create(do cument); 82 RefPtr<MediaControlPanelElement> panel = MediaControlPanelElement::create(do cument);
83 83
84 TrackExceptionState exceptionState; 84 TrackExceptionState exceptionState;
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 m_textDisplayContainer->updateDisplay(); 485 m_textDisplayContainer->updateDisplay();
486 } 486 }
487 487
488 void MediaControls::insertTextTrackContainer(PassRefPtr<MediaControlTextTrackCon tainerElement> textTrackContainer) 488 void MediaControls::insertTextTrackContainer(PassRefPtr<MediaControlTextTrackCon tainerElement> textTrackContainer)
489 { 489 {
490 // Insert it before the first controller element so it always displays behin d the controls. 490 // Insert it before the first controller element so it always displays behin d the controls.
491 insertBefore(textTrackContainer, m_enclosure); 491 insertBefore(textTrackContainer, m_enclosure);
492 } 492 }
493 493
494 } 494 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlElements.cpp ('k') | Source/core/html/shadow/SliderThumbElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698