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

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 23704004: Make WebFileSystemCallbacks not self-destruct, deprecate AsyncFileSystem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebFileSystemCallbacksImpl.cpp ('k') | Source/web/WorkerFileSystemClient.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // 65 //
66 // Frame going away causes the FrameLoader to get deleted. In FrameLoader's 66 // Frame going away causes the FrameLoader to get deleted. In FrameLoader's
67 // destructor, it notifies its client with frameLoaderDestroyed. This calls 67 // destructor, it notifies its client with frameLoaderDestroyed. This calls
68 // WebFrame::Closing and then derefs the WebFrame and will cause it to be 68 // WebFrame::Closing and then derefs the WebFrame and will cause it to be
69 // deleted (unless an external someone is also holding a reference). 69 // deleted (unless an external someone is also holding a reference).
70 70
71 #include "config.h" 71 #include "config.h"
72 #include "WebFrameImpl.h" 72 #include "WebFrameImpl.h"
73 73
74 #include "AssociatedURLLoader.h" 74 #include "AssociatedURLLoader.h"
75 #include "AsyncFileSystemChromium.h"
76 #include "DOMUtilitiesPrivate.h" 75 #include "DOMUtilitiesPrivate.h"
77 #include "EventListenerWrapper.h" 76 #include "EventListenerWrapper.h"
78 #include "FindInPageCoordinates.h" 77 #include "FindInPageCoordinates.h"
79 #include "HTMLNames.h" 78 #include "HTMLNames.h"
80 #include "PageOverlay.h" 79 #include "PageOverlay.h"
81 #include "V8DOMFileSystem.h" 80 #include "V8DOMFileSystem.h"
82 #include "V8DirectoryEntry.h" 81 #include "V8DirectoryEntry.h"
83 #include "V8FileEntry.h" 82 #include "V8FileEntry.h"
84 #include "WebConsoleMessage.h" 83 #include "WebConsoleMessage.h"
85 #include "WebDOMEvent.h" 84 #include "WebDOMEvent.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 #include "core/page/Console.h" 149 #include "core/page/Console.h"
151 #include "core/page/DOMWindow.h" 150 #include "core/page/DOMWindow.h"
152 #include "core/page/EventHandler.h" 151 #include "core/page/EventHandler.h"
153 #include "core/page/FocusController.h" 152 #include "core/page/FocusController.h"
154 #include "core/page/FrameTree.h" 153 #include "core/page/FrameTree.h"
155 #include "core/page/FrameView.h" 154 #include "core/page/FrameView.h"
156 #include "core/page/Page.h" 155 #include "core/page/Page.h"
157 #include "core/page/Performance.h" 156 #include "core/page/Performance.h"
158 #include "core/page/PrintContext.h" 157 #include "core/page/PrintContext.h"
159 #include "core/page/Settings.h" 158 #include "core/page/Settings.h"
160 #include "core/platform/AsyncFileSystem.h"
161 #include "core/platform/ScrollTypes.h" 159 #include "core/platform/ScrollTypes.h"
162 #include "core/platform/ScrollbarTheme.h" 160 #include "core/platform/ScrollbarTheme.h"
163 #include "core/platform/chromium/ClipboardUtilitiesChromium.h" 161 #include "core/platform/chromium/ClipboardUtilitiesChromium.h"
164 #include "core/platform/chromium/TraceEvent.h" 162 #include "core/platform/chromium/TraceEvent.h"
165 #include "core/platform/graphics/FontCache.h" 163 #include "core/platform/graphics/FontCache.h"
166 #include "core/platform/graphics/GraphicsContext.h" 164 #include "core/platform/graphics/GraphicsContext.h"
167 #include "core/platform/graphics/GraphicsLayerClient.h" 165 #include "core/platform/graphics/GraphicsLayerClient.h"
168 #include "core/platform/graphics/skia/SkiaUtils.h" 166 #include "core/platform/graphics/skia/SkiaUtils.h"
169 #include "core/platform/network/ResourceRequest.h" 167 #include "core/platform/network/ResourceRequest.h"
170 #include "core/rendering/HitTestResult.h" 168 #include "core/rendering/HitTestResult.h"
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const 872 v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const
875 { 873 {
876 if (!frame()) 874 if (!frame())
877 return v8::Local<v8::Context>(); 875 return v8::Local<v8::Context>();
878 return ScriptController::mainWorldContext(frame()); 876 return ScriptController::mainWorldContext(frame());
879 } 877 }
880 878
881 v8::Handle<v8::Value> WebFrameImpl::createFileSystem(WebFileSystemType type, con st WebString& name, const WebString& path) 879 v8::Handle<v8::Value> WebFrameImpl::createFileSystem(WebFileSystemType type, con st WebString& name, const WebString& path)
882 { 880 {
883 ASSERT(frame()); 881 ASSERT(frame());
884 return toV8(DOMFileSystem::create(frame()->document(), name, static_cast<Web Core::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data()), AsyncFil eSystemChromium::create()), v8::Handle<v8::Object>(), frame()->script()->current WorldContext()->GetIsolate()); 882 return toV8(DOMFileSystem::create(frame()->document(), name, static_cast<Web Core::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data())), v8::Han dle<v8::Object>(), frame()->script()->currentWorldContext()->GetIsolate());
885 } 883 }
886 884
887 v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystemTy pe type, const WebString& name, const WebString& path) 885 v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystemTy pe type, const WebString& name, const WebString& path)
888 { 886 {
889 ASSERT(frame()); 887 ASSERT(frame());
890 RefPtr<DOMFileSystem> fileSystem = DOMFileSystem::create(frame()->document() , name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.u tf8().data()), AsyncFileSystemChromium::create()); 888 RefPtr<DOMFileSystem> fileSystem = DOMFileSystem::create(frame()->document() , name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.u tf8().data()));
891 fileSystem->makeClonable(); 889 fileSystem->makeClonable();
892 return toV8(fileSystem.release(), v8::Handle<v8::Object>(), frame()->script( )->currentWorldContext()->GetIsolate()); 890 return toV8(fileSystem.release(), v8::Handle<v8::Object>(), frame()->script( )->currentWorldContext()->GetIsolate());
893 } 891 }
894 892
895 v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystemType type, cons t WebString& fileSystemName, const WebString& fileSystemPath, const WebString& f ilePath, bool isDirectory) 893 v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystemType type, cons t WebString& fileSystemName, const WebString& fileSystemPath, const WebString& f ilePath, bool isDirectory)
896 { 894 {
897 ASSERT(frame()); 895 ASSERT(frame());
898 896
899 RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->docume nt(), fileSystemName, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURL String, fileSystemPath.utf8().data()), AsyncFileSystemChromium::create()); 897 RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->docume nt(), fileSystemName, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURL String, fileSystemPath.utf8().data()));
900 if (isDirectory) 898 if (isDirectory)
901 return toV8(DirectoryEntry::create(fileSystem, filePath), v8::Handle<v8: :Object>(), frame()->script()->currentWorldContext()->GetIsolate()); 899 return toV8(DirectoryEntry::create(fileSystem, filePath), v8::Handle<v8: :Object>(), frame()->script()->currentWorldContext()->GetIsolate());
902 return toV8(FileEntry::create(fileSystem, filePath), v8::Handle<v8::Object>( ), frame()->script()->currentWorldContext()->GetIsolate()); 900 return toV8(FileEntry::create(fileSystem, filePath), v8::Handle<v8::Object>( ), frame()->script()->currentWorldContext()->GetIsolate());
903 } 901 }
904 902
905 void WebFrameImpl::reload(bool ignoreCache) 903 void WebFrameImpl::reload(bool ignoreCache)
906 { 904 {
907 ASSERT(frame()); 905 ASSERT(frame());
908 frame()->loader()->reload(ignoreCache ? EndToEndReload : NormalReload); 906 frame()->loader()->reload(ignoreCache ? EndToEndReload : NormalReload);
909 } 907 }
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 2476
2479 // There is a possibility that the frame being detached was the only 2477 // There is a possibility that the frame being detached was the only
2480 // pending one. We need to make sure final replies can be sent. 2478 // pending one. We need to make sure final replies can be sent.
2481 flushCurrentScopingEffort(m_findRequestIdentifier); 2479 flushCurrentScopingEffort(m_findRequestIdentifier);
2482 2480
2483 cancelPendingScopingEffort(); 2481 cancelPendingScopingEffort();
2484 } 2482 }
2485 } 2483 }
2486 2484
2487 } // namespace WebKit 2485 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebFileSystemCallbacksImpl.cpp ('k') | Source/web/WorkerFileSystemClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698