Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 23319002: Set MessageEvent.source to the newly created port for shared workers' connect events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test and assertions Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
732 return m_webFrame->client()->cookieJar(m_webFrame); 732 return m_webFrame->client()->cookieJar(m_webFrame);
733 } 733 }
734 734
735 bool FrameLoaderClientImpl::willCheckAndDispatchMessageEvent( 735 bool FrameLoaderClientImpl::willCheckAndDispatchMessageEvent(
736 SecurityOrigin* target, MessageEvent* event) const 736 SecurityOrigin* target, MessageEvent* event) const
737 { 737 {
738 if (!m_webFrame->client()) 738 if (!m_webFrame->client())
739 return false; 739 return false;
740 740
741 WebFrame* source = 0; 741 WebFrame* source = 0;
742 if (event && event->source() && event->source()->document()) 742 if (event && event->source() && event->source()->toDOMWindow() && event->sou rce()->toDOMWindow()->document())
743 source = WebFrameImpl::fromFrame(event->source()->document()->frame()); 743 source = WebFrameImpl::fromFrame(event->source()->toDOMWindow()->documen t()->frame());
744 return m_webFrame->client()->willCheckAndDispatchMessageEvent( 744 return m_webFrame->client()->willCheckAndDispatchMessageEvent(
745 source, m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event) ); 745 source, m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event) );
746 } 746 }
747 747
748 void FrameLoaderClientImpl::didChangeName(const String& name) 748 void FrameLoaderClientImpl::didChangeName(const String& name)
749 { 749 {
750 if (!m_webFrame->client()) 750 if (!m_webFrame->client())
751 return; 751 return;
752 m_webFrame->client()->didChangeName(m_webFrame, name); 752 m_webFrame->client()->didChangeName(m_webFrame, name);
753 } 753 }
(...skipping 28 matching lines...) Expand all
782 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte xtLostReason); 782 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte xtLostReason);
783 } 783 }
784 784
785 void FrameLoaderClientImpl::dispatchWillInsertBody() 785 void FrameLoaderClientImpl::dispatchWillInsertBody()
786 { 786 {
787 if (m_webFrame->client()) 787 if (m_webFrame->client())
788 m_webFrame->client()->willInsertBody(m_webFrame); 788 m_webFrame->client()->willInsertBody(m_webFrame);
789 } 789 }
790 790
791 } // namespace WebKit 791 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698