| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 } | 732 } |
| 733 | 733 |
| 734 WebCookieJar* FrameLoaderClientImpl::cookieJar() const | 734 WebCookieJar* FrameLoaderClientImpl::cookieJar() const |
| 735 { | 735 { |
| 736 if (!m_webFrame->client()) | 736 if (!m_webFrame->client()) |
| 737 return 0; | 737 return 0; |
| 738 return m_webFrame->client()->cookieJar(m_webFrame); | 738 return m_webFrame->client()->cookieJar(m_webFrame); |
| 739 } | 739 } |
| 740 | 740 |
| 741 bool FrameLoaderClientImpl::willCheckAndDispatchMessageEvent( | 741 bool FrameLoaderClientImpl::willCheckAndDispatchMessageEvent( |
| 742 SecurityOrigin* target, MessageEvent* event) const | 742 SecurityOrigin* target, MessageEvent* event, LocalFrame* sourceFrame) const |
| 743 { | 743 { |
| 744 if (!m_webFrame->client()) | 744 if (!m_webFrame->client()) |
| 745 return false; | 745 return false; |
| 746 | |
| 747 WebLocalFrame* source = 0; | |
| 748 if (event && event->source() && event->source()->toDOMWindow() && event->sou
rce()->toDOMWindow()->document()) | |
| 749 source = WebLocalFrameImpl::fromFrame(event->source()->toDOMWindow()->do
cument()->frame()); | |
| 750 return m_webFrame->client()->willCheckAndDispatchMessageEvent( | 746 return m_webFrame->client()->willCheckAndDispatchMessageEvent( |
| 751 source, m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event)
); | 747 WebLocalFrameImpl::fromFrame(sourceFrame), m_webFrame, WebSecurityOrigin
(target), WebDOMMessageEvent(event)); |
| 752 } | 748 } |
| 753 | 749 |
| 754 void FrameLoaderClientImpl::didChangeName(const String& name) | 750 void FrameLoaderClientImpl::didChangeName(const String& name) |
| 755 { | 751 { |
| 756 if (!m_webFrame->client()) | 752 if (!m_webFrame->client()) |
| 757 return; | 753 return; |
| 758 m_webFrame->client()->didChangeName(m_webFrame, name); | 754 m_webFrame->client()->didChangeName(m_webFrame, name); |
| 759 } | 755 } |
| 760 | 756 |
| 761 void FrameLoaderClientImpl::dispatchWillOpenSocketStream(SocketStreamHandle* han
dle) | 757 void FrameLoaderClientImpl::dispatchWillOpenSocketStream(SocketStreamHandle* han
dle) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 m_webFrame->client()->didAbortLoading(m_webFrame); | 828 m_webFrame->client()->didAbortLoading(m_webFrame); |
| 833 } | 829 } |
| 834 | 830 |
| 835 void FrameLoaderClientImpl::dispatchDidChangeManifest() | 831 void FrameLoaderClientImpl::dispatchDidChangeManifest() |
| 836 { | 832 { |
| 837 if (m_webFrame->client()) | 833 if (m_webFrame->client()) |
| 838 m_webFrame->client()->didChangeManifest(m_webFrame); | 834 m_webFrame->client()->didChangeManifest(m_webFrame); |
| 839 } | 835 } |
| 840 | 836 |
| 841 } // namespace blink | 837 } // namespace blink |
| OLD | NEW |