| 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 30 matching lines...) Expand all Loading... |
| 41 #include "core/page/ChromeClient.h" | 41 #include "core/page/ChromeClient.h" |
| 42 #include "platform/TraceEvent.h" | 42 #include "platform/TraceEvent.h" |
| 43 #include "wtf/text/CString.h" | 43 #include "wtf/text/CString.h" |
| 44 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 Console::Console(LocalFrame* frame) | 48 Console::Console(LocalFrame* frame) |
| 49 : DOMWindowProperty(frame) | 49 : DOMWindowProperty(frame) |
| 50 { | 50 { |
| 51 ScriptWrappable::init(this); | |
| 52 } | 51 } |
| 53 | 52 |
| 54 Console::~Console() | 53 Console::~Console() |
| 55 { | 54 { |
| 56 } | 55 } |
| 57 | 56 |
| 58 ExecutionContext* Console::context() | 57 ExecutionContext* Console::context() |
| 59 { | 58 { |
| 60 if (!m_frame) | 59 if (!m_frame) |
| 61 return 0; | 60 return 0; |
| 62 return m_frame->document(); | 61 return m_frame->document(); |
| 63 } | 62 } |
| 64 | 63 |
| 65 void Console::reportMessageToConsole(PassRefPtr<ConsoleMessage> consoleMessage) | 64 void Console::reportMessageToConsole(PassRefPtr<ConsoleMessage> consoleMessage) |
| 66 { | 65 { |
| 67 if (!m_frame) | 66 if (!m_frame) |
| 68 return; | 67 return; |
| 69 | 68 |
| 70 m_frame->console().addMessage(consoleMessage); | 69 m_frame->console().addMessage(consoleMessage); |
| 71 } | 70 } |
| 72 | 71 |
| 73 } // namespace blink | 72 } // namespace blink |
| OLD | NEW |