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

Side by Side Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp

Issue 2401123002: UserGestureIndicator is a mess. Clean it up. (Closed)
Patch Set: Callback cleanup, comments Created 4 years, 2 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 /* 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void MainThreadDebugger::runMessageLoopOnPause(int contextGroupId) { 236 void MainThreadDebugger::runMessageLoopOnPause(int contextGroupId) {
237 LocalFrame* pausedFrame = 237 LocalFrame* pausedFrame =
238 WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); 238 WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
239 // Do not pause in Context of detached frame. 239 // Do not pause in Context of detached frame.
240 if (!pausedFrame) 240 if (!pausedFrame)
241 return; 241 return;
242 ASSERT(pausedFrame == pausedFrame->localFrameRoot()); 242 ASSERT(pausedFrame == pausedFrame->localFrameRoot());
243 m_paused = true; 243 m_paused = true;
244 244
245 if (UserGestureToken* token = UserGestureIndicator::currentToken()) 245 if (UserGestureToken* token = UserGestureIndicator::currentToken())
246 token->setPauseInDebugger(); 246 token->setTimeoutPolicy(UserGestureToken::HasPaused);
247 // Wait for continue or step command. 247 // Wait for continue or step command.
248 if (m_clientMessageLoop) 248 if (m_clientMessageLoop)
249 m_clientMessageLoop->run(pausedFrame); 249 m_clientMessageLoop->run(pausedFrame);
250 } 250 }
251 251
252 void MainThreadDebugger::quitMessageLoopOnPause() { 252 void MainThreadDebugger::quitMessageLoopOnPause() {
253 m_paused = false; 253 m_paused = false;
254 if (m_clientMessageLoop) 254 if (m_clientMessageLoop)
255 m_clientMessageLoop->quitNow(); 255 m_clientMessageLoop->quitNow();
256 } 256 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 context, nodes, index++, 454 context, nodes, index++,
455 toV8(node, info.Holder(), info.GetIsolate())) 455 toV8(node, info.Holder(), info.GetIsolate()))
456 .FromMaybe(false)) 456 .FromMaybe(false))
457 return; 457 return;
458 } 458 }
459 info.GetReturnValue().Set(nodes); 459 info.GetReturnValue().Set(nodes);
460 } 460 }
461 } 461 }
462 462
463 } // namespace blink 463 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/DevToolsHost.cpp ('k') | third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698