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

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

Issue 1177333002: Revert of Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/web/RemoteFrameClientImpl.h ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "web/RemoteFrameClientImpl.h" 6 #include "web/RemoteFrameClientImpl.h"
7 7
8 #include "core/events/KeyboardEvent.h" 8 #include "core/events/KeyboardEvent.h"
9 #include "core/events/MouseEvent.h" 9 #include "core/events/MouseEvent.h"
10 #include "core/events/WheelEvent.h" 10 #include "core/events/WheelEvent.h"
(...skipping 17 matching lines...) Expand all
28 28
29 bool RemoteFrameClientImpl::inShadowTree() const 29 bool RemoteFrameClientImpl::inShadowTree() const
30 { 30 {
31 return m_webFrame->inShadowTree(); 31 return m_webFrame->inShadowTree();
32 } 32 }
33 33
34 void RemoteFrameClientImpl::willBeDetached() 34 void RemoteFrameClientImpl::willBeDetached()
35 { 35 {
36 } 36 }
37 37
38 void RemoteFrameClientImpl::detached(FrameDetachType type) 38 void RemoteFrameClientImpl::detached()
39 { 39 {
40 // Alert the client that the frame is being detached. 40 // Alert the client that the frame is being detached.
41 RefPtrWillBeRawPtr<WebRemoteFrameImpl> protector(m_webFrame); 41 RefPtrWillBeRawPtr<WebRemoteFrameImpl> protector(m_webFrame);
42 42
43 WebRemoteFrameClient* client = m_webFrame->client(); 43 WebRemoteFrameClient* client = m_webFrame->client();
44 if (!client) 44 if (!client)
45 return; 45 return;
46 46
47 client->frameDetached(static_cast<WebRemoteFrameClient::DetachType>(type)); 47 client->frameDetached();
48 // Clear our reference to RemoteFrame at the very end, in case the client 48 // Clear our reference to RemoteFrame at the very end, in case the client
49 // refers to it. 49 // refers to it.
50 m_webFrame->setCoreFrame(nullptr); 50 m_webFrame->setCoreFrame(nullptr);
51 } 51 }
52 52
53 Frame* RemoteFrameClientImpl::opener() const 53 Frame* RemoteFrameClientImpl::opener() const
54 { 54 {
55 return toCoreFrame(m_webFrame->opener()); 55 return toCoreFrame(m_webFrame->opener());
56 } 56 }
57 57
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 webEvent = adoptPtr(new WebMouseWheelEventBuilder(m_webFrame->frame()->v iew(), toCoreFrame(m_webFrame)->ownerLayoutObject(), *static_cast<WheelEvent*>(e vent))); 126 webEvent = adoptPtr(new WebMouseWheelEventBuilder(m_webFrame->frame()->v iew(), toCoreFrame(m_webFrame)->ownerLayoutObject(), *static_cast<WheelEvent*>(e vent)));
127 127
128 // Other or internal Blink events should not be forwarded. 128 // Other or internal Blink events should not be forwarded.
129 if (!webEvent || webEvent->type == WebInputEvent::Undefined) 129 if (!webEvent || webEvent->type == WebInputEvent::Undefined)
130 return; 130 return;
131 131
132 m_webFrame->client()->forwardInputEvent(webEvent.get()); 132 m_webFrame->client()->forwardInputEvent(webEvent.get());
133 } 133 }
134 134
135 } // namespace blink 135 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/RemoteFrameClientImpl.h ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698