Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: components/sessions/content/content_tab_client_data.h

Issue 1343833002: Abstract content::SessionStorageNamespace from core TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extension_tab_helper
Patch Set: Hopefully fix Windows Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sessions/content/content_tab_client_data.h
diff --git a/components/sessions/content/content_tab_client_data.h b/components/sessions/content/content_tab_client_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..311e56bd61cfaaef528235a72421f799d705debd
--- /dev/null
+++ b/components/sessions/content/content_tab_client_data.h
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SESSIONS_CONTENT_CONTENT_CLIENT_DATA_H_
+#define COMPONENTS_SESSIONS_CONTENT_CONTENT_CLIENT_DATA_H_
+
+#include "base/memory/ref_counted.h"
+#include "components/sessions/core/tab_restore_service_client.h"
+#include "components/sessions/sessions_export.h"
+#include "content/public/browser/session_storage_namespace.h"
+
+namespace sessions {
+
+// A //content-specific subclass of TabClientData that is used to associate
+// TabRestoreService::Tab instances with the content::SessionStorageNamespace
+// of the WebContents from which they were created.
+class SESSIONS_EXPORT ContentTabClientData : public TabClientData {
+ public:
+ explicit ContentTabClientData(content::WebContents* web_contents);
+
+ content::SessionStorageNamespace* session_storage_namespace() const {
+ return session_storage_namespace_.get();
+ }
+
+ private:
+ friend class base::RefCountedThreadSafe<ContentTabClientData>;
+ ~ContentTabClientData() override;
+
+ scoped_refptr<content::SessionStorageNamespace> session_storage_namespace_;
+};
+
+} // namespace sessions
+
+#endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_CLIENT_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698