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

Side by Side Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 1232333002: Fix virtual/override/final usage in the rest of Source/core/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 , m_userGestureToken(userGestureToken) 120 , m_userGestureToken(userGestureToken)
121 , m_preventDestruction(false) 121 , m_preventDestruction(false)
122 { 122 {
123 m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarti ng(executionContext(), "postMessage"); 123 m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarti ng(executionContext(), "postMessage");
124 } 124 }
125 125
126 PassRefPtrWillBeRawPtr<MessageEvent> event() const { return m_event.get(); } 126 PassRefPtrWillBeRawPtr<MessageEvent> event() const { return m_event.get(); }
127 SecurityOrigin* targetOrigin() const { return m_targetOrigin.get(); } 127 SecurityOrigin* targetOrigin() const { return m_targetOrigin.get(); }
128 ScriptCallStack* stackTrace() const { return m_stackTrace.get(); } 128 ScriptCallStack* stackTrace() const { return m_stackTrace.get(); }
129 UserGestureToken* userGestureToken() const { return m_userGestureToken.get() ; } 129 UserGestureToken* userGestureToken() const { return m_userGestureToken.get() ; }
130 virtual void stop() override 130 void stop() override
131 { 131 {
132 SuspendableTimer::stop(); 132 SuspendableTimer::stop();
133 133
134 if (!m_preventDestruction) { 134 if (!m_preventDestruction) {
135 // Will destroy this object 135 // Will destroy this object
136 m_window->removePostMessageTimer(this); 136 m_window->removePostMessageTimer(this);
137 } 137 }
138 } 138 }
139 139
140 // Eager finalization is needed to promptly stop this timer object. 140 // Eager finalization is needed to promptly stop this timer object.
141 // (see DOMTimer comment for more.) 141 // (see DOMTimer comment for more.)
142 EAGERLY_FINALIZE(); 142 EAGERLY_FINALIZE();
143 DEFINE_INLINE_VIRTUAL_TRACE() 143 DEFINE_INLINE_VIRTUAL_TRACE()
144 { 144 {
145 visitor->trace(m_event); 145 visitor->trace(m_event);
146 visitor->trace(m_window); 146 visitor->trace(m_window);
147 visitor->trace(m_stackTrace); 147 visitor->trace(m_stackTrace);
148 SuspendableTimer::trace(visitor); 148 SuspendableTimer::trace(visitor);
149 } 149 }
150 150
151 private: 151 private:
152 virtual void fired() override 152 void fired() override
153 { 153 {
154 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceA syncOperationCompletedCallbackStarting(executionContext(), m_asyncOperationId); 154 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceA syncOperationCompletedCallbackStarting(executionContext(), m_asyncOperationId);
155 // Prevent calls to stop triggered from the event handler to 155 // Prevent calls to stop triggered from the event handler to
156 // kill this object. 156 // kill this object.
157 m_preventDestruction = true; 157 m_preventDestruction = true;
158 m_window->postMessageTimerFired(this); 158 m_window->postMessageTimerFired(this);
159 // Will destroy this object 159 // Will destroy this object
160 m_window->removePostMessageTimer(this); 160 m_window->removePostMessageTimer(this);
161 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); 161 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
162 } 162 }
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 DOMWindow::trace(visitor); 1486 DOMWindow::trace(visitor);
1487 DOMWindowLifecycleNotifier::trace(visitor); 1487 DOMWindowLifecycleNotifier::trace(visitor);
1488 } 1488 }
1489 1489
1490 LocalFrame* LocalDOMWindow::frame() const 1490 LocalFrame* LocalDOMWindow::frame() const
1491 { 1491 {
1492 return m_frameObserver->frame(); 1492 return m_frameObserver->frame();
1493 } 1493 }
1494 1494
1495 } // namespace blink 1495 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698