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

Side by Side Diff: Source/WebCore/inspector/InjectedScriptHost.h

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 static PassRefPtr<InjectedScriptHost> create(); 62 static PassRefPtr<InjectedScriptHost> create();
63 ~InjectedScriptHost(); 63 ~InjectedScriptHost();
64 64
65 void init(InspectorAgent* inspectorAgent 65 void init(InspectorAgent* inspectorAgent
66 , InspectorConsoleAgent* consoleAgent 66 , InspectorConsoleAgent* consoleAgent
67 #if ENABLE(SQL_DATABASE) 67 #if ENABLE(SQL_DATABASE)
68 , InspectorDatabaseAgent* databaseAgent 68 , InspectorDatabaseAgent* databaseAgent
69 #endif 69 #endif
70 , InspectorDOMStorageAgent* domStorageAgent 70 , InspectorDOMStorageAgent* domStorageAgent
71 , InspectorDOMAgent* domAgent 71 , InspectorDOMAgent* domAgent
72 #if ENABLE(JAVASCRIPT_DEBUGGER)
73 , InspectorDebuggerAgent* debuggerAgent 72 , InspectorDebuggerAgent* debuggerAgent
74 #endif
75 ) 73 )
76 { 74 {
77 m_inspectorAgent = inspectorAgent; 75 m_inspectorAgent = inspectorAgent;
78 m_consoleAgent = consoleAgent; 76 m_consoleAgent = consoleAgent;
79 #if ENABLE(SQL_DATABASE) 77 #if ENABLE(SQL_DATABASE)
80 m_databaseAgent = databaseAgent; 78 m_databaseAgent = databaseAgent;
81 #endif 79 #endif
82 m_domStorageAgent = domStorageAgent; 80 m_domStorageAgent = domStorageAgent;
83 m_domAgent = domAgent; 81 m_domAgent = domAgent;
84 #if ENABLE(JAVASCRIPT_DEBUGGER)
85 m_debuggerAgent = debuggerAgent; 82 m_debuggerAgent = debuggerAgent;
86 #endif
87 } 83 }
88 84
89 static Node* scriptValueAsNode(ScriptValue); 85 static Node* scriptValueAsNode(ScriptValue);
90 static ScriptValue nodeAsScriptValue(ScriptState*, Node*); 86 static ScriptValue nodeAsScriptValue(ScriptState*, Node*);
91 87
92 void disconnect(); 88 void disconnect();
93 89
94 class InspectableObject { 90 class InspectableObject {
95 WTF_MAKE_FAST_ALLOCATED; 91 WTF_MAKE_FAST_ALLOCATED;
96 public: 92 public:
97 virtual ScriptValue get(ScriptState*); 93 virtual ScriptValue get(ScriptState*);
98 virtual ~InspectableObject() { } 94 virtual ~InspectableObject() { }
99 }; 95 };
100 void addInspectedObject(PassOwnPtr<InspectableObject>); 96 void addInspectedObject(PassOwnPtr<InspectableObject>);
101 void clearInspectedObjects(); 97 void clearInspectedObjects();
102 InspectableObject* inspectedObject(unsigned int num); 98 InspectableObject* inspectedObject(unsigned int num);
103 99
104 void inspectImpl(PassRefPtr<InspectorValue> objectToInspect, PassRefPtr<Insp ectorValue> hints); 100 void inspectImpl(PassRefPtr<InspectorValue> objectToInspect, PassRefPtr<Insp ectorValue> hints);
105 void getEventListenersImpl(Node*, Vector<EventListenerInfo>& listenersArray) ; 101 void getEventListenersImpl(Node*, Vector<EventListenerInfo>& listenersArray) ;
106 102
107 void clearConsoleMessages(); 103 void clearConsoleMessages();
108 void copyText(const String& text); 104 void copyText(const String& text);
109 #if ENABLE(SQL_DATABASE) 105 #if ENABLE(SQL_DATABASE)
110 String databaseIdImpl(Database*); 106 String databaseIdImpl(Database*);
111 #endif 107 #endif
112 String storageIdImpl(Storage*); 108 String storageIdImpl(Storage*);
113 109
114 #if ENABLE(JAVASCRIPT_DEBUGGER)
115 ScriptDebugServer& scriptDebugServer(); 110 ScriptDebugServer& scriptDebugServer();
116 #endif
117 111
118 private: 112 private:
119 InjectedScriptHost(); 113 InjectedScriptHost();
120 114
121 InspectorAgent* m_inspectorAgent; 115 InspectorAgent* m_inspectorAgent;
122 InspectorConsoleAgent* m_consoleAgent; 116 InspectorConsoleAgent* m_consoleAgent;
123 #if ENABLE(SQL_DATABASE) 117 #if ENABLE(SQL_DATABASE)
124 InspectorDatabaseAgent* m_databaseAgent; 118 InspectorDatabaseAgent* m_databaseAgent;
125 #endif 119 #endif
126 InspectorDOMStorageAgent* m_domStorageAgent; 120 InspectorDOMStorageAgent* m_domStorageAgent;
127 InspectorDOMAgent* m_domAgent; 121 InspectorDOMAgent* m_domAgent;
128 #if ENABLE(JAVASCRIPT_DEBUGGER)
129 InspectorDebuggerAgent* m_debuggerAgent; 122 InspectorDebuggerAgent* m_debuggerAgent;
130 #endif
131 Vector<OwnPtr<InspectableObject> > m_inspectedObjects; 123 Vector<OwnPtr<InspectableObject> > m_inspectedObjects;
132 OwnPtr<InspectableObject> m_defaultInspectableObject; 124 OwnPtr<InspectableObject> m_defaultInspectableObject;
133 }; 125 };
134 126
135 } // namespace WebCore 127 } // namespace WebCore
136 128
137 #endif // !defined(InjectedScriptHost_h) 129 #endif // !defined(InjectedScriptHost_h)
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/InjectedScriptCanvasModule.cpp ('k') | Source/WebCore/inspector/InjectedScriptHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698