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

Side by Side Diff: extensions/browser/extension_navigation_ui_data.cc

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: Rebase + addressed nit Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "extensions/browser/extension_navigation_ui_data.h"
6
7 #include "content/public/browser/navigation_handle.h"
8
9 namespace extensions {
10
11 ExtensionNavigationUIData::ExtensionNavigationUIData() {}
12
13 ExtensionNavigationUIData::ExtensionNavigationUIData(
14 content::NavigationHandle* navigation_handle,
15 int tab_id,
16 int window_id) {
17 // TODO(clamy): See if it would be possible to have just one source for the
18 // FrameData that works both for navigations and subresources loads.
19 frame_data_.frame_id = ExtensionApiFrameIdMap::GetFrameId(navigation_handle);
20 frame_data_.parent_frame_id =
21 ExtensionApiFrameIdMap::GetParentFrameId(navigation_handle);
22 frame_data_.tab_id = tab_id;
23 frame_data_.window_id = window_id;
24 }
25
26 std::unique_ptr<ExtensionNavigationUIData> ExtensionNavigationUIData::DeepCopy()
27 const {
28 std::unique_ptr<ExtensionNavigationUIData> copy(
29 new ExtensionNavigationUIData());
30 copy->set_frame_data(frame_data_);
31 return copy;
32 }
33
34 } // namespace extensions
OLDNEW
« 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