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 #ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ |
6 #define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/public/browser/session_storage_namespace.h" | 12 #include "content/public/browser/session_storage_namespace.h" |
| 13 #include "webkit/dom_storage/dom_storage_context.h" |
13 | 14 |
14 class DOMStorageContextImpl; | 15 class DOMStorageContextImpl; |
15 | 16 |
16 namespace dom_storage { | 17 namespace dom_storage { |
17 class DomStorageSession; | 18 class DomStorageSession; |
18 } | 19 } |
19 | 20 |
| 21 struct SessionStorageAssociatedDetails { |
| 22 int64 id; |
| 23 int real_id; |
| 24 SessionStorageAssociatedDetails(); |
| 25 SessionStorageAssociatedDetails(int64 id, int64 real_id); |
| 26 ~SessionStorageAssociatedDetails(); |
| 27 }; |
| 28 |
20 class SessionStorageNamespaceImpl | 29 class SessionStorageNamespaceImpl |
21 : NON_EXPORTED_BASE(public content::SessionStorageNamespace) { | 30 : NON_EXPORTED_BASE(public content::SessionStorageNamespace), |
| 31 public dom_storage::DomStorageContext::SessionStorageObserver { |
22 public: | 32 public: |
23 explicit SessionStorageNamespaceImpl(DOMStorageContextImpl* context); | 33 explicit SessionStorageNamespaceImpl(DOMStorageContextImpl* context); |
24 int64 id() const; | 34 virtual int64 id() const; |
25 SessionStorageNamespaceImpl* Clone(); | 35 SessionStorageNamespaceImpl* Clone(); |
26 | 36 |
| 37 virtual void OnSessionStorageNamespaceAssociated( |
| 38 int64 real_namespace_id); |
| 39 |
27 private: | 40 private: |
28 explicit SessionStorageNamespaceImpl(dom_storage::DomStorageSession* clone); | 41 explicit SessionStorageNamespaceImpl(dom_storage::DomStorageSession* clone); |
29 virtual ~SessionStorageNamespaceImpl(); | 42 virtual ~SessionStorageNamespaceImpl(); |
30 | 43 |
31 scoped_refptr<dom_storage::DomStorageSession> session_; | 44 scoped_refptr<dom_storage::DomStorageSession> session_; |
32 | 45 |
33 DISALLOW_COPY_AND_ASSIGN(SessionStorageNamespaceImpl); | 46 DISALLOW_COPY_AND_ASSIGN(SessionStorageNamespaceImpl); |
34 }; | 47 }; |
35 | 48 |
36 #endif // CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ | 49 #endif // CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_ |
OLD | NEW |