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

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

Issue 1992913006: [DevTools] Move monitor/unmonitor events CommandLineAPI to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-selectors-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
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/V8Console.h" 5 #include "platform/v8_inspector/V8Console.h"
6 6
7 #include "platform/inspector_protocol/String16.h" 7 #include "platform/inspector_protocol/String16.h"
8 #include "platform/v8_inspector/InjectedScript.h" 8 #include "platform/v8_inspector/InjectedScript.h"
9 #include "platform/v8_inspector/InspectedContext.h" 9 #include "platform/v8_inspector/InspectedContext.h"
10 #include "platform/v8_inspector/V8Compat.h" 10 #include "platform/v8_inspector/V8Compat.h"
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 void V8Console::clearInspectedContextIfNeeded(v8::Local<v8::Context> context, v8 ::Local<v8::Object> console) 702 void V8Console::clearInspectedContextIfNeeded(v8::Local<v8::Context> context, v8 ::Local<v8::Object> console)
703 { 703 {
704 v8::Isolate* isolate = context->GetIsolate(); 704 v8::Isolate* isolate = context->GetIsolate();
705 console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::Extern al::New(isolate, nullptr)); 705 console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::Extern al::New(isolate, nullptr));
706 } 706 }
707 707
708 bool V8Debugger::isCommandLineAPIMethod(const String16& name) 708 bool V8Debugger::isCommandLineAPIMethod(const String16& name)
709 { 709 {
710 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, methods, ()); 710 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, methods, ());
711 if (methods.size() == 0) { 711 if (methods.size() == 0) {
712 const char* members[] = { "dir", "dirxml", "keys", "values", "profile", "profileEnd", 712 const char* members[] = { "dir", "dirxml", "keys", "values", "profile", "profileEnd", "inspect",
713 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "get EventListeners", 713 "copy", "clear", "getEventListeners", "debug", "undebug", "monitor", "unmonitor", "table" };
714 "debug", "undebug", "monitor", "unmonitor", "table" };
715 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) 714 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i)
716 methods.add(members[i]); 715 methods.add(members[i]);
717 } 716 }
718 return methods.find(name) != methods.end(); 717 return methods.find(name) != methods.end();
719 } 718 }
720 719
721 bool V8Debugger::isCommandLineAPIGetter(const String16& name) 720 bool V8Debugger::isCommandLineAPIGetter(const String16& name)
722 { 721 {
723 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ()); 722 DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ());
724 if (getters.size() == 0) { 723 if (getters.size() == 0) {
725 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" }; 724 const char* members[] = { "$0", "$1", "$2", "$3", "$4", "$_" };
726 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) 725 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i)
727 getters.add(members[i]); 726 getters.add(members[i]);
728 } 727 }
729 return getters.find(name) != getters.end(); 728 return getters.find(name) != getters.end();
730 } 729 }
731 730
732 } // namespace blink 731 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698