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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp

Issue 1734693003: Revert of DevTools: simplify JSONValues API, prepare to the OwnPtr migration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 m_debugger = nullptr; 71 m_debugger = nullptr;
72 m_debuggerAgent = nullptr; 72 m_debuggerAgent = nullptr;
73 m_inspectCallback = nullptr; 73 m_inspectCallback = nullptr;
74 m_clearConsoleCallback = nullptr; 74 m_clearConsoleCallback = nullptr;
75 m_inspectedObjects.clear(); 75 m_inspectedObjects.clear();
76 } 76 }
77 77
78 void InjectedScriptHost::inspectImpl(PassRefPtr<JSONValue> object, PassRefPtr<JS ONValue> hints) 78 void InjectedScriptHost::inspectImpl(PassRefPtr<JSONValue> object, PassRefPtr<JS ONValue> hints)
79 { 79 {
80 if (m_inspectCallback) { 80 if (m_inspectCallback) {
81 OwnPtr<protocol::Runtime::RemoteObject> remoteObject = protocol::Runtime ::RemoteObject::runtimeCast(object); 81 OwnPtr<protocol::Runtime::RemoteObject> remoteObject = protocol::Runtime ::RemoteObject::runtimeCast(object->asObject());
82 (*m_inspectCallback)(remoteObject.release(), JSONObject::cast(hints)); 82 (*m_inspectCallback)(remoteObject.release(), hints->asObject());
83 } 83 }
84 } 84 }
85 85
86 void InjectedScriptHost::clearConsoleMessages() 86 void InjectedScriptHost::clearConsoleMessages()
87 { 87 {
88 if (m_clearConsoleCallback) 88 if (m_clearConsoleCallback)
89 (*m_clearConsoleCallback)(); 89 (*m_clearConsoleCallback)();
90 } 90 }
91 91
92 void InjectedScriptHost::addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspectab le> object) 92 void InjectedScriptHost::addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspectab le> object)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 m_debuggerAgent->setBreakpointAt(scriptId, lineNumber, columnNumber, V8D ebuggerAgentImpl::MonitorCommandBreakpointSource, builder.toString()); 133 m_debuggerAgent->setBreakpointAt(scriptId, lineNumber, columnNumber, V8D ebuggerAgentImpl::MonitorCommandBreakpointSource, builder.toString());
134 } 134 }
135 135
136 void InjectedScriptHost::unmonitorFunction(const String& scriptId, int lineNumbe r, int columnNumber) 136 void InjectedScriptHost::unmonitorFunction(const String& scriptId, int lineNumbe r, int columnNumber)
137 { 137 {
138 if (m_debuggerAgent) 138 if (m_debuggerAgent)
139 m_debuggerAgent->removeBreakpointAt(scriptId, lineNumber, columnNumber, V8DebuggerAgentImpl::MonitorCommandBreakpointSource); 139 m_debuggerAgent->removeBreakpointAt(scriptId, lineNumber, columnNumber, V8DebuggerAgentImpl::MonitorCommandBreakpointSource);
140 } 140 }
141 141
142 } // namespace blink 142 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698