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

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: Response to review 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
« no previous file with comments | « components/sessions/BUILD.gn ('k') | components/sessions/content/content_tab_client_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a54ebe9817ba24a27d03ebe5f9696d81cc3cde1f
--- /dev/null
+++ b/components/sessions/content/content_tab_client_data.h
@@ -0,0 +1,37 @@
+// 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);
+ ContentTabClientData();
+ ~ContentTabClientData() override;
+
+ content::SessionStorageNamespace* session_storage_namespace() const {
+ return session_storage_namespace_.get();
+ }
+
+ private:
+ // TabClientData:
+ scoped_ptr<TabClientData> Clone() override;
+
+ scoped_refptr<content::SessionStorageNamespace> session_storage_namespace_;
+};
+
+} // namespace sessions
+
+#endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_CLIENT_DATA_H_
« no previous file with comments | « components/sessions/BUILD.gn ('k') | components/sessions/content/content_tab_client_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698