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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/DOMWebSocket.h

Issue 2647703007: Migrate Timer to TaskRunnerTimer in DOMWebSocket. (Closed)
Patch Set: Migrate Timer to TaskRunnerTimer in DOMWebSocket. 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 explicit EventQueue(EventTarget*); 181 explicit EventQueue(EventTarget*);
182 182
183 // Dispatches queued events if this queue is active. 183 // Dispatches queued events if this queue is active.
184 // Does nothing otherwise. 184 // Does nothing otherwise.
185 void dispatchQueuedEvents(); 185 void dispatchQueuedEvents();
186 void resumeTimerFired(TimerBase*); 186 void resumeTimerFired(TimerBase*);
187 187
188 State m_state; 188 State m_state;
189 Member<EventTarget> m_target; 189 Member<EventTarget> m_target;
190 HeapDeque<Member<Event>> m_events; 190 HeapDeque<Member<Event>> m_events;
191 Timer<EventQueue> m_resumeTimer; 191 TaskRunnerTimer<EventQueue> m_resumeTimer;
192 }; 192 };
193 193
194 enum WebSocketSendType { 194 enum WebSocketSendType {
195 WebSocketSendTypeString, 195 WebSocketSendTypeString,
196 WebSocketSendTypeArrayBuffer, 196 WebSocketSendTypeArrayBuffer,
197 WebSocketSendTypeArrayBufferView, 197 WebSocketSendTypeArrayBufferView,
198 WebSocketSendTypeBlob, 198 WebSocketSendTypeBlob,
199 WebSocketSendTypeMax, 199 WebSocketSendTypeMax,
200 }; 200 };
201 201
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // later. It will be cleared once reflected. 246 // later. It will be cleared once reflected.
247 uint64_t m_consumedBufferedAmount; 247 uint64_t m_consumedBufferedAmount;
248 uint64_t m_bufferedAmountAfterClose; 248 uint64_t m_bufferedAmountAfterClose;
249 BinaryType m_binaryType; 249 BinaryType m_binaryType;
250 int m_binaryTypeChangesAfterOpen; 250 int m_binaryTypeChangesAfterOpen;
251 // The subprotocol the server selected. 251 // The subprotocol the server selected.
252 String m_subprotocol; 252 String m_subprotocol;
253 String m_extensions; 253 String m_extensions;
254 254
255 Member<EventQueue> m_eventQueue; 255 Member<EventQueue> m_eventQueue;
256 Timer<DOMWebSocket> m_bufferedAmountConsumeTimer; 256 TaskRunnerTimer<DOMWebSocket> m_bufferedAmountConsumeTimer;
257 }; 257 };
258 258
259 } // namespace blink 259 } // namespace blink
260 260
261 #endif // DOMWebSocket_h 261 #endif // DOMWebSocket_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698