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, 2010, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "platform/geometry/FloatPoint.h" | 41 #include "platform/geometry/FloatPoint.h" |
42 #include "platform/geometry/FloatRect.h" | 42 #include "platform/geometry/FloatRect.h" |
43 #include "platform/geometry/IntRect.h" | 43 #include "platform/geometry/IntRect.h" |
44 #include "platform/heap/Handle.h" | 44 #include "platform/heap/Handle.h" |
45 #include "platform/network/ResourceError.h" | 45 #include "platform/network/ResourceError.h" |
46 #include "platform/text/TextCheckerClient.h" | 46 #include "platform/text/TextCheckerClient.h" |
47 #include "public/platform/WebFocusType.h" | 47 #include "public/platform/WebFocusType.h" |
48 #include "public/platform/WebFrameScheduler.h" | 48 #include "public/platform/WebFrameScheduler.h" |
49 #include "public/platform/WebScreenInfo.h" | 49 #include "public/platform/WebScreenInfo.h" |
50 #include "wtf/Forward.h" | 50 #include "wtf/Forward.h" |
| 51 #include <memory> |
51 #include <v8.h> | 52 #include <v8.h> |
52 | 53 |
53 /* | 54 /* |
54 This file holds empty Client stubs for use by WebCore. | 55 This file holds empty Client stubs for use by WebCore. |
55 Viewless element needs to create a dummy Page->LocalFrame->FrameView tree for u
se in parsing or executing JavaScript. | 56 Viewless element needs to create a dummy Page->LocalFrame->FrameView tree for u
se in parsing or executing JavaScript. |
56 This tree depends heavily on Clients (usually provided by WebKit classes). | 57 This tree depends heavily on Clients (usually provided by WebKit classes). |
57 | 58 |
58 This file was first created for SVGImage as it had no way to access the current
Page (nor should it, | 59 This file was first created for SVGImage as it had no way to access the current
Page (nor should it, |
59 since Images are not tied to a page). | 60 since Images are not tied to a page). |
60 See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion abo
ut this file. | 61 See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion abo
ut this file. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 void didAssociateFormControls(const HeapVector<Member<Element>>&, LocalFrame
*) override {} | 170 void didAssociateFormControls(const HeapVector<Member<Element>>&, LocalFrame
*) override {} |
170 | 171 |
171 void annotatedRegionsChanged() override {} | 172 void annotatedRegionsChanged() override {} |
172 String acceptLanguages() override; | 173 String acceptLanguages() override; |
173 | 174 |
174 CompositorProxyClient* createCompositorProxyClient(LocalFrame*) override { r
eturn nullptr; } | 175 CompositorProxyClient* createCompositorProxyClient(LocalFrame*) override { r
eturn nullptr; } |
175 | 176 |
176 void registerPopupOpeningObserver(PopupOpeningObserver*) override {} | 177 void registerPopupOpeningObserver(PopupOpeningObserver*) override {} |
177 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override {} | 178 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override {} |
178 | 179 |
179 PassOwnPtr<WebFrameScheduler> createFrameScheduler(BlameContext*) override; | 180 std::unique_ptr<WebFrameScheduler> createFrameScheduler(BlameContext*) overr
ide; |
180 }; | 181 }; |
181 | 182 |
182 class CORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient { | 183 class CORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient { |
183 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); | 184 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); |
184 public: | 185 public: |
185 static EmptyFrameLoaderClient* create() { return new EmptyFrameLoaderClient;
} | 186 static EmptyFrameLoaderClient* create() { return new EmptyFrameLoaderClient;
} |
186 ~EmptyFrameLoaderClient() override {} | 187 ~EmptyFrameLoaderClient() override {} |
187 | 188 |
188 bool hasWebView() const override { return true; } // mainly for assertions | 189 bool hasWebView() const override { return true; } // mainly for assertions |
189 | 190 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 void didDisplayInsecureContent() override {} | 245 void didDisplayInsecureContent() override {} |
245 void didRunInsecureContent(SecurityOrigin*, const KURL&) override {} | 246 void didRunInsecureContent(SecurityOrigin*, const KURL&) override {} |
246 void didDetectXSS(const KURL&, bool) override {} | 247 void didDetectXSS(const KURL&, bool) override {} |
247 void didDispatchPingLoader(const KURL&) override {} | 248 void didDispatchPingLoader(const KURL&) override {} |
248 void didDisplayContentWithCertificateErrors(const KURL&, const CString&) ove
rride {} | 249 void didDisplayContentWithCertificateErrors(const KURL&, const CString&) ove
rride {} |
249 void didRunContentWithCertificateErrors(const KURL&, const CString&) overrid
e {} | 250 void didRunContentWithCertificateErrors(const KURL&, const CString&) overrid
e {} |
250 void selectorMatchChanged(const Vector<String>&, const Vector<String>&) over
ride {} | 251 void selectorMatchChanged(const Vector<String>&, const Vector<String>&) over
ride {} |
251 LocalFrame* createFrame(const FrameLoadRequest&, const AtomicString&, HTMLFr
ameOwnerElement*) override; | 252 LocalFrame* createFrame(const FrameLoadRequest&, const AtomicString&, HTMLFr
ameOwnerElement*) override; |
252 Widget* createPlugin(HTMLPlugInElement*, const KURL&, const Vector<String>&,
const Vector<String>&, const String&, bool, DetachedPluginPolicy) override; | 253 Widget* createPlugin(HTMLPlugInElement*, const KURL&, const Vector<String>&,
const Vector<String>&, const String&, bool, DetachedPluginPolicy) override; |
253 bool canCreatePluginWithoutRenderer(const String& mimeType) const override {
return false; } | 254 bool canCreatePluginWithoutRenderer(const String& mimeType) const override {
return false; } |
254 PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, const Web
MediaPlayerSource&, WebMediaPlayerClient*) override; | 255 std::unique_ptr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, cons
t WebMediaPlayerSource&, WebMediaPlayerClient*) override; |
255 PassOwnPtr<WebMediaSession> createWebMediaSession() override; | 256 std::unique_ptr<WebMediaSession> createWebMediaSession() override; |
256 | 257 |
257 ObjectContentType getObjectContentType(const KURL&, const String&, bool) ove
rride { return ObjectContentType(); } | 258 ObjectContentType getObjectContentType(const KURL&, const String&, bool) ove
rride { return ObjectContentType(); } |
258 | 259 |
259 void didCreateNewDocument() override {} | 260 void didCreateNewDocument() override {} |
260 void dispatchDidClearWindowObjectInMainWorld() override {} | 261 void dispatchDidClearWindowObjectInMainWorld() override {} |
261 void documentElementAvailable() override {} | 262 void documentElementAvailable() override {} |
262 void runScriptsAtDocumentElementAvailable() override {} | 263 void runScriptsAtDocumentElementAvailable() override {} |
263 void runScriptsAtDocumentReady(bool) override {} | 264 void runScriptsAtDocumentReady(bool) override {} |
264 | 265 |
265 void didCreateScriptContext(v8::Local<v8::Context>, int extensionGroup, int
worldId) override {} | 266 void didCreateScriptContext(v8::Local<v8::Context>, int extensionGroup, int
worldId) override {} |
266 void willReleaseScriptContext(v8::Local<v8::Context>, int worldId) override
{} | 267 void willReleaseScriptContext(v8::Local<v8::Context>, int worldId) override
{} |
267 bool allowScriptExtension(const String& extensionName, int extensionGroup, i
nt worldId) override { return false; } | 268 bool allowScriptExtension(const String& extensionName, int extensionGroup, i
nt worldId) override { return false; } |
268 | 269 |
269 WebCookieJar* cookieJar() const override { return 0; } | 270 WebCookieJar* cookieJar() const override { return 0; } |
270 | 271 |
271 PassOwnPtr<WebServiceWorkerProvider> createServiceWorkerProvider() override; | 272 std::unique_ptr<WebServiceWorkerProvider> createServiceWorkerProvider() over
ride; |
272 bool isControlledByServiceWorker(DocumentLoader&) override { return false; } | 273 bool isControlledByServiceWorker(DocumentLoader&) override { return false; } |
273 int64_t serviceWorkerID(DocumentLoader&) override { return -1; } | 274 int64_t serviceWorkerID(DocumentLoader&) override { return -1; } |
274 PassOwnPtr<WebApplicationCacheHost> createApplicationCacheHost(WebApplicatio
nCacheHostClient*) override; | 275 std::unique_ptr<WebApplicationCacheHost> createApplicationCacheHost(WebAppli
cationCacheHostClient*) override; |
275 | 276 |
276 protected: | 277 protected: |
277 EmptyFrameLoaderClient() {} | 278 EmptyFrameLoaderClient() {} |
278 }; | 279 }; |
279 | 280 |
280 class CORE_EXPORT EmptyTextCheckerClient : public TextCheckerClient { | 281 class CORE_EXPORT EmptyTextCheckerClient : public TextCheckerClient { |
281 DISALLOW_NEW(); | 282 DISALLOW_NEW(); |
282 public: | 283 public: |
283 ~EmptyTextCheckerClient() { } | 284 ~EmptyTextCheckerClient() { } |
284 | 285 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 ~EmptyContextMenuClient() override {} | 329 ~EmptyContextMenuClient() override {} |
329 bool showContextMenu(const ContextMenu*, bool) override { return false; } | 330 bool showContextMenu(const ContextMenu*, bool) override { return false; } |
330 void clearContextMenu() override {} | 331 void clearContextMenu() override {} |
331 }; | 332 }; |
332 | 333 |
333 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&); | 334 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&); |
334 | 335 |
335 } // namespace blink | 336 } // namespace blink |
336 | 337 |
337 #endif // EmptyClients_h | 338 #endif // EmptyClients_h |
OLD | NEW |