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

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

Issue 1855393003: [DevTools] Fix custom formatters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/V8InjectedScriptHost.h" 5 #include "platform/v8_inspector/V8InjectedScriptHost.h"
6 6
7 #include "platform/inspector_protocol/String16.h" 7 #include "platform/inspector_protocol/String16.h"
8 #include "platform/inspector_protocol/Values.h" 8 #include "platform/inspector_protocol/Values.h"
9 #include "platform/v8_inspector/InjectedScript.h" 9 #include "platform/v8_inspector/InjectedScript.h"
10 #include "platform/v8_inspector/InjectedScriptHost.h" 10 #include "platform/v8_inspector/InjectedScriptHost.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 { 379 {
380 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ()); 380 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ());
381 if (getters.size() == 0) { 381 if (getters.size() == 0) {
382 const char* members[] = { "$0", "$1", "$2", "$3", "$4" }; 382 const char* members[] = { "$0", "$1", "$2", "$3", "$4" };
383 for (size_t i = 0; i < sizeof(members) / sizeof(const char*); ++i) 383 for (size_t i = 0; i < sizeof(members) / sizeof(const char*); ++i)
384 getters.add(members[i]); 384 getters.add(members[i]);
385 } 385 }
386 return getters.find(name) != getters.end(); 386 return getters.find(name) != getters.end();
387 } 387 }
388 388
389 bool V8Debugger::isRemoteObjectAPIMethod(const String16& name)
390 {
391 return name == "bindRemoteObject";
dgozman 2016/04/04 22:45:34 Let's instead move last bits of implementation to
kozy 2016/04/04 23:28:14 Since it's regression, I'll land it first and then
392 }
393
389 namespace { 394 namespace {
390 395
391 char hiddenPropertyName[] = "v8inspector::InjectedScriptHost"; 396 char hiddenPropertyName[] = "v8inspector::InjectedScriptHost";
392 char className[] = "V8InjectedScriptHost"; 397 char className[] = "V8InjectedScriptHost";
393 using InjectedScriptHostWrapper = InspectorWrapper<InjectedScriptHost, hiddenPro pertyName, className>; 398 using InjectedScriptHostWrapper = InspectorWrapper<InjectedScriptHost, hiddenPro pertyName, className>;
394 399
395 const InjectedScriptHostWrapper::V8MethodConfiguration V8InjectedScriptHostMetho ds[] = { 400 const InjectedScriptHostWrapper::V8MethodConfiguration V8InjectedScriptHostMetho ds[] = {
396 {"clearConsoleMessages", V8InjectedScriptHost::clearConsoleMessagesCallback} , 401 {"clearConsoleMessages", V8InjectedScriptHost::clearConsoleMessagesCallback} ,
397 {"inspect", V8InjectedScriptHost::inspectCallback}, 402 {"inspect", V8InjectedScriptHost::inspectCallback},
398 {"inspectedObject", V8InjectedScriptHost::inspectedObjectCallback}, 403 {"inspectedObject", V8InjectedScriptHost::inspectedObjectCallback},
(...skipping 28 matching lines...) Expand all
427 { 432 {
428 return InjectedScriptHostWrapper::wrap(constructorTemplate, context, host); 433 return InjectedScriptHostWrapper::wrap(constructorTemplate, context, host);
429 } 434 }
430 435
431 InjectedScriptHost* V8InjectedScriptHost::unwrap(v8::Local<v8::Context> context, v8::Local<v8::Object> object) 436 InjectedScriptHost* V8InjectedScriptHost::unwrap(v8::Local<v8::Context> context, v8::Local<v8::Object> object)
432 { 437 {
433 return InjectedScriptHostWrapper::unwrap(context, object); 438 return InjectedScriptHostWrapper::unwrap(context, object);
434 } 439 }
435 440
436 } // namespace blink 441 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698