| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/frame/FrameHost.h" | 32 #include "core/frame/FrameHost.h" |
| 33 | 33 |
| 34 #include "core/frame/EventHandlerRegistry.h" | 34 #include "core/frame/EventHandlerRegistry.h" |
| 35 #include "core/inspector/ConsoleMessageStorage.h" |
| 35 #include "core/page/Chrome.h" | 36 #include "core/page/Chrome.h" |
| 36 #include "core/page/ChromeClient.h" | 37 #include "core/page/ChromeClient.h" |
| 37 #include "core/page/Page.h" | 38 #include "core/page/Page.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 PassOwnPtrWillBeRawPtr<FrameHost> FrameHost::create(Page& page) | 42 PassOwnPtrWillBeRawPtr<FrameHost> FrameHost::create(Page& page) |
| 42 { | 43 { |
| 43 return adoptPtrWillBeNoop(new FrameHost(page)); | 44 return adoptPtrWillBeNoop(new FrameHost(page)); |
| 44 } | 45 } |
| 45 | 46 |
| 46 FrameHost::FrameHost(Page& page) | 47 FrameHost::FrameHost(Page& page) |
| 47 : m_page(&page) | 48 : m_page(&page) |
| 48 , m_pinchViewport(PinchViewport::create(*this)) | 49 , m_pinchViewport(PinchViewport::create(*this)) |
| 49 , m_eventHandlerRegistry(adoptPtrWillBeNoop(new EventHandlerRegistry(*this))
) | 50 , m_eventHandlerRegistry(adoptPtrWillBeNoop(new EventHandlerRegistry(*this))
) |
| 51 , m_consoleMessageStorage(ConsoleMessageStorage::createForFrameHost(this)) |
| 50 { | 52 { |
| 51 } | 53 } |
| 52 | 54 |
| 53 // Explicitly in the .cpp to avoid default constructor in .h | 55 // Explicitly in the .cpp to avoid default constructor in .h |
| 54 FrameHost::~FrameHost() | 56 FrameHost::~FrameHost() |
| 55 { | 57 { |
| 56 } | 58 } |
| 57 | 59 |
| 58 Settings& FrameHost::settings() const | 60 Settings& FrameHost::settings() const |
| 59 { | 61 { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 78 PinchViewport& FrameHost::pinchViewport() const | 80 PinchViewport& FrameHost::pinchViewport() const |
| 79 { | 81 { |
| 80 return *m_pinchViewport; | 82 return *m_pinchViewport; |
| 81 } | 83 } |
| 82 | 84 |
| 83 EventHandlerRegistry& FrameHost::eventHandlerRegistry() const | 85 EventHandlerRegistry& FrameHost::eventHandlerRegistry() const |
| 84 { | 86 { |
| 85 return *m_eventHandlerRegistry; | 87 return *m_eventHandlerRegistry; |
| 86 } | 88 } |
| 87 | 89 |
| 90 ConsoleMessageStorage& FrameHost::consoleMessageStorage() const |
| 91 { |
| 92 return *m_consoleMessageStorage; |
| 93 } |
| 94 |
| 88 void FrameHost::trace(Visitor* visitor) | 95 void FrameHost::trace(Visitor* visitor) |
| 89 { | 96 { |
| 90 visitor->trace(m_page); | 97 visitor->trace(m_page); |
| 91 visitor->trace(m_pinchViewport); | 98 visitor->trace(m_pinchViewport); |
| 92 visitor->trace(m_eventHandlerRegistry); | 99 visitor->trace(m_eventHandlerRegistry); |
| 100 visitor->trace(m_consoleMessageStorage); |
| 93 } | 101 } |
| 94 | 102 |
| 95 } | 103 } |
| OLD | NEW |