1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/html_viewer/web_storage_namespace_impl.h"
9 #include "third_party/WebKit/public/platform/WebStorageArea.h"
11 namespace html_viewer
{
14 class DummyWebStorageAreaImpl
: public blink::WebStorageArea
{
16 unsigned length() override
{ return 0; }
17 blink::WebString
key(unsigned index
) override
{ return blink::WebString(); }
18 blink::WebString
getItem(const blink::WebString
& key
) override
{
19 return blink::WebString();
25 WebStorageNamespaceImpl::WebStorageNamespaceImpl() {
28 WebStorageNamespaceImpl::~WebStorageNamespaceImpl() {
31 blink::WebStorageArea
* WebStorageNamespaceImpl::createStorageArea(
32 const blink::WebString
& origin
) {
33 return new DummyWebStorageAreaImpl();
36 bool WebStorageNamespaceImpl::isSameNamespace(
37 const blink::WebStorageNamespace
&) const {
41 } // namespace html_viewer