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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptManager.h

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 2 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef InjectedScriptManager_h 30 #ifndef InjectedScriptManager_h
31 #define InjectedScriptManager_h 31 #define InjectedScriptManager_h
32 32
33 #include "platform/inspector_protocol/Allocator.h" 33 #include "platform/inspector_protocol/Allocator.h"
34 #include "platform/inspector_protocol/Collections.h" 34 #include "platform/inspector_protocol/Collections.h"
35 #include "wtf/text/WTFString.h" 35 #include "platform/inspector_protocol/String16.h"
36 #include <v8.h> 36 #include <v8.h>
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class InjectedScript; 40 class InjectedScript;
41 class InjectedScriptHost; 41 class InjectedScriptHost;
42 class InjectedScriptNative; 42 class InjectedScriptNative;
43 class RemoteObjectIdBase; 43 class RemoteObjectIdBase;
44 class V8DebuggerClient; 44 class V8DebuggerClient;
45 class V8DebuggerImpl; 45 class V8DebuggerImpl;
46 46
47 class InjectedScriptManager { 47 class InjectedScriptManager {
48 PROTOCOL_DISALLOW_COPY(InjectedScriptManager); 48 PROTOCOL_DISALLOW_COPY(InjectedScriptManager);
49 public: 49 public:
50 static PassOwnPtr<InjectedScriptManager> create(V8DebuggerImpl*); 50 static PassOwnPtr<InjectedScriptManager> create(V8DebuggerImpl*);
51 ~InjectedScriptManager(); 51 ~InjectedScriptManager();
52 52
53 InjectedScriptHost* injectedScriptHost(); 53 InjectedScriptHost* injectedScriptHost();
54 54
55 InjectedScript* injectedScriptFor(v8::Local<v8::Context>); 55 InjectedScript* injectedScriptFor(v8::Local<v8::Context>);
56 InjectedScript* findInjectedScript(int) const; 56 InjectedScript* findInjectedScript(int) const;
57 InjectedScript* findInjectedScript(RemoteObjectIdBase*) const; 57 InjectedScript* findInjectedScript(RemoteObjectIdBase*) const;
58 void discardInjectedScripts(); 58 void discardInjectedScripts();
59 int discardInjectedScriptFor(v8::Local<v8::Context>); 59 int discardInjectedScriptFor(v8::Local<v8::Context>);
60 void discardInjectedScript(int); 60 void discardInjectedScript(int);
61 void releaseObjectGroup(const String& objectGroup); 61 void releaseObjectGroup(const String16& objectGroup);
62 void setCustomObjectFormatterEnabled(bool); 62 void setCustomObjectFormatterEnabled(bool);
63 63
64 private: 64 private:
65 explicit InjectedScriptManager(V8DebuggerImpl*); 65 explicit InjectedScriptManager(V8DebuggerImpl*);
66 66
67 v8::Local<v8::Object> createInjectedScript(const String& source, v8::Local<v 8::Context>, int id, InjectedScriptNative*); 67 v8::Local<v8::Object> createInjectedScript(const String16& source, v8::Local <v8::Context>, int id, InjectedScriptNative*);
68 68
69 typedef protocol::HashMap<int, OwnPtr<InjectedScript>> IdToInjectedScriptMap ; 69 typedef protocol::HashMap<int, OwnPtr<InjectedScript>> IdToInjectedScriptMap ;
70 IdToInjectedScriptMap m_idToInjectedScript; 70 IdToInjectedScriptMap m_idToInjectedScript;
71 OwnPtr<InjectedScriptHost> m_injectedScriptHost; 71 OwnPtr<InjectedScriptHost> m_injectedScriptHost;
72 bool m_customObjectFormatterEnabled; 72 bool m_customObjectFormatterEnabled;
73 V8DebuggerClient* m_client; 73 V8DebuggerClient* m_client;
74 }; 74 };
75 75
76 } // namespace blink 76 } // namespace blink
77 77
78 #endif // !defined(InjectedScriptManager_h) 78 #endif // !defined(InjectedScriptManager_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698