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

Side by Side Diff: Source/core/frame/ConsoleBase.h

Issue 206093005: Oilpan: move Console objects to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make ConsoleBase::trace() a pure virtual Created 6 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
« no previous file with comments | « Source/core/frame/Console.h ('k') | Source/core/frame/ConsoleBase.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 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 18 matching lines...) Expand all
29 29
30 #ifndef ConsoleBase_h 30 #ifndef ConsoleBase_h
31 #define ConsoleBase_h 31 #define ConsoleBase_h
32 32
33 #include "bindings/v8/ScriptState.h" 33 #include "bindings/v8/ScriptState.h"
34 #include "bindings/v8/ScriptWrappable.h" 34 #include "bindings/v8/ScriptWrappable.h"
35 #include "core/inspector/ConsoleAPITypes.h" 35 #include "core/inspector/ConsoleAPITypes.h"
36 #include "core/inspector/ScriptCallStack.h" 36 #include "core/inspector/ScriptCallStack.h"
37 #include "core/frame/ConsoleTypes.h" 37 #include "core/frame/ConsoleTypes.h"
38 #include "core/frame/DOMWindowProperty.h" 38 #include "core/frame/DOMWindowProperty.h"
39 #include "heap/Handle.h"
39 #include "wtf/Forward.h" 40 #include "wtf/Forward.h"
40 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
41 #include "wtf/RefCounted.h" 42 #include "wtf/RefCounted.h"
42 43
43 namespace WebCore { 44 namespace WebCore {
44 45
45 class ScriptArguments; 46 class ScriptArguments;
46 47
47 class ConsoleBase { 48 class ConsoleBase : public RefCountedWillBeGarbageCollectedFinalized<ConsoleBase > {
48 public: 49 public:
49 void ref() { refConsole(); }
50 void deref() { derefConsole(); }
51
52 void debug(ScriptState*, PassRefPtr<ScriptArguments>); 50 void debug(ScriptState*, PassRefPtr<ScriptArguments>);
53 void error(ScriptState*, PassRefPtr<ScriptArguments>); 51 void error(ScriptState*, PassRefPtr<ScriptArguments>);
54 void info(ScriptState*, PassRefPtr<ScriptArguments>); 52 void info(ScriptState*, PassRefPtr<ScriptArguments>);
55 void log(ScriptState*, PassRefPtr<ScriptArguments>); 53 void log(ScriptState*, PassRefPtr<ScriptArguments>);
56 void clear(ScriptState*, PassRefPtr<ScriptArguments>); 54 void clear(ScriptState*, PassRefPtr<ScriptArguments>);
57 void warn(ScriptState*, PassRefPtr<ScriptArguments>); 55 void warn(ScriptState*, PassRefPtr<ScriptArguments>);
58 void dir(ScriptState*, PassRefPtr<ScriptArguments>); 56 void dir(ScriptState*, PassRefPtr<ScriptArguments>);
59 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>); 57 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>);
60 void table(ScriptState*, PassRefPtr<ScriptArguments>); 58 void table(ScriptState*, PassRefPtr<ScriptArguments>);
61 void trace(ScriptState*, PassRefPtr<ScriptArguments>); 59 void trace(ScriptState*, PassRefPtr<ScriptArguments>);
62 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi on); 60 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi on);
63 void count(ScriptState*, PassRefPtr<ScriptArguments>); 61 void count(ScriptState*, PassRefPtr<ScriptArguments>);
64 void markTimeline(const String&); 62 void markTimeline(const String&);
65 void profile(ScriptState*, const String&); 63 void profile(ScriptState*, const String&);
66 void profileEnd(ScriptState*, const String&); 64 void profileEnd(ScriptState*, const String&);
67 void time(const String&); 65 void time(const String&);
68 void timeEnd(ScriptState*, const String&); 66 void timeEnd(ScriptState*, const String&);
69 void timeStamp(const String&); 67 void timeStamp(const String&);
70 void timeline(ScriptState*, const String&); 68 void timeline(ScriptState*, const String&);
71 void timelineEnd(ScriptState*, const String&); 69 void timelineEnd(ScriptState*, const String&);
72 void group(ScriptState*, PassRefPtr<ScriptArguments>); 70 void group(ScriptState*, PassRefPtr<ScriptArguments>);
73 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>); 71 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>);
74 void groupEnd(); 72 void groupEnd();
75 73
74 virtual void trace(Visitor*) = 0;
75
76 virtual ~ConsoleBase();
77
76 protected: 78 protected:
77 virtual ~ConsoleBase();
78 virtual ExecutionContext* context() = 0; 79 virtual ExecutionContext* context() = 0;
79 virtual void reportMessageToClient(MessageLevel, const String& message, Pass RefPtr<ScriptCallStack>) = 0; 80 virtual void reportMessageToClient(MessageLevel, const String& message, Pass RefPtr<ScriptCallStack>) = 0;
80 81
81 private: 82 private:
82 virtual void refConsole() = 0;
83 virtual void derefConsole() = 0;
84
85 void internalAddMessage(MessageType, MessageLevel, ScriptState*, PassRefPtr< ScriptArguments>, bool acceptNoArguments = false, bool printTrace = false); 83 void internalAddMessage(MessageType, MessageLevel, ScriptState*, PassRefPtr< ScriptArguments>, bool acceptNoArguments = false, bool printTrace = false);
86 }; 84 };
87 85
88 } // namespace WebCore 86 } // namespace WebCore
89 87
90 #endif // ConsoleBase_h 88 #endif // ConsoleBase_h
OLDNEW
« no previous file with comments | « Source/core/frame/Console.h ('k') | Source/core/frame/ConsoleBase.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698