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

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.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 /* 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return frame ? frame->toImplBase()->frame() : nullptr; 122 return frame ? frame->toImplBase()->frame() : nullptr;
123 } 123 }
124 124
125 } // namespace 125 } // namespace
126 126
127 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame) 127 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame)
128 : m_webFrame(frame) 128 : m_webFrame(frame)
129 { 129 {
130 } 130 }
131 131
132 RawPtr<FrameLoaderClientImpl> FrameLoaderClientImpl::create(WebLocalFrameImpl* f rame) 132 FrameLoaderClientImpl* FrameLoaderClientImpl::create(WebLocalFrameImpl* frame)
133 { 133 {
134 return new FrameLoaderClientImpl(frame); 134 return new FrameLoaderClientImpl(frame);
135 } 135 }
136 136
137 FrameLoaderClientImpl::~FrameLoaderClientImpl() 137 FrameLoaderClientImpl::~FrameLoaderClientImpl()
138 { 138 {
139 } 139 }
140 140
141 DEFINE_TRACE(FrameLoaderClientImpl) 141 DEFINE_TRACE(FrameLoaderClientImpl)
142 { 142 {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 void FrameLoaderClientImpl::willBeDetached() 376 void FrameLoaderClientImpl::willBeDetached()
377 { 377 {
378 m_webFrame->willBeDetached(); 378 m_webFrame->willBeDetached();
379 } 379 }
380 380
381 void FrameLoaderClientImpl::detached(FrameDetachType type) 381 void FrameLoaderClientImpl::detached(FrameDetachType type)
382 { 382 {
383 // Alert the client that the frame is being detached. This is the last 383 // Alert the client that the frame is being detached. This is the last
384 // chance we have to communicate with the client. 384 // chance we have to communicate with the client.
385 RawPtr<WebLocalFrameImpl> protector(m_webFrame.get());
386
387 WebFrameClient* client = m_webFrame->client(); 385 WebFrameClient* client = m_webFrame->client();
388 if (!client) 386 if (!client)
389 return; 387 return;
390 388
391 m_webFrame->willDetachParent(); 389 m_webFrame->willDetachParent();
392 390
393 // Signal that no further communication with WebFrameClient should take 391 // Signal that no further communication with WebFrameClient should take
394 // place at this point since we are no longer associated with the Page. 392 // place at this point since we are no longer associated with the Page.
395 m_webFrame->setClient(0); 393 m_webFrame->setClient(0);
396 394
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 params.mimeType = mimeType; 799 params.mimeType = mimeType;
802 params.attributeNames = paramNames; 800 params.attributeNames = paramNames;
803 params.attributeValues = paramValues; 801 params.attributeValues = paramValues;
804 params.loadManually = loadManually; 802 params.loadManually = loadManually;
805 803
806 WebPlugin* webPlugin = m_webFrame->client()->createPlugin(m_webFrame, params ); 804 WebPlugin* webPlugin = m_webFrame->client()->createPlugin(m_webFrame, params );
807 if (!webPlugin) 805 if (!webPlugin)
808 return nullptr; 806 return nullptr;
809 807
810 // The container takes ownership of the WebPlugin. 808 // The container takes ownership of the WebPlugin.
811 RawPtr<WebPluginContainerImpl> container = 809 WebPluginContainerImpl* container =
812 WebPluginContainerImpl::create(element, webPlugin); 810 WebPluginContainerImpl::create(element, webPlugin);
813 811
814 if (!webPlugin->initialize(container.get())) 812 if (!webPlugin->initialize(container))
815 return nullptr; 813 return nullptr;
816 814
817 if (policy != AllowDetachedPlugin && !element->layoutObject()) 815 if (policy != AllowDetachedPlugin && !element->layoutObject())
818 return nullptr; 816 return nullptr;
819 817
820 return container; 818 return container;
821 } 819 }
822 820
823 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( 821 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
824 HTMLMediaElement& htmlMediaElement, 822 HTMLMediaElement& htmlMediaElement,
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 return nullptr; 1055 return nullptr;
1058 return m_webFrame->client()->frameBlameContext(); 1056 return m_webFrame->client()->frameBlameContext();
1059 } 1057 }
1060 1058
1061 LinkResource* FrameLoaderClientImpl::createServiceWorkerLinkResource(HTMLLinkEle ment* owner) 1059 LinkResource* FrameLoaderClientImpl::createServiceWorkerLinkResource(HTMLLinkEle ment* owner)
1062 { 1060 {
1063 return ServiceWorkerLinkResource::create(owner); 1061 return ServiceWorkerLinkResource::create(owner);
1064 } 1062 }
1065 1063
1066 } // namespace blink 1064 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.h ('k') | third_party/WebKit/Source/web/FullscreenController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698