OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 3479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3490 return; | 3490 return; |
3491 } | 3491 } |
3492 ChildThreadImpl::current()->quota_dispatcher()->RequestStorageQuota( | 3492 ChildThreadImpl::current()->quota_dispatcher()->RequestStorageQuota( |
3493 render_view_->GetRoutingID(), | 3493 render_view_->GetRoutingID(), |
3494 GURL(origin.toString()), | 3494 GURL(origin.toString()), |
3495 static_cast<storage::StorageType>(type), | 3495 static_cast<storage::StorageType>(type), |
3496 requested_size, | 3496 requested_size, |
3497 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 3497 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
3498 } | 3498 } |
3499 | 3499 |
| 3500 void RenderFrameImpl::requestDurability( |
| 3501 WebLocalFrame* frame, |
| 3502 blink::WebStorageQuotaCallbacks callbacks) { |
| 3503 DCHECK(!frame_ || frame_ == frame); |
| 3504 WebSecurityOrigin origin = frame->document().securityOrigin(); |
| 3505 if (origin.isUnique()) { |
| 3506 // Unique origins cannot store persistent state. |
| 3507 callbacks.didFail(blink::WebStorageQuotaErrorAbort); |
| 3508 return; |
| 3509 } |
| 3510 ChildThreadImpl::current()->quota_dispatcher()->RequestDurability( |
| 3511 render_view_->GetRoutingID(), |
| 3512 GURL(origin.toString()), |
| 3513 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
| 3514 }; |
| 3515 |
3500 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { | 3516 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { |
3501 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); | 3517 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); |
3502 impl->set_render_frame_id(routing_id_); | 3518 impl->set_render_frame_id(routing_id_); |
3503 } | 3519 } |
3504 | 3520 |
3505 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { | 3521 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { |
3506 if (!geolocation_dispatcher_) | 3522 if (!geolocation_dispatcher_) |
3507 geolocation_dispatcher_ = new GeolocationDispatcher(this); | 3523 geolocation_dispatcher_ = new GeolocationDispatcher(this); |
3508 return geolocation_dispatcher_; | 3524 return geolocation_dispatcher_; |
3509 } | 3525 } |
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4906 #elif defined(ENABLE_BROWSER_CDMS) | 4922 #elif defined(ENABLE_BROWSER_CDMS) |
4907 cdm_manager_, | 4923 cdm_manager_, |
4908 #endif | 4924 #endif |
4909 this); | 4925 this); |
4910 } | 4926 } |
4911 | 4927 |
4912 return cdm_factory_; | 4928 return cdm_factory_; |
4913 } | 4929 } |
4914 | 4930 |
4915 } // namespace content | 4931 } // namespace content |
OLD | NEW |