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

Side by Side Diff: Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp

Issue 18729002: Enable message delivering in inspector-protocol tests when on pause (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix tests Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 2 * Copyright (C) 2010-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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 namespace WebKit { 83 namespace WebKit {
84 84
85 class ClientMessageLoopAdapter : public PageScriptDebugServer::ClientMessageLoop { 85 class ClientMessageLoopAdapter : public PageScriptDebugServer::ClientMessageLoop {
86 public: 86 public:
87 static void ensureClientMessageLoopCreated(WebDevToolsAgentClient* client) 87 static void ensureClientMessageLoopCreated(WebDevToolsAgentClient* client)
88 { 88 {
89 if (s_instance) 89 if (s_instance)
90 return; 90 return;
91 OwnPtr<ClientMessageLoopAdapter> instance = adoptPtr(new ClientMessageLo opAdapter(adoptPtr(client->createClientMessageLoop()))); 91 OwnPtr<ClientMessageLoopAdapter> instance = adoptPtr(new ClientMessageLo opAdapter(adoptPtr(client->createClientMessageLoop())));
92 s_instance = instance.get(); 92 s_instance = instance.get();
93 PageScriptDebugServer::shared().setClientMessageLoop(instance.release()) ; 93 PageScriptDebugServer::setClientMessageLoop(instance.release());
94 } 94 }
95 95
96 static void inspectedViewClosed(WebViewImpl* view) 96 static void inspectedViewClosed(WebViewImpl* view)
97 { 97 {
98 if (s_instance) 98 if (s_instance)
99 s_instance->m_frozenViews.remove(view); 99 s_instance->m_frozenViews.remove(view);
100 } 100 }
101 101
102 static void didNavigate() 102 static void didNavigate()
103 { 103 {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 WebDevToolsAgentImpl::WebDevToolsAgentImpl( 357 WebDevToolsAgentImpl::WebDevToolsAgentImpl(
358 WebViewImpl* webViewImpl, 358 WebViewImpl* webViewImpl,
359 WebDevToolsAgentClient* client) 359 WebDevToolsAgentClient* client)
360 : m_hostId(client->hostIdentifier()) 360 : m_hostId(client->hostIdentifier())
361 , m_client(client) 361 , m_client(client)
362 , m_webViewImpl(webViewImpl) 362 , m_webViewImpl(webViewImpl)
363 , m_attached(false) 363 , m_attached(false)
364 { 364 {
365 ASSERT(m_hostId > 0); 365 ASSERT(m_hostId > 0);
366 ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client);
366 } 367 }
367 368
368 WebDevToolsAgentImpl::~WebDevToolsAgentImpl() 369 WebDevToolsAgentImpl::~WebDevToolsAgentImpl()
369 { 370 {
370 ClientMessageLoopAdapter::inspectedViewClosed(m_webViewImpl); 371 ClientMessageLoopAdapter::inspectedViewClosed(m_webViewImpl);
371 if (m_attached) 372 if (m_attached)
372 WebKit::Platform::current()->currentThread()->removeTaskObserver(this); 373 WebKit::Platform::current()->currentThread()->removeTaskObserver(this);
373 } 374 }
374 375
375 void WebDevToolsAgentImpl::attach() 376 void WebDevToolsAgentImpl::attach()
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kProfiler_getCPUProfileCmd] 752 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kProfiler_getCPUProfileCmd]
752 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kHeapProfiler_getHeapSnapshotCmd]; 753 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kHeapProfiler_getHeapSnapshotCmd];
753 } 754 }
754 755
755 void WebDevToolsAgent::processPendingMessages() 756 void WebDevToolsAgent::processPendingMessages()
756 { 757 {
757 PageScriptDebugServer::shared().runPendingTasks(); 758 PageScriptDebugServer::shared().runPendingTasks();
758 } 759 }
759 760
760 } // namespace WebKit 761 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698