| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include <wtf/PassRefPtr.h> | 37 #include <wtf/PassRefPtr.h> |
| 38 #include <wtf/RefCounted.h> | 38 #include <wtf/RefCounted.h> |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class Frame; | 42 class Frame; |
| 43 class MemoryInfo; | 43 class MemoryInfo; |
| 44 class Page; | 44 class Page; |
| 45 class ScriptArguments; | 45 class ScriptArguments; |
| 46 | 46 |
| 47 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
| 48 typedef Vector<RefPtr<ScriptProfile> > ProfilesArray; | 47 typedef Vector<RefPtr<ScriptProfile> > ProfilesArray; |
| 49 #endif | |
| 50 | 48 |
| 51 class Console : public ScriptWrappable, public RefCounted<Console>, public DOMWi
ndowProperty { | 49 class Console : public ScriptWrappable, public RefCounted<Console>, public DOMWi
ndowProperty { |
| 52 public: | 50 public: |
| 53 static PassRefPtr<Console> create(Frame* frame) { return adoptRef(new Consol
e(frame)); } | 51 static PassRefPtr<Console> create(Frame* frame) { return adoptRef(new Consol
e(frame)); } |
| 54 virtual ~Console(); | 52 virtual ~Console(); |
| 55 | 53 |
| 56 void debug(ScriptState*, PassRefPtr<ScriptArguments>); | 54 void debug(ScriptState*, PassRefPtr<ScriptArguments>); |
| 57 void error(ScriptState*, PassRefPtr<ScriptArguments>); | 55 void error(ScriptState*, PassRefPtr<ScriptArguments>); |
| 58 void info(ScriptState*, PassRefPtr<ScriptArguments>); | 56 void info(ScriptState*, PassRefPtr<ScriptArguments>); |
| 59 void log(ScriptState*, PassRefPtr<ScriptArguments>); | 57 void log(ScriptState*, PassRefPtr<ScriptArguments>); |
| 60 void clear(ScriptState*, PassRefPtr<ScriptArguments>); | 58 void clear(ScriptState*, PassRefPtr<ScriptArguments>); |
| 61 void warn(ScriptState*, PassRefPtr<ScriptArguments>); | 59 void warn(ScriptState*, PassRefPtr<ScriptArguments>); |
| 62 void dir(ScriptState*, PassRefPtr<ScriptArguments>); | 60 void dir(ScriptState*, PassRefPtr<ScriptArguments>); |
| 63 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>); | 61 void dirxml(ScriptState*, PassRefPtr<ScriptArguments>); |
| 64 void table(ScriptState*, PassRefPtr<ScriptArguments>); | 62 void table(ScriptState*, PassRefPtr<ScriptArguments>); |
| 65 void trace(ScriptState*, PassRefPtr<ScriptArguments>); | 63 void trace(ScriptState*, PassRefPtr<ScriptArguments>); |
| 66 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi
on); | 64 void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool conditi
on); |
| 67 void count(ScriptState*, PassRefPtr<ScriptArguments>); | 65 void count(ScriptState*, PassRefPtr<ScriptArguments>); |
| 68 void markTimeline(PassRefPtr<ScriptArguments>); | 66 void markTimeline(PassRefPtr<ScriptArguments>); |
| 69 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
| 70 const ProfilesArray& profiles() const { return m_profiles; } | 67 const ProfilesArray& profiles() const { return m_profiles; } |
| 71 void profile(const String&, ScriptState*); | 68 void profile(const String&, ScriptState*); |
| 72 void profileEnd(const String&, ScriptState*); | 69 void profileEnd(const String&, ScriptState*); |
| 73 #endif | |
| 74 void time(const String&); | 70 void time(const String&); |
| 75 void timeEnd(ScriptState*, const String&); | 71 void timeEnd(ScriptState*, const String&); |
| 76 void timeStamp(PassRefPtr<ScriptArguments>); | 72 void timeStamp(PassRefPtr<ScriptArguments>); |
| 77 void group(ScriptState*, PassRefPtr<ScriptArguments>); | 73 void group(ScriptState*, PassRefPtr<ScriptArguments>); |
| 78 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>); | 74 void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>); |
| 79 void groupEnd(); | 75 void groupEnd(); |
| 80 | 76 |
| 81 PassRefPtr<MemoryInfo> memory() const; | 77 PassRefPtr<MemoryInfo> memory() const; |
| 82 | 78 |
| 83 private: | 79 private: |
| 84 inline Page* page() const; | 80 inline Page* page() const; |
| 85 | 81 |
| 86 explicit Console(Frame*); | 82 explicit Console(Frame*); |
| 87 | 83 |
| 88 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
| 89 ProfilesArray m_profiles; | 84 ProfilesArray m_profiles; |
| 90 #endif | |
| 91 }; | 85 }; |
| 92 | 86 |
| 93 } // namespace WebCore | 87 } // namespace WebCore |
| 94 | 88 |
| 95 #endif // Console_h | 89 #endif // Console_h |
| OLD | NEW |