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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 Console::Console(LocalFrame* frame) | 50 Console::Console(LocalFrame* frame) |
51 : DOMWindowProperty(frame) | 51 : DOMWindowProperty(frame) |
52 { | 52 { |
53 } | 53 } |
54 | 54 |
55 Console::~Console() | 55 Console::~Console() |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 void Console::trace(Visitor* visitor) | 59 DEFINE_TRACE(Console) |
60 { | 60 { |
61 ConsoleBase::trace(visitor); | 61 ConsoleBase::trace(visitor); |
62 DOMWindowProperty::trace(visitor); | 62 DOMWindowProperty::trace(visitor); |
63 } | 63 } |
64 | 64 |
65 ExecutionContext* Console::context() | 65 ExecutionContext* Console::context() |
66 { | 66 { |
67 if (!frame()) | 67 if (!frame()) |
68 return 0; | 68 return 0; |
69 return frame()->document(); | 69 return frame()->document(); |
70 } | 70 } |
71 | 71 |
72 void Console::reportMessageToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage> cons
oleMessage) | 72 void Console::reportMessageToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage> cons
oleMessage) |
73 { | 73 { |
74 if (!frame()) | 74 if (!frame()) |
75 return; | 75 return; |
76 | 76 |
77 frame()->console().addMessage(consoleMessage); | 77 frame()->console().addMessage(consoleMessage); |
78 } | 78 } |
79 | 79 |
80 PassRefPtrWillBeRawPtr<MemoryInfo> Console::memory() const | 80 PassRefPtrWillBeRawPtr<MemoryInfo> Console::memory() const |
81 { | 81 { |
82 // FIXME: Because we create a new object here each time, | 82 // FIXME: Because we create a new object here each time, |
83 // console.memory !== console.memory, which seems wrong. | 83 // console.memory !== console.memory, which seems wrong. |
84 return MemoryInfo::create(); | 84 return MemoryInfo::create(); |
85 } | 85 } |
86 | 86 |
87 } // namespace blink | 87 } // namespace blink |
OLD | NEW |