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

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

Issue 1865813002: Remove RawPtr from Source/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
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 "web/RemoteFrameClientImpl.h" 5 #include "web/RemoteFrameClientImpl.h"
6 6
7 #include "core/events/KeyboardEvent.h" 7 #include "core/events/KeyboardEvent.h"
8 #include "core/events/MouseEvent.h" 8 #include "core/events/MouseEvent.h"
9 #include "core/events/WheelEvent.h" 9 #include "core/events/WheelEvent.h"
10 #include "core/frame/RemoteFrame.h" 10 #include "core/frame/RemoteFrame.h"
(...skipping 22 matching lines...) Expand all
33 return frame ? frame->toImplBase()->frame() : nullptr; 33 return frame ? frame->toImplBase()->frame() : nullptr;
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* webFrame) 38 RemoteFrameClientImpl::RemoteFrameClientImpl(WebRemoteFrameImpl* webFrame)
39 : m_webFrame(webFrame) 39 : m_webFrame(webFrame)
40 { 40 {
41 } 41 }
42 42
43 RawPtr<RemoteFrameClientImpl> RemoteFrameClientImpl::create(WebRemoteFrameImpl* webFrame) 43 RemoteFrameClientImpl* RemoteFrameClientImpl::create(WebRemoteFrameImpl* webFram e)
44 { 44 {
45 return new RemoteFrameClientImpl(webFrame); 45 return new RemoteFrameClientImpl(webFrame);
46 } 46 }
47 47
48 DEFINE_TRACE(RemoteFrameClientImpl) 48 DEFINE_TRACE(RemoteFrameClientImpl)
49 { 49 {
50 visitor->trace(m_webFrame); 50 visitor->trace(m_webFrame);
51 RemoteFrameClient::trace(visitor); 51 RemoteFrameClient::trace(visitor);
52 } 52 }
53 53
54 bool RemoteFrameClientImpl::inShadowTree() const 54 bool RemoteFrameClientImpl::inShadowTree() const
55 { 55 {
56 return m_webFrame->inShadowTree(); 56 return m_webFrame->inShadowTree();
57 } 57 }
58 58
59 void RemoteFrameClientImpl::willBeDetached() 59 void RemoteFrameClientImpl::willBeDetached()
60 { 60 {
61 } 61 }
62 62
63 void RemoteFrameClientImpl::detached(FrameDetachType type) 63 void RemoteFrameClientImpl::detached(FrameDetachType type)
64 { 64 {
65 // Alert the client that the frame is being detached. 65 // Alert the client that the frame is being detached.
66 RawPtr<WebRemoteFrameImpl> protector(m_webFrame.get());
67
68 WebRemoteFrameClient* client = m_webFrame->client(); 66 WebRemoteFrameClient* client = m_webFrame->client();
69 if (!client) 67 if (!client)
70 return; 68 return;
71 69
72 client->frameDetached(static_cast<WebRemoteFrameClient::DetachType>(type)); 70 client->frameDetached(static_cast<WebRemoteFrameClient::DetachType>(type));
73 // Clear our reference to RemoteFrame at the very end, in case the client 71 // Clear our reference to RemoteFrame at the very end, in case the client
74 // refers to it. 72 // refers to it.
75 m_webFrame->setCoreFrame(nullptr); 73 m_webFrame->setCoreFrame(nullptr);
76 } 74 }
77 75
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 { 196 {
199 m_webFrame->client()->advanceFocus(type, WebLocalFrameImpl::fromFrame(source )); 197 m_webFrame->client()->advanceFocus(type, WebLocalFrameImpl::fromFrame(source ));
200 } 198 }
201 199
202 void RemoteFrameClientImpl::visibilityChanged(bool visible) 200 void RemoteFrameClientImpl::visibilityChanged(bool visible)
203 { 201 {
204 m_webFrame->client()->visibilityChanged(visible); 202 m_webFrame->client()->visibilityChanged(visible);
205 } 203 }
206 204
207 } // namespace blink 205 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/RemoteFrameClientImpl.h ('k') | third_party/WebKit/Source/web/RemoteFrameOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698