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

Unified Diff: extensions/browser/extension_navigation_ui_data.h

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: Rebase + addressed nit Created 4 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: extensions/browser/extension_navigation_ui_data.h
diff --git a/extensions/browser/extension_navigation_ui_data.h b/extensions/browser/extension_navigation_ui_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..b5145685020436de4d888824762653e592463c18
--- /dev/null
+++ b/extensions/browser/extension_navigation_ui_data.h
@@ -0,0 +1,46 @@
+// Copyright 2016 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 EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_
+#define EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "extensions/browser/extension_api_frame_id_map.h"
+
+namespace content {
+class NavigationHandle;
+}
+
+namespace extensions {
+
+// PlzNavigate: initialized on the UI thread for all navigations. A copy is used
+// on the IO thread by the WebRequest API to access to the FrameData.
+class ExtensionNavigationUIData {
+ public:
+ ExtensionNavigationUIData();
+ ExtensionNavigationUIData(content::NavigationHandle* navigation_handle,
+ int tab_id,
+ int window_id);
+
+ std::unique_ptr<ExtensionNavigationUIData> DeepCopy() const;
+
+ const ExtensionApiFrameIdMap::FrameData& frame_data() const {
+ return frame_data_;
+ }
+
+ private:
+ void set_frame_data(const ExtensionApiFrameIdMap::FrameData& frame_data) {
+ frame_data_ = frame_data;
+ }
+
+ ExtensionApiFrameIdMap::FrameData frame_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionNavigationUIData);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_
« no previous file with comments | « extensions/browser/api/web_request/web_request_event_details.cc ('k') | extensions/browser/extension_navigation_ui_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698