| 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 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3664 // Unique origins cannot store persistent state. | 3664 // Unique origins cannot store persistent state. |
| 3665 callbacks->didFail(WebKit::WebFileErrorAbort); | 3665 callbacks->didFail(WebKit::WebFileErrorAbort); |
| 3666 return; | 3666 return; |
| 3667 } | 3667 } |
| 3668 | 3668 |
| 3669 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( | 3669 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( |
| 3670 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), | 3670 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), |
| 3671 size, create, new WebFileSystemCallbackDispatcher(callbacks)); | 3671 size, create, new WebFileSystemCallbackDispatcher(callbacks)); |
| 3672 } | 3672 } |
| 3673 | 3673 |
| 3674 void RenderViewImpl::deleteFileSystem( |
| 3675 WebFrame* frame, |
| 3676 WebFileSystem::Type type , |
| 3677 WebFileSystemCallbacks* callbacks) { |
| 3678 DCHECK(callbacks); |
| 3679 |
| 3680 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 3681 if (origin.isUnique()) { |
| 3682 // Unique origins cannot store persistent state. |
| 3683 callbacks->didSucceed(); |
| 3684 return; |
| 3685 } |
| 3686 |
| 3687 ChildThread::current()->file_system_dispatcher()->DeleteFileSystem( |
| 3688 GURL(origin.toString()), |
| 3689 static_cast<fileapi::FileSystemType>(type), |
| 3690 new WebFileSystemCallbackDispatcher(callbacks)); |
| 3691 } |
| 3692 |
| 3674 void RenderViewImpl::queryStorageUsageAndQuota( | 3693 void RenderViewImpl::queryStorageUsageAndQuota( |
| 3675 WebFrame* frame, | 3694 WebFrame* frame, |
| 3676 WebStorageQuotaType type, | 3695 WebStorageQuotaType type, |
| 3677 WebStorageQuotaCallbacks* callbacks) { | 3696 WebStorageQuotaCallbacks* callbacks) { |
| 3678 DCHECK(frame); | 3697 DCHECK(frame); |
| 3679 WebSecurityOrigin origin = frame->document().securityOrigin(); | 3698 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 3680 if (origin.isUnique()) { | 3699 if (origin.isUnique()) { |
| 3681 // Unique origins cannot store persistent state. | 3700 // Unique origins cannot store persistent state. |
| 3682 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); | 3701 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); |
| 3683 return; | 3702 return; |
| (...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5720 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5739 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5721 return !!RenderThreadImpl::current()->compositor_thread(); | 5740 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5722 } | 5741 } |
| 5723 | 5742 |
| 5724 void RenderViewImpl::OnJavaBridgeInit() { | 5743 void RenderViewImpl::OnJavaBridgeInit() { |
| 5725 DCHECK(!java_bridge_dispatcher_); | 5744 DCHECK(!java_bridge_dispatcher_); |
| 5726 #if defined(ENABLE_JAVA_BRIDGE) | 5745 #if defined(ENABLE_JAVA_BRIDGE) |
| 5727 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5746 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5728 #endif | 5747 #endif |
| 5729 } | 5748 } |
| OLD | NEW |