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

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

Issue 1921413002: [DevTools] Move inspect and copy to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 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 12 matching lines...) Expand all
23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "platform/v8_inspector/InjectedScriptHost.h" 31 #include "platform/v8_inspector/InjectedScriptHost.h"
32 32
33 #include "platform/inspector_protocol/Values.h"
34 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
35 #include "platform/v8_inspector/V8RuntimeAgentImpl.h"
36
37 namespace blink { 33 namespace blink {
38 34
39 PassOwnPtr<InjectedScriptHost> InjectedScriptHost::create(V8DebuggerImpl* debugg er, V8InspectorSessionImpl* session) 35 PassOwnPtr<InjectedScriptHost> InjectedScriptHost::create(V8DebuggerImpl* debugg er)
40 { 36 {
41 return adoptPtr(new InjectedScriptHost(debugger, session)); 37 return adoptPtr(new InjectedScriptHost(debugger));
42 } 38 }
43 39
44 InjectedScriptHost::InjectedScriptHost(V8DebuggerImpl* debugger, V8InspectorSess ionImpl* session) 40 InjectedScriptHost::InjectedScriptHost(V8DebuggerImpl* debugger)
45 : m_debugger(debugger) 41 : m_debugger(debugger)
46 , m_session(session)
47 { 42 {
48 } 43 }
49 44
50 InjectedScriptHost::~InjectedScriptHost() 45 InjectedScriptHost::~InjectedScriptHost()
51 { 46 {
52 } 47 }
53 48
54 void InjectedScriptHost::inspectImpl(PassOwnPtr<protocol::Value> object, PassOwn Ptr<protocol::Value> hints)
55 {
56 protocol::ErrorSupport errors;
57 OwnPtr<protocol::Runtime::RemoteObject> remoteObject = protocol::Runtime::Re moteObject::parse(object.get(), &errors);
58 m_session->runtimeAgentImpl()->inspect(remoteObject.release(), protocol::Dic tionaryValue::cast(hints));
59 }
60
61 } // namespace blink 49 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698