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

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

Issue 23537011: FileAPI: Add WebFileSystem::resolveURL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 delete this; 100 delete this;
101 } 101 }
102 102
103 void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebURL& rootURL) 103 void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebURL& rootURL)
104 { 104 {
105 // This object is intended to delete itself on exit. 105 // This object is intended to delete itself on exit.
106 OwnPtr<WebFileSystemCallbacksImpl> callbacks = adoptPtr(this); 106 OwnPtr<WebFileSystemCallbacksImpl> callbacks = adoptPtr(this);
107 m_callbacks->didOpenFileSystem(name, rootURL, AsyncFileSystemChromium::creat e()); 107 m_callbacks->didOpenFileSystem(name, rootURL, AsyncFileSystemChromium::creat e());
108 } 108 }
109 109
110 void WebFileSystemCallbacksImpl::didResolveURL(const WebString& name, const WebU RL& rootURL, const WebString& filePath, bool isDirectory)
111 {
112 // This object is intended to delete itself on exit.
113 OwnPtr<WebFileSystemCallbacksImpl> callbacks = adoptPtr(this);
114 m_callbacks->didResolveURL(name, rootURL, filePath, isDirectory, AsyncFileSy stemChromium::create());
115 }
116
110 void WebFileSystemCallbacksImpl::didCreateFileWriter(WebFileWriter* webFileWrite r, long long length) 117 void WebFileSystemCallbacksImpl::didCreateFileWriter(WebFileWriter* webFileWrite r, long long length)
111 { 118 {
112 // This object is intended to delete itself on exit. 119 // This object is intended to delete itself on exit.
113 OwnPtr<WebFileSystemCallbacksImpl> callbacks = adoptPtr(this); 120 OwnPtr<WebFileSystemCallbacksImpl> callbacks = adoptPtr(this);
114 121
115 m_callbacks->didCreateFileWriter(adoptPtr(webFileWriter), length); 122 m_callbacks->didCreateFileWriter(adoptPtr(webFileWriter), length);
116 } 123 }
117 124
118 void WebFileSystemCallbacksImpl::didFail(WebFileError error) 125 void WebFileSystemCallbacksImpl::didFail(WebFileError error)
119 { 126 {
120 m_callbacks->didFail(error); 127 m_callbacks->didFail(error);
121 delete this; 128 delete this;
122 } 129 }
123 130
124 bool WebFileSystemCallbacksImpl::shouldBlockUntilCompletion() const 131 bool WebFileSystemCallbacksImpl::shouldBlockUntilCompletion() const
125 { 132 {
126 return m_callbacks->shouldBlockUntilCompletion(); 133 return m_callbacks->shouldBlockUntilCompletion();
127 } 134 }
128 135
129 } // namespace WebKit 136 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698