| 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 3669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3680 // Unique origins cannot store persistent state. | 3680 // Unique origins cannot store persistent state. |
| 3681 callbacks->didFail(WebKit::WebFileErrorAbort); | 3681 callbacks->didFail(WebKit::WebFileErrorAbort); |
| 3682 return; | 3682 return; |
| 3683 } | 3683 } |
| 3684 | 3684 |
| 3685 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( | 3685 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( |
| 3686 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), | 3686 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), |
| 3687 size, create, new WebFileSystemCallbackDispatcher(callbacks)); | 3687 size, create, new WebFileSystemCallbackDispatcher(callbacks)); |
| 3688 } | 3688 } |
| 3689 | 3689 |
| 3690 void RenderViewImpl::deleteFileSystem( |
| 3691 WebFrame* frame, |
| 3692 WebFileSystem::Type type , |
| 3693 WebFileSystemCallbacks* callbacks) { |
| 3694 DCHECK(callbacks); |
| 3695 |
| 3696 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 3697 if (origin.isUnique()) { |
| 3698 // Unique origins cannot store persistent state. |
| 3699 callbacks->didSucceed(); |
| 3700 return; |
| 3701 } |
| 3702 |
| 3703 ChildThread::current()->file_system_dispatcher()->DeleteFileSystem( |
| 3704 GURL(origin.toString()), |
| 3705 static_cast<fileapi::FileSystemType>(type), |
| 3706 new WebFileSystemCallbackDispatcher(callbacks)); |
| 3707 } |
| 3708 |
| 3690 void RenderViewImpl::queryStorageUsageAndQuota( | 3709 void RenderViewImpl::queryStorageUsageAndQuota( |
| 3691 WebFrame* frame, | 3710 WebFrame* frame, |
| 3692 WebStorageQuotaType type, | 3711 WebStorageQuotaType type, |
| 3693 WebStorageQuotaCallbacks* callbacks) { | 3712 WebStorageQuotaCallbacks* callbacks) { |
| 3694 DCHECK(frame); | 3713 DCHECK(frame); |
| 3695 WebSecurityOrigin origin = frame->document().securityOrigin(); | 3714 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 3696 if (origin.isUnique()) { | 3715 if (origin.isUnique()) { |
| 3697 // Unique origins cannot store persistent state. | 3716 // Unique origins cannot store persistent state. |
| 3698 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); | 3717 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); |
| 3699 return; | 3718 return; |
| (...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5736 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5755 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5737 return !!RenderThreadImpl::current()->compositor_thread(); | 5756 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5738 } | 5757 } |
| 5739 | 5758 |
| 5740 void RenderViewImpl::OnJavaBridgeInit() { | 5759 void RenderViewImpl::OnJavaBridgeInit() { |
| 5741 DCHECK(!java_bridge_dispatcher_); | 5760 DCHECK(!java_bridge_dispatcher_); |
| 5742 #if defined(ENABLE_JAVA_BRIDGE) | 5761 #if defined(ENABLE_JAVA_BRIDGE) |
| 5743 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5762 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5744 #endif | 5763 #endif |
| 5745 } | 5764 } |
| OLD | NEW |