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

Side by Side Diff: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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
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 "modules/screen_orientation/ScreenOrientationControllerImpl.h" 5 #include "modules/screen_orientation/ScreenOrientationControllerImpl.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/events/Event.h" 8 #include "core/events/Event.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 updateOrientation(); 133 updateOrientation();
134 134
135 // Keep track of the frames that need to be notified before notifying the 135 // Keep track of the frames that need to be notified before notifying the
136 // current frame as it will prevent side effects from the change event 136 // current frame as it will prevent side effects from the change event
137 // handlers. 137 // handlers.
138 HeapVector<Member<LocalFrame>> childFrames; 138 HeapVector<Member<LocalFrame>> childFrames;
139 for (Frame* child = frame()->tree().firstChild(); child; 139 for (Frame* child = frame()->tree().firstChild(); child;
140 child = child->tree().nextSibling()) { 140 child = child->tree().nextSibling()) {
141 if (child->isLocalFrame()) 141 if (child->isLocalFrame())
142 childFrames.append(toLocalFrame(child)); 142 childFrames.push_back(toLocalFrame(child));
143 } 143 }
144 144
145 // Notify current orientation object. 145 // Notify current orientation object.
146 if (!m_dispatchEventTimer.isActive()) 146 if (!m_dispatchEventTimer.isActive())
147 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE); 147 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE);
148 148
149 // ... and child frames, if they have a ScreenOrientationControllerImpl. 149 // ... and child frames, if they have a ScreenOrientationControllerImpl.
150 for (size_t i = 0; i < childFrames.size(); ++i) { 150 for (size_t i = 0; i < childFrames.size(); ++i) {
151 if (ScreenOrientationControllerImpl* controller = 151 if (ScreenOrientationControllerImpl* controller =
152 ScreenOrientationControllerImpl::from(*childFrames[i])) 152 ScreenOrientationControllerImpl::from(*childFrames[i]))
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 DEFINE_TRACE(ScreenOrientationControllerImpl) { 224 DEFINE_TRACE(ScreenOrientationControllerImpl) {
225 visitor->trace(m_orientation); 225 visitor->trace(m_orientation);
226 ContextLifecycleObserver::trace(visitor); 226 ContextLifecycleObserver::trace(visitor);
227 Supplement<LocalFrame>::trace(visitor); 227 Supplement<LocalFrame>::trace(visitor);
228 PlatformEventController::trace(visitor); 228 PlatformEventController::trace(visitor);
229 } 229 }
230 230
231 } // namespace blink 231 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/quota/StorageQuota.cpp ('k') | third_party/WebKit/Source/modules/sensor/SensorProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698