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

Side by Side Diff: Source/modules/screen_orientation/ScreenOrientation.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/screen_orientation/ScreenOrientation.h" 6 #include "modules/screen_orientation/ScreenOrientation.h"
7 7
8 #include "core/frame/DOMWindow.h" 8 #include "core/frame/DOMWindow.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Screen.h" 10 #include "core/frame/Screen.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 , m_lockedOrientations(WebScreenOrientationDefault) 76 , m_lockedOrientations(WebScreenOrientationDefault)
77 { 77 {
78 } 78 }
79 79
80 void ScreenOrientation::lockOrientationAsync(blink::WebScreenOrientations orient ations) 80 void ScreenOrientation::lockOrientationAsync(blink::WebScreenOrientations orient ations)
81 { 81 {
82 if (m_lockedOrientations == orientations) 82 if (m_lockedOrientations == orientations)
83 return; 83 return;
84 m_lockedOrientations = orientations; 84 m_lockedOrientations = orientations;
85 if (!m_orientationLockTimer.isActive()) 85 if (!m_orientationLockTimer.isActive())
86 m_orientationLockTimer.startOneShot(0); 86 m_orientationLockTimer.startOneShot(0, FROM_HERE);
87 } 87 }
88 88
89 void ScreenOrientation::orientationLockTimerFired(Timer<ScreenOrientation>*) 89 void ScreenOrientation::orientationLockTimerFired(Timer<ScreenOrientation>*)
90 { 90 {
91 if (m_lockedOrientations == WebScreenOrientationDefault) 91 if (m_lockedOrientations == WebScreenOrientationDefault)
92 blink::Platform::current()->unlockOrientation(); 92 blink::Platform::current()->unlockOrientation();
93 else 93 else
94 blink::Platform::current()->lockOrientation(m_lockedOrientations); 94 blink::Platform::current()->lockOrientation(m_lockedOrientations);
95 } 95 }
96 96
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 ScreenOrientation::from(screen).lockOrientationAsync(orientations); 153 ScreenOrientation::from(screen).lockOrientationAsync(orientations);
154 return true; 154 return true;
155 } 155 }
156 156
157 void ScreenOrientation::unlockOrientation(Screen& screen) 157 void ScreenOrientation::unlockOrientation(Screen& screen)
158 { 158 {
159 ScreenOrientation::from(screen).lockOrientationAsync(WebScreenOrientationDef ault); 159 ScreenOrientation::from(screen).lockOrientationAsync(WebScreenOrientationDef ault);
160 } 160 }
161 161
162 } // namespace WebCore 162 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCDataChannel.cpp ('k') | Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698