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

Side by Side Diff: Source/bindings/v8/PageScriptDebugServer.h

Issue 13575004: Apply script preprocessor to Web page scripts only. (Closed) Base URL: https://chromium.googlesource.com/external/WebKit_trimmed.git@master
Patch Set: respond to haraken comment #35 Created 7 years, 5 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) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 #ifndef PageScriptDebugServer_h 31 #ifndef PageScriptDebugServer_h
32 #define PageScriptDebugServer_h 32 #define PageScriptDebugServer_h
33 33
34 34
35 #include "bindings/v8/ScriptDebugServer.h" 35 #include "bindings/v8/ScriptDebugServer.h"
36 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class Page; 40 class Page;
41 class ScriptController;
41 42
42 class PageScriptDebugServer : public ScriptDebugServer { 43 class PageScriptDebugServer : public ScriptDebugServer {
43 WTF_MAKE_NONCOPYABLE(PageScriptDebugServer); 44 WTF_MAKE_NONCOPYABLE(PageScriptDebugServer);
44 public: 45 public:
45 static PageScriptDebugServer& shared(); 46 static PageScriptDebugServer& shared();
46 47
47 void addListener(ScriptDebugListener*, Page*); 48 void addListener(ScriptDebugListener*, Page*);
48 void removeListener(ScriptDebugListener*, Page*); 49 void removeListener(ScriptDebugListener*, Page*);
49 50
50 class ClientMessageLoop { 51 class ClientMessageLoop {
51 public: 52 public:
52 virtual ~ClientMessageLoop() { } 53 virtual ~ClientMessageLoop() { }
53 virtual void run(Page*) = 0; 54 virtual void run(Page*) = 0;
54 virtual void quitNow() = 0; 55 virtual void quitNow() = 0;
55 }; 56 };
56 void setClientMessageLoop(PassOwnPtr<ClientMessageLoop>); 57 void setClientMessageLoop(PassOwnPtr<ClientMessageLoop>);
57 58
58 virtual void compileScript(ScriptState*, const String& expression, const Str ing& sourceURL, String* scriptId, String* exceptionMessage); 59 virtual void compileScript(ScriptState*, const String& expression, const Str ing& sourceURL, String* scriptId, String* exceptionMessage);
59 virtual void clearCompiledScripts(); 60 virtual void clearCompiledScripts();
60 virtual void runScript(ScriptState*, const String& scriptId, ScriptValue* re sult, bool* wasThrown, String* exceptionMessage); 61 virtual void runScript(ScriptState*, const String& scriptId, ScriptValue* re sult, bool* wasThrown, String* exceptionMessage);
62 virtual ScriptController* scriptController(v8::Handle<v8::Context>);
61 63
62 private: 64 private:
63 PageScriptDebugServer(); 65 PageScriptDebugServer();
64 virtual ~PageScriptDebugServer() { } 66 virtual ~PageScriptDebugServer() { }
65 67
66 virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Conte xt>); 68 virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Conte xt>);
67 virtual void runMessageLoopOnPause(v8::Handle<v8::Context>); 69 virtual void runMessageLoopOnPause(v8::Handle<v8::Context>);
68 virtual void quitMessageLoopOnPause(); 70 virtual void quitMessageLoopOnPause();
69 71
70 typedef HashMap<Page*, ScriptDebugListener*> ListenersMap; 72 typedef HashMap<Page*, ScriptDebugListener*> ListenersMap;
71 ListenersMap m_listenersMap; 73 ListenersMap m_listenersMap;
72 OwnPtr<ClientMessageLoop> m_clientMessageLoop; 74 OwnPtr<ClientMessageLoop> m_clientMessageLoop;
73 Page* m_pausedPage; 75 Page* m_pausedPage;
74 HashMap<String, String> m_compiledScriptURLs; 76 HashMap<String, String> m_compiledScriptURLs;
75 }; 77 };
76 78
77 } // namespace WebCore 79 } // namespace WebCore
78 80
79 81
80 #endif // PageScriptDebugServer_h 82 #endif // PageScriptDebugServer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698