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

Side by Side Diff: third_party/WebKit/Source/core/loader/EmptyClients.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) 2006 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2008, 2009, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 22 matching lines...) Expand all
33 #include "core/html/forms/DateTimeChooser.h" 33 #include "core/html/forms/DateTimeChooser.h"
34 #include "core/loader/DocumentLoader.h" 34 #include "core/loader/DocumentLoader.h"
35 #include "platform/FileChooser.h" 35 #include "platform/FileChooser.h"
36 #include "platform/Widget.h" 36 #include "platform/Widget.h"
37 #include "public/platform/Platform.h" 37 #include "public/platform/Platform.h"
38 #include "public/platform/WebApplicationCacheHost.h" 38 #include "public/platform/WebApplicationCacheHost.h"
39 #include "public/platform/WebMediaPlayer.h" 39 #include "public/platform/WebMediaPlayer.h"
40 #include "public/platform/modules/mediasession/WebMediaSession.h" 40 #include "public/platform/modules/mediasession/WebMediaSession.h"
41 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" 41 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
42 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h " 42 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h "
43 #include "wtf/PtrUtil.h"
44 #include <memory>
43 45
44 namespace blink { 46 namespace blink {
45 47
46 void fillWithEmptyClients(Page::PageClients& pageClients) 48 void fillWithEmptyClients(Page::PageClients& pageClients)
47 { 49 {
48 DEFINE_STATIC_LOCAL(ChromeClient, dummyChromeClient, (EmptyChromeClient::cre ate())); 50 DEFINE_STATIC_LOCAL(ChromeClient, dummyChromeClient, (EmptyChromeClient::cre ate()));
49 pageClients.chromeClient = &dummyChromeClient; 51 pageClients.chromeClient = &dummyChromeClient;
50 52
51 DEFINE_STATIC_LOCAL(EmptyContextMenuClient, dummyContextMenuClient, ()); 53 DEFINE_STATIC_LOCAL(EmptyContextMenuClient, dummyContextMenuClient, ());
52 pageClients.contextMenuClient = &dummyContextMenuClient; 54 pageClients.contextMenuClient = &dummyContextMenuClient;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 106
105 void EmptyChromeClient::openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) 107 void EmptyChromeClient::openFileChooser(LocalFrame*, PassRefPtr<FileChooser>)
106 { 108 {
107 } 109 }
108 110
109 String EmptyChromeClient::acceptLanguages() 111 String EmptyChromeClient::acceptLanguages()
110 { 112 {
111 return String(); 113 return String();
112 } 114 }
113 115
114 PassOwnPtr<WebFrameScheduler> EmptyChromeClient::createFrameScheduler(BlameConte xt*) 116 std::unique_ptr<WebFrameScheduler> EmptyChromeClient::createFrameScheduler(Blame Context*)
115 { 117 {
116 return adoptPtr(new EmptyFrameScheduler()); 118 return wrapUnique(new EmptyFrameScheduler());
117 } 119 }
118 120
119 NavigationPolicy EmptyFrameLoaderClient::decidePolicyForNavigation(const Resourc eRequest&, DocumentLoader*, NavigationType, NavigationPolicy, bool, bool) 121 NavigationPolicy EmptyFrameLoaderClient::decidePolicyForNavigation(const Resourc eRequest&, DocumentLoader*, NavigationType, NavigationPolicy, bool, bool)
120 { 122 {
121 return NavigationPolicyIgnore; 123 return NavigationPolicyIgnore;
122 } 124 }
123 125
124 bool EmptyFrameLoaderClient::hasPendingNavigation() 126 bool EmptyFrameLoaderClient::hasPendingNavigation()
125 { 127 {
126 return false; 128 return false;
(...skipping 15 matching lines...) Expand all
142 LocalFrame* EmptyFrameLoaderClient::createFrame(const FrameLoadRequest&, const A tomicString&, HTMLFrameOwnerElement*) 144 LocalFrame* EmptyFrameLoaderClient::createFrame(const FrameLoadRequest&, const A tomicString&, HTMLFrameOwnerElement*)
143 { 145 {
144 return nullptr; 146 return nullptr;
145 } 147 }
146 148
147 Widget* EmptyFrameLoaderClient::createPlugin(HTMLPlugInElement*, const KURL&, co nst Vector<String>&, const Vector<String>&, const String&, bool, DetachedPluginP olicy) 149 Widget* EmptyFrameLoaderClient::createPlugin(HTMLPlugInElement*, const KURL&, co nst Vector<String>&, const Vector<String>&, const String&, bool, DetachedPluginP olicy)
148 { 150 {
149 return nullptr; 151 return nullptr;
150 } 152 }
151 153
152 PassOwnPtr<WebMediaPlayer> EmptyFrameLoaderClient::createWebMediaPlayer(HTMLMedi aElement&, const WebMediaPlayerSource&, WebMediaPlayerClient*) 154 std::unique_ptr<WebMediaPlayer> EmptyFrameLoaderClient::createWebMediaPlayer(HTM LMediaElement&, const WebMediaPlayerSource&, WebMediaPlayerClient*)
153 { 155 {
154 return nullptr; 156 return nullptr;
155 } 157 }
156 158
157 PassOwnPtr<WebMediaSession> EmptyFrameLoaderClient::createWebMediaSession() 159 std::unique_ptr<WebMediaSession> EmptyFrameLoaderClient::createWebMediaSession()
158 { 160 {
159 return nullptr; 161 return nullptr;
160 } 162 }
161 163
162 void EmptyTextCheckerClient::requestCheckingOfString(TextCheckingRequest*) 164 void EmptyTextCheckerClient::requestCheckingOfString(TextCheckingRequest*)
163 { 165 {
164 } 166 }
165 167
166 PassOwnPtr<WebServiceWorkerProvider> EmptyFrameLoaderClient::createServiceWorker Provider() 168 std::unique_ptr<WebServiceWorkerProvider> EmptyFrameLoaderClient::createServiceW orkerProvider()
167 { 169 {
168 return nullptr; 170 return nullptr;
169 } 171 }
170 172
171 PassOwnPtr<WebApplicationCacheHost> EmptyFrameLoaderClient::createApplicationCac heHost(WebApplicationCacheHostClient*) 173 std::unique_ptr<WebApplicationCacheHost> EmptyFrameLoaderClient::createApplicati onCacheHost(WebApplicationCacheHostClient*)
172 { 174 {
173 return nullptr; 175 return nullptr;
174 } 176 }
175 177
176 } // namespace blink 178 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.h ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698