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

Unified Diff: extensions/browser/extension_navigation_ui_data.cc

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.cc
diff --git a/extensions/browser/extension_navigation_ui_data.cc b/extensions/browser/extension_navigation_ui_data.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c7576ba1a6b8dce14ec36331086a2a5eeca4663f
--- /dev/null
+++ b/extensions/browser/extension_navigation_ui_data.cc
@@ -0,0 +1,34 @@
+// 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.
+
+#include "extensions/browser/extension_navigation_ui_data.h"
+
+#include "content/public/browser/navigation_handle.h"
+
+namespace extensions {
+
+ExtensionNavigationUIData::ExtensionNavigationUIData() {}
+
+ExtensionNavigationUIData::ExtensionNavigationUIData(
+ content::NavigationHandle* navigation_handle,
+ int tab_id,
+ int window_id) {
+ // TODO(clamy): See if it would be possible to have just one source for the
+ // FrameData that works both for navigations and subresources loads.
+ frame_data_.frame_id = ExtensionApiFrameIdMap::GetFrameId(navigation_handle);
+ frame_data_.parent_frame_id =
+ ExtensionApiFrameIdMap::GetParentFrameId(navigation_handle);
+ frame_data_.tab_id = tab_id;
+ frame_data_.window_id = window_id;
+}
+
+std::unique_ptr<ExtensionNavigationUIData> ExtensionNavigationUIData::DeepCopy()
+ const {
+ std::unique_ptr<ExtensionNavigationUIData> copy(
+ new ExtensionNavigationUIData());
+ copy->set_frame_data(frame_data_);
+ return copy;
+}
+
+} // namespace extensions
« no previous file with comments | « extensions/browser/extension_navigation_ui_data.h ('k') | extensions/shell/browser/shell_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698