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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebPrerender.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "public/platform/WebPrerender.h" 31 #include "public/platform/WebPrerender.h"
32 32
33 #include "platform/Prerender.h" 33 #include "platform/Prerender.h"
34 #include "wtf/PassRefPtr.h" 34 #include "wtf/PassRefPtr.h"
35 #include "wtf/PtrUtil.h"
36 #include <memory>
35 37
36 namespace blink { 38 namespace blink {
37 39
38 namespace { 40 namespace {
39 41
40 class ExtraDataContainer : public Prerender::ExtraData { 42 class ExtraDataContainer : public Prerender::ExtraData {
41 public: 43 public:
42 static PassRefPtr<ExtraDataContainer> create(WebPrerender::ExtraData* extraD ata) { return adoptRef(new ExtraDataContainer(extraData)); } 44 static PassRefPtr<ExtraDataContainer> create(WebPrerender::ExtraData* extraD ata) { return adoptRef(new ExtraDataContainer(extraData)); }
43 45
44 ~ExtraDataContainer() override {} 46 ~ExtraDataContainer() override {}
45 47
46 WebPrerender::ExtraData* getExtraData() const { return m_extraData.get(); } 48 WebPrerender::ExtraData* getExtraData() const { return m_extraData.get(); }
47 49
48 private: 50 private:
49 explicit ExtraDataContainer(WebPrerender::ExtraData* extraData) 51 explicit ExtraDataContainer(WebPrerender::ExtraData* extraData)
50 : m_extraData(adoptPtr(extraData)) 52 : m_extraData(wrapUnique(extraData))
51 { 53 {
52 } 54 }
53 55
54 OwnPtr<WebPrerender::ExtraData> m_extraData; 56 std::unique_ptr<WebPrerender::ExtraData> m_extraData;
55 }; 57 };
56 58
57 } // namespace 59 } // namespace
58 60
59 WebPrerender::WebPrerender(Prerender* prerender) 61 WebPrerender::WebPrerender(Prerender* prerender)
60 : m_private(prerender) 62 : m_private(prerender)
61 { 63 {
62 } 64 }
63 65
64 const Prerender* WebPrerender::toPrerender() const 66 const Prerender* WebPrerender::toPrerender() const
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 { 130 {
129 m_private->didSendLoadForPrerender(); 131 m_private->didSendLoadForPrerender();
130 } 132 }
131 133
132 void WebPrerender::didSendDOMContentLoadedForPrerender() 134 void WebPrerender::didSendDOMContentLoadedForPrerender()
133 { 135 {
134 m_private->didSendDOMContentLoadedForPrerender(); 136 m_private->didSendDOMContentLoadedForPrerender();
135 } 137 }
136 138
137 } // namespace blink 139 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698