| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "base/strings/string_split.h" | 26 #include "base/strings/string_split.h" |
| 27 #include "base/strings/sys_string_conversions.h" | 27 #include "base/strings/sys_string_conversions.h" |
| 28 #include "base/time.h" | 28 #include "base/time.h" |
| 29 #include "base/utf_string_conversions.h" | 29 #include "base/utf_string_conversions.h" |
| 30 #include "content/common/appcache/appcache_dispatcher.h" | 30 #include "content/common/appcache/appcache_dispatcher.h" |
| 31 #include "content/common/child_thread.h" | 31 #include "content/common/child_thread.h" |
| 32 #include "content/common/clipboard_messages.h" | 32 #include "content/common/clipboard_messages.h" |
| 33 #include "content/common/database_messages.h" | 33 #include "content/common/database_messages.h" |
| 34 #include "content/common/drag_messages.h" | 34 #include "content/common/drag_messages.h" |
| 35 #include "content/common/fileapi/file_system_dispatcher.h" | 35 #include "content/common/fileapi/file_system_dispatcher.h" |
| 36 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" | 36 #include "content/common/fileapi/webfilesystem_callback_adapters.h" |
| 37 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 37 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 38 #include "content/common/input_messages.h" | 38 #include "content/common/input_messages.h" |
| 39 #include "content/common/java_bridge_messages.h" | 39 #include "content/common/java_bridge_messages.h" |
| 40 #include "content/common/pepper_messages.h" | 40 #include "content/common/pepper_messages.h" |
| 41 #include "content/common/pepper_plugin_registry.h" | 41 #include "content/common/pepper_plugin_registry.h" |
| 42 #include "content/common/quota_dispatcher.h" | 42 #include "content/common/quota_dispatcher.h" |
| 43 #include "content/common/request_extra_data.h" | 43 #include "content/common/request_extra_data.h" |
| 44 #include "content/common/socket_stream_handle_data.h" | 44 #include "content/common/socket_stream_handle_data.h" |
| 45 #include "content/common/ssl_status_serialization.h" | 45 #include "content/common/ssl_status_serialization.h" |
| 46 #include "content/common/view_messages.h" | 46 #include "content/common/view_messages.h" |
| (...skipping 4177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4224 | 4224 |
| 4225 WebSecurityOrigin origin = frame->document().securityOrigin(); | 4225 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 4226 if (origin.isUnique()) { | 4226 if (origin.isUnique()) { |
| 4227 // Unique origins cannot store persistent state. | 4227 // Unique origins cannot store persistent state. |
| 4228 callbacks->didFail(WebKit::WebFileErrorAbort); | 4228 callbacks->didFail(WebKit::WebFileErrorAbort); |
| 4229 return; | 4229 return; |
| 4230 } | 4230 } |
| 4231 | 4231 |
| 4232 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( | 4232 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( |
| 4233 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), | 4233 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), |
| 4234 size, create, new WebFileSystemCallbackDispatcher(callbacks)); | 4234 size, create, |
| 4235 base::Bind(&OpenFileSystemCallbackAdapter, callbacks), |
| 4236 base::Bind(&FileStatusCallbackAdapter, callbacks)); |
| 4235 } | 4237 } |
| 4236 | 4238 |
| 4237 void RenderViewImpl::deleteFileSystem( | 4239 void RenderViewImpl::deleteFileSystem( |
| 4238 WebFrame* frame, | 4240 WebFrame* frame, |
| 4239 WebKit::WebFileSystemType type , | 4241 WebKit::WebFileSystemType type , |
| 4240 WebFileSystemCallbacks* callbacks) { | 4242 WebFileSystemCallbacks* callbacks) { |
| 4241 DCHECK(callbacks); | 4243 DCHECK(callbacks); |
| 4242 | 4244 |
| 4243 WebSecurityOrigin origin = frame->document().securityOrigin(); | 4245 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 4244 if (origin.isUnique()) { | 4246 if (origin.isUnique()) { |
| 4245 // Unique origins cannot store persistent state. | 4247 // Unique origins cannot store persistent state. |
| 4246 callbacks->didSucceed(); | 4248 callbacks->didSucceed(); |
| 4247 return; | 4249 return; |
| 4248 } | 4250 } |
| 4249 | 4251 |
| 4250 ChildThread::current()->file_system_dispatcher()->DeleteFileSystem( | 4252 ChildThread::current()->file_system_dispatcher()->DeleteFileSystem( |
| 4251 GURL(origin.toString()), | 4253 GURL(origin.toString()), |
| 4252 static_cast<fileapi::FileSystemType>(type), | 4254 static_cast<fileapi::FileSystemType>(type), |
| 4253 new WebFileSystemCallbackDispatcher(callbacks)); | 4255 base::Bind(&FileStatusCallbackAdapter, callbacks)); |
| 4254 } | 4256 } |
| 4255 | 4257 |
| 4256 void RenderViewImpl::queryStorageUsageAndQuota( | 4258 void RenderViewImpl::queryStorageUsageAndQuota( |
| 4257 WebFrame* frame, | 4259 WebFrame* frame, |
| 4258 WebStorageQuotaType type, | 4260 WebStorageQuotaType type, |
| 4259 WebStorageQuotaCallbacks* callbacks) { | 4261 WebStorageQuotaCallbacks* callbacks) { |
| 4260 DCHECK(frame); | 4262 DCHECK(frame); |
| 4261 WebSecurityOrigin origin = frame->document().securityOrigin(); | 4263 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 4262 if (origin.isUnique()) { | 4264 if (origin.isUnique()) { |
| 4263 // Unique origins cannot store persistent state. | 4265 // Unique origins cannot store persistent state. |
| (...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6533 WebURL url = icon_urls[i].iconURL(); | 6535 WebURL url = icon_urls[i].iconURL(); |
| 6534 if (!url.isEmpty()) | 6536 if (!url.isEmpty()) |
| 6535 urls.push_back(FaviconURL(url, | 6537 urls.push_back(FaviconURL(url, |
| 6536 ToFaviconType(icon_urls[i].iconType()))); | 6538 ToFaviconType(icon_urls[i].iconType()))); |
| 6537 } | 6539 } |
| 6538 SendUpdateFaviconURL(urls); | 6540 SendUpdateFaviconURL(urls); |
| 6539 } | 6541 } |
| 6540 | 6542 |
| 6541 | 6543 |
| 6542 } // namespace content | 6544 } // namespace content |
| OLD | NEW |