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

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 1916703002: Prepare for move-only PassOwnPtr in the remaining directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@core1
Patch Set: Merge with trunk. Created 4 years, 7 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 static bool resumeForCreateWindow() 156 static bool resumeForCreateWindow()
157 { 157 {
158 return s_instance ? s_instance->quitForCreateWindow() : false; 158 return s_instance ? s_instance->quitForCreateWindow() : false;
159 } 159 }
160 160
161 private: 161 private:
162 ClientMessageLoopAdapter(PassOwnPtr<WebDevToolsAgentClient::WebKitClientMess ageLoop> messageLoop) 162 ClientMessageLoopAdapter(PassOwnPtr<WebDevToolsAgentClient::WebKitClientMess ageLoop> messageLoop)
163 : m_runningForDebugBreak(false) 163 : m_runningForDebugBreak(false)
164 , m_runningForCreateWindow(false) 164 , m_runningForCreateWindow(false)
165 , m_messageLoop(messageLoop) { } 165 , m_messageLoop(std::move(messageLoop)) { }
166 166
167 void run(LocalFrame* frame) override 167 void run(LocalFrame* frame) override
168 { 168 {
169 if (m_runningForDebugBreak) 169 if (m_runningForDebugBreak)
170 return; 170 return;
171 171
172 m_runningForDebugBreak = true; 172 m_runningForDebugBreak = true;
173 if (!m_runningForCreateWindow) 173 if (!m_runningForCreateWindow)
174 runLoop(WebLocalFrameImpl::fromFrame(frame)); 174 runLoop(WebLocalFrameImpl::fromFrame(frame));
175 } 175 }
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 return; 678 return;
679 679
680 WebDevToolsAgentImpl* agentImpl = static_cast<WebDevToolsAgentImpl*>(webagen t); 680 WebDevToolsAgentImpl* agentImpl = static_cast<WebDevToolsAgentImpl*>(webagen t);
681 if (agentImpl->attached()) 681 if (agentImpl->attached())
682 agentImpl->dispatchMessageFromFrontend(sessionId, descriptor->message()) ; 682 agentImpl->dispatchMessageFromFrontend(sessionId, descriptor->message()) ;
683 } 683 }
684 684
685 void WebDevToolsAgent::interruptAndDispatch(int sessionId, MessageDescriptor* ra wDescriptor) 685 void WebDevToolsAgent::interruptAndDispatch(int sessionId, MessageDescriptor* ra wDescriptor)
686 { 686 {
687 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web Kit API function. 687 // rawDescriptor can't be a PassOwnPtr because interruptAndDispatch is a Web Kit API function.
688 MainThreadDebugger::interruptMainThreadAndRun(threadSafeBind(WebDevToolsAgen tImpl::runDebuggerTask, sessionId, adoptPtr(rawDescriptor))); 688 MainThreadDebugger::interruptMainThreadAndRun(threadSafeBind(WebDevToolsAgen tImpl::runDebuggerTask, sessionId, passed(adoptPtr(rawDescriptor))));
689 } 689 }
690 690
691 bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message) 691 bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message)
692 { 692 {
693 String16 commandName; 693 String16 commandName;
694 if (!protocol::Dispatcher::getCommandName(message, &commandName)) 694 if (!protocol::Dispatcher::getCommandName(message, &commandName))
695 return false; 695 return false;
696 return commandName == "Debugger.pause" 696 return commandName == "Debugger.pause"
697 || commandName == "Debugger.setBreakpoint" 697 || commandName == "Debugger.setBreakpoint"
698 || commandName == "Debugger.setBreakpointByUrl" 698 || commandName == "Debugger.setBreakpointByUrl"
699 || commandName == "Debugger.removeBreakpoint" 699 || commandName == "Debugger.removeBreakpoint"
700 || commandName == "Debugger.setBreakpointsActive"; 700 || commandName == "Debugger.setBreakpointsActive";
701 } 701 }
702 702
703 } // namespace blink 703 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698