Home | History | Annotate | Download | only in html_viewer
      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.
      4 
      5 #include "mojo/services/html_viewer/webstoragenamespace_impl.h"
      6 
      7 #include <stdio.h>
      8 
      9 #include "third_party/WebKit/public/platform/WebStorageArea.h"
     10 
     11 namespace mojo {
     12 namespace {
     13 
     14 class DummyWebStorageAreaImpl : public blink::WebStorageArea {
     15  public:
     16   virtual unsigned length() {
     17     return 0;
     18   }
     19   virtual blink::WebString key(unsigned index) {
     20     return blink::WebString();
     21   }
     22   virtual blink::WebString getItem(const blink::WebString& key) {
     23     return blink::WebString();
     24   }
     25 };
     26 
     27 }  // namespace
     28 
     29 WebStorageNamespaceImpl::WebStorageNamespaceImpl() {
     30 }
     31 
     32 WebStorageNamespaceImpl::~WebStorageNamespaceImpl() {
     33 }
     34 
     35 blink::WebStorageArea* WebStorageNamespaceImpl::createStorageArea(
     36     const blink::WebString& origin) {
     37   return new DummyWebStorageAreaImpl();
     38 }
     39 
     40 bool WebStorageNamespaceImpl::isSameNamespace(
     41     const blink::WebStorageNamespace&) const {
     42   return false;
     43 }
     44 
     45 }  // namespace mojo
     46