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

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

Issue 1924713002: [DevTools] Removed InjectedScriptHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-inspect-to-native
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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/v8_inspector/InspectedContext.h" 5 #include "platform/v8_inspector/InspectedContext.h"
6 6
7 #include "platform/v8_inspector/InjectedScript.h" 7 #include "platform/v8_inspector/InjectedScript.h"
8 #include "platform/v8_inspector/V8Console.h" 8 #include "platform/v8_inspector/V8Console.h"
9 #include "platform/v8_inspector/V8DebuggerImpl.h" 9 #include "platform/v8_inspector/V8DebuggerImpl.h"
10 #include "platform/v8_inspector/V8StringUtil.h" 10 #include "platform/v8_inspector/V8StringUtil.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 v8::Local<v8::Context> InspectedContext::context() const 64 v8::Local<v8::Context> InspectedContext::context() const
65 { 65 {
66 return m_context.Get(isolate()); 66 return m_context.Get(isolate());
67 } 67 }
68 68
69 v8::Isolate* InspectedContext::isolate() const 69 v8::Isolate* InspectedContext::isolate() const
70 { 70 {
71 return m_debugger->isolate(); 71 return m_debugger->isolate();
72 } 72 }
73 73
74 void InspectedContext::createInjectedScript(InjectedScriptHost* injectedScriptHo st) 74 void InspectedContext::createInjectedScript()
75 { 75 {
76 ASSERT(!m_injectedScript); 76 ASSERT(!m_injectedScript);
77 v8::HandleScope handles(isolate()); 77 v8::HandleScope handles(isolate());
78 v8::Local<v8::Context> localContext = context(); 78 v8::Local<v8::Context> localContext = context();
79 v8::Local<v8::Context> callingContext = isolate()->GetCallingContext(); 79 v8::Local<v8::Context> callingContext = isolate()->GetCallingContext();
80 if (!callingContext.IsEmpty() && !m_debugger->client()->callingContextCanAcc essContext(callingContext, localContext)) 80 if (!callingContext.IsEmpty() && !m_debugger->client()->callingContextCanAcc essContext(callingContext, localContext))
81 return; 81 return;
82 m_injectedScript = InjectedScript::create(this, injectedScriptHost); 82 m_injectedScript = InjectedScript::create(this);
83 } 83 }
84 84
85 void InspectedContext::discardInjectedScript() 85 void InspectedContext::discardInjectedScript()
86 { 86 {
87 m_injectedScript.clear(); 87 m_injectedScript.clear();
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698