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

Side by Side Diff: Source/core/inspector/InspectorConsoleAgent.h

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments Created 7 years, 6 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) 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class ResourceError; 50 class ResourceError;
51 class ResourceLoader; 51 class ResourceLoader;
52 class ResourceResponse; 52 class ResourceResponse;
53 class ScriptArguments; 53 class ScriptArguments;
54 class ScriptCallStack; 54 class ScriptCallStack;
55 class ScriptProfile; 55 class ScriptProfile;
56 class ThreadableLoaderClient; 56 class ThreadableLoaderClient;
57 57
58 typedef String ErrorString; 58 typedef String ErrorString;
59 59
60 class InspectorConsoleAgent : public InspectorBaseAgent<InspectorConsoleAgent>, public InspectorBackendDispatcher::ConsoleCommandHandler { 60 class InspectorConsoleAgent : public InspectorBaseAgent, public InspectorBackend Dispatcher::ConsoleCommandHandler {
61 WTF_MAKE_NONCOPYABLE(InspectorConsoleAgent); 61 WTF_MAKE_NONCOPYABLE(InspectorConsoleAgent);
62 public: 62 public:
63 InspectorConsoleAgent(InstrumentingAgents*, InspectorCompositeState*, Inject edScriptManager*); 63 InspectorConsoleAgent(InstrumentingAgents*, InspectorState*, InjectedScriptM anager*);
64 virtual ~InspectorConsoleAgent(); 64 virtual ~InspectorConsoleAgent();
65 65
66 virtual void enable(ErrorString*); 66 virtual void enable(ErrorString*);
67 virtual void disable(ErrorString*); 67 virtual void disable(ErrorString*);
68 virtual void clearMessages(ErrorString*); 68 virtual void clearMessages(ErrorString*);
69 bool enabled() { return m_enabled; } 69 bool enabled() { return m_enabled; }
70 void reset(); 70 void reset();
71 71
72 virtual void setFrontend(InspectorFrontend*); 72 virtual void setFrontend(InspectorFrontend*);
73 virtual void clearFrontend(); 73 virtual void clearFrontend();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ConsoleMessage* m_previousMessage; 107 ConsoleMessage* m_previousMessage;
108 Vector<OwnPtr<ConsoleMessage> > m_consoleMessages; 108 Vector<OwnPtr<ConsoleMessage> > m_consoleMessages;
109 int m_expiredConsoleMessageCount; 109 int m_expiredConsoleMessageCount;
110 HashMap<String, unsigned> m_counts; 110 HashMap<String, unsigned> m_counts;
111 HashMap<String, double> m_times; 111 HashMap<String, double> m_times;
112 bool m_enabled; 112 bool m_enabled;
113 private: 113 private:
114 static int s_enabledAgentCount; 114 static int s_enabledAgentCount;
115 }; 115 };
116 116
117 class InspectorConsoleFactory : public InspectorBaseFactory<InspectorConsoleFact ory, InspectorConsoleAgent> {
118 protected:
119 InspectorConsoleFactory(InstrumentingAgents* instrumentingAgents, InspectorC ompositeState* compositeState)
120 : InspectorBaseFactory<InspectorConsoleFactory, InspectorConsoleAgent>(" Console", instrumentingAgents, compositeState) { }
121 };
122
117 } // namespace WebCore 123 } // namespace WebCore
118 124
119 125
120 #endif // !defined(InspectorConsoleAgent_h) 126 #endif // !defined(InspectorConsoleAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCanvasAgent.cpp ('k') | Source/core/inspector/InspectorConsoleAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698