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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoaderClient.h

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, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
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 30 matching lines...) Expand all
41 #include "core/loader/NavigationPolicy.h" 41 #include "core/loader/NavigationPolicy.h"
42 #include "platform/heap/Handle.h" 42 #include "platform/heap/Handle.h"
43 #include "platform/network/ContentSecurityPolicyParsers.h" 43 #include "platform/network/ContentSecurityPolicyParsers.h"
44 #include "platform/network/ResourceLoadPriority.h" 44 #include "platform/network/ResourceLoadPriority.h"
45 #include "platform/weborigin/Referrer.h" 45 #include "platform/weborigin/Referrer.h"
46 #include "public/platform/WebEffectiveConnectionType.h" 46 #include "public/platform/WebEffectiveConnectionType.h"
47 #include "public/platform/WebInsecureRequestPolicy.h" 47 #include "public/platform/WebInsecureRequestPolicy.h"
48 #include "public/platform/WebLoadingBehaviorFlag.h" 48 #include "public/platform/WebLoadingBehaviorFlag.h"
49 #include "wtf/Forward.h" 49 #include "wtf/Forward.h"
50 #include "wtf/Vector.h" 50 #include "wtf/Vector.h"
51 #include <memory>
51 #include <v8.h> 52 #include <v8.h>
52 53
53 namespace blink { 54 namespace blink {
54 55
55 class Document; 56 class Document;
56 class DocumentLoader; 57 class DocumentLoader;
57 class FetchRequest; 58 class FetchRequest;
58 struct FrameLoadRequest; 59 struct FrameLoadRequest;
59 class HTMLFormElement; 60 class HTMLFormElement;
60 class HTMLFrameElementBase; 61 class HTMLFrameElementBase;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 virtual LocalFrame* createFrame(const FrameLoadRequest&, const AtomicString& name, HTMLFrameOwnerElement*) = 0; 169 virtual LocalFrame* createFrame(const FrameLoadRequest&, const AtomicString& name, HTMLFrameOwnerElement*) = 0;
169 // Whether or not plugin creation should fail if the HTMLPlugInElement isn't in the DOM after plugin initialization. 170 // Whether or not plugin creation should fail if the HTMLPlugInElement isn't in the DOM after plugin initialization.
170 enum DetachedPluginPolicy { 171 enum DetachedPluginPolicy {
171 FailOnDetachedPlugin, 172 FailOnDetachedPlugin,
172 AllowDetachedPlugin, 173 AllowDetachedPlugin,
173 }; 174 };
174 virtual bool canCreatePluginWithoutRenderer(const String& mimeType) const = 0; 175 virtual bool canCreatePluginWithoutRenderer(const String& mimeType) const = 0;
175 virtual Widget* createPlugin(HTMLPlugInElement*, const KURL&, const Vector<S tring>&, const Vector<String>&, const String&, bool loadManually, DetachedPlugin Policy) = 0; 176 virtual Widget* createPlugin(HTMLPlugInElement*, const KURL&, const Vector<S tring>&, const Vector<String>&, const String&, bool loadManually, DetachedPlugin Policy) = 0;
176 177
177 virtual PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, c onst WebMediaPlayerSource&, WebMediaPlayerClient*) = 0; 178 virtual std::unique_ptr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElemen t&, const WebMediaPlayerSource&, WebMediaPlayerClient*) = 0;
178 179
179 virtual PassOwnPtr<WebMediaSession> createWebMediaSession() = 0; 180 virtual std::unique_ptr<WebMediaSession> createWebMediaSession() = 0;
180 181
181 virtual ObjectContentType getObjectContentType(const KURL&, const String& mi meType, bool shouldPreferPlugInsForImages) = 0; 182 virtual ObjectContentType getObjectContentType(const KURL&, const String& mi meType, bool shouldPreferPlugInsForImages) = 0;
182 183
183 virtual void didCreateNewDocument() = 0; 184 virtual void didCreateNewDocument() = 0;
184 virtual void dispatchDidClearWindowObjectInMainWorld() = 0; 185 virtual void dispatchDidClearWindowObjectInMainWorld() = 0;
185 virtual void documentElementAvailable() = 0; 186 virtual void documentElementAvailable() = 0;
186 virtual void runScriptsAtDocumentElementAvailable() = 0; 187 virtual void runScriptsAtDocumentElementAvailable() = 0;
187 virtual void runScriptsAtDocumentReady(bool documentIsEmpty) = 0; 188 virtual void runScriptsAtDocumentReady(bool documentIsEmpty) = 0;
188 189
189 virtual void didCreateScriptContext(v8::Local<v8::Context>, int extensionGro up, int worldId) = 0; 190 virtual void didCreateScriptContext(v8::Local<v8::Context>, int extensionGro up, int worldId) = 0;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 237
237 virtual void dispatchWillStartUsingPeerConnectionHandler(WebRTCPeerConnectio nHandler*) { } 238 virtual void dispatchWillStartUsingPeerConnectionHandler(WebRTCPeerConnectio nHandler*) { }
238 239
239 virtual bool allowWebGL(bool enabledPerSettings) { return enabledPerSettings ; } 240 virtual bool allowWebGL(bool enabledPerSettings) { return enabledPerSettings ; }
240 241
241 // If an HTML document is being loaded, informs the embedder that the docume nt will have its <body> attached soon. 242 // If an HTML document is being loaded, informs the embedder that the docume nt will have its <body> attached soon.
242 virtual void dispatchWillInsertBody() { } 243 virtual void dispatchWillInsertBody() { }
243 244
244 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, Res ourceLoadPriority, int intraPriorityValue) { } 245 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, Res ourceLoadPriority, int intraPriorityValue) { }
245 246
246 virtual PassOwnPtr<WebServiceWorkerProvider> createServiceWorkerProvider() = 0; 247 virtual std::unique_ptr<WebServiceWorkerProvider> createServiceWorkerProvide r() = 0;
247 248
248 virtual bool isControlledByServiceWorker(DocumentLoader&) = 0; 249 virtual bool isControlledByServiceWorker(DocumentLoader&) = 0;
249 250
250 virtual int64_t serviceWorkerID(DocumentLoader&) = 0; 251 virtual int64_t serviceWorkerID(DocumentLoader&) = 0;
251 252
252 virtual SharedWorkerRepositoryClient* sharedWorkerRepositoryClient() { retur n 0; } 253 virtual SharedWorkerRepositoryClient* sharedWorkerRepositoryClient() { retur n 0; }
253 254
254 virtual PassOwnPtr<WebApplicationCacheHost> createApplicationCacheHost(WebAp plicationCacheHostClient*) = 0; 255 virtual std::unique_ptr<WebApplicationCacheHost> createApplicationCacheHost( WebApplicationCacheHostClient*) = 0;
255 256
256 virtual void dispatchDidChangeManifest() { } 257 virtual void dispatchDidChangeManifest() { }
257 258
258 virtual unsigned backForwardLength() { return 0; } 259 virtual unsigned backForwardLength() { return 0; }
259 260
260 virtual bool isFrameLoaderClientImpl() const { return false; } 261 virtual bool isFrameLoaderClientImpl() const { return false; }
261 262
262 // Called when elements preventing the sudden termination of the frame 263 // Called when elements preventing the sudden termination of the frame
263 // become present or stop being present. |type| is the type of element 264 // become present or stop being present. |type| is the type of element
264 // (BeforeUnload handler, Unload handler). 265 // (BeforeUnload handler, Unload handler).
265 enum SuddenTerminationDisablerType { 266 enum SuddenTerminationDisablerType {
266 BeforeUnloadHandler, 267 BeforeUnloadHandler,
267 UnloadHandler, 268 UnloadHandler,
268 }; 269 };
269 virtual void suddenTerminationDisablerChanged(bool present, SuddenTerminatio nDisablerType) { } 270 virtual void suddenTerminationDisablerChanged(bool present, SuddenTerminatio nDisablerType) { }
270 271
271 virtual LinkResource* createServiceWorkerLinkResource(HTMLLinkElement*) { re turn nullptr; } 272 virtual LinkResource* createServiceWorkerLinkResource(HTMLLinkElement*) { re turn nullptr; }
272 273
273 // Effective connection type when this frame was loaded. 274 // Effective connection type when this frame was loaded.
274 virtual WebEffectiveConnectionType getEffectiveConnectionType() { return Web EffectiveConnectionType::TypeUnknown; } 275 virtual WebEffectiveConnectionType getEffectiveConnectionType() { return Web EffectiveConnectionType::TypeUnknown; }
275 }; 276 };
276 277
277 } // namespace blink 278 } // namespace blink
278 279
279 #endif // FrameLoaderClient_h 280 #endif // FrameLoaderClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/ImageLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698