OLD | NEW |
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 Loading... |
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> | |
45 | 43 |
46 namespace blink { | 44 namespace blink { |
47 | 45 |
48 void fillWithEmptyClients(Page::PageClients& pageClients) | 46 void fillWithEmptyClients(Page::PageClients& pageClients) |
49 { | 47 { |
50 DEFINE_STATIC_LOCAL(ChromeClient, dummyChromeClient, (EmptyChromeClient::cre
ate())); | 48 DEFINE_STATIC_LOCAL(ChromeClient, dummyChromeClient, (EmptyChromeClient::cre
ate())); |
51 pageClients.chromeClient = &dummyChromeClient; | 49 pageClients.chromeClient = &dummyChromeClient; |
52 | 50 |
53 DEFINE_STATIC_LOCAL(EmptyContextMenuClient, dummyContextMenuClient, ()); | 51 DEFINE_STATIC_LOCAL(EmptyContextMenuClient, dummyContextMenuClient, ()); |
54 pageClients.contextMenuClient = &dummyContextMenuClient; | 52 pageClients.contextMenuClient = &dummyContextMenuClient; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 104 |
107 void EmptyChromeClient::openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) | 105 void EmptyChromeClient::openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) |
108 { | 106 { |
109 } | 107 } |
110 | 108 |
111 String EmptyChromeClient::acceptLanguages() | 109 String EmptyChromeClient::acceptLanguages() |
112 { | 110 { |
113 return String(); | 111 return String(); |
114 } | 112 } |
115 | 113 |
116 std::unique_ptr<WebFrameScheduler> EmptyChromeClient::createFrameScheduler(Blame
Context*) | 114 PassOwnPtr<WebFrameScheduler> EmptyChromeClient::createFrameScheduler(BlameConte
xt*) |
117 { | 115 { |
118 return wrapUnique(new EmptyFrameScheduler()); | 116 return adoptPtr(new EmptyFrameScheduler()); |
119 } | 117 } |
120 | 118 |
121 NavigationPolicy EmptyFrameLoaderClient::decidePolicyForNavigation(const Resourc
eRequest&, DocumentLoader*, NavigationType, NavigationPolicy, bool, bool) | 119 NavigationPolicy EmptyFrameLoaderClient::decidePolicyForNavigation(const Resourc
eRequest&, DocumentLoader*, NavigationType, NavigationPolicy, bool, bool) |
122 { | 120 { |
123 return NavigationPolicyIgnore; | 121 return NavigationPolicyIgnore; |
124 } | 122 } |
125 | 123 |
126 bool EmptyFrameLoaderClient::hasPendingNavigation() | 124 bool EmptyFrameLoaderClient::hasPendingNavigation() |
127 { | 125 { |
128 return false; | 126 return false; |
(...skipping 15 matching lines...) Expand all Loading... |
144 LocalFrame* EmptyFrameLoaderClient::createFrame(const FrameLoadRequest&, const A
tomicString&, HTMLFrameOwnerElement*) | 142 LocalFrame* EmptyFrameLoaderClient::createFrame(const FrameLoadRequest&, const A
tomicString&, HTMLFrameOwnerElement*) |
145 { | 143 { |
146 return nullptr; | 144 return nullptr; |
147 } | 145 } |
148 | 146 |
149 Widget* EmptyFrameLoaderClient::createPlugin(HTMLPlugInElement*, const KURL&, co
nst Vector<String>&, const Vector<String>&, const String&, bool, DetachedPluginP
olicy) | 147 Widget* EmptyFrameLoaderClient::createPlugin(HTMLPlugInElement*, const KURL&, co
nst Vector<String>&, const Vector<String>&, const String&, bool, DetachedPluginP
olicy) |
150 { | 148 { |
151 return nullptr; | 149 return nullptr; |
152 } | 150 } |
153 | 151 |
154 std::unique_ptr<WebMediaPlayer> EmptyFrameLoaderClient::createWebMediaPlayer(HTM
LMediaElement&, const WebMediaPlayerSource&, WebMediaPlayerClient*) | 152 PassOwnPtr<WebMediaPlayer> EmptyFrameLoaderClient::createWebMediaPlayer(HTMLMedi
aElement&, const WebMediaPlayerSource&, WebMediaPlayerClient*) |
155 { | 153 { |
156 return nullptr; | 154 return nullptr; |
157 } | 155 } |
158 | 156 |
159 std::unique_ptr<WebMediaSession> EmptyFrameLoaderClient::createWebMediaSession() | 157 PassOwnPtr<WebMediaSession> EmptyFrameLoaderClient::createWebMediaSession() |
160 { | 158 { |
161 return nullptr; | 159 return nullptr; |
162 } | 160 } |
163 | 161 |
164 void EmptyTextCheckerClient::requestCheckingOfString(TextCheckingRequest*) | 162 void EmptyTextCheckerClient::requestCheckingOfString(TextCheckingRequest*) |
165 { | 163 { |
166 } | 164 } |
167 | 165 |
168 std::unique_ptr<WebServiceWorkerProvider> EmptyFrameLoaderClient::createServiceW
orkerProvider() | 166 PassOwnPtr<WebServiceWorkerProvider> EmptyFrameLoaderClient::createServiceWorker
Provider() |
169 { | 167 { |
170 return nullptr; | 168 return nullptr; |
171 } | 169 } |
172 | 170 |
173 std::unique_ptr<WebApplicationCacheHost> EmptyFrameLoaderClient::createApplicati
onCacheHost(WebApplicationCacheHostClient*) | 171 PassOwnPtr<WebApplicationCacheHost> EmptyFrameLoaderClient::createApplicationCac
heHost(WebApplicationCacheHostClient*) |
174 { | 172 { |
175 return nullptr; | 173 return nullptr; |
176 } | 174 } |
177 | 175 |
178 } // namespace blink | 176 } // namespace blink |
OLD | NEW |