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

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

Issue 2401443002: Fix nested URL blocking needs with PlzNavigate. (Closed)
Patch Set: 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "extensions/browser/extension_api_frame_id_map.h" 11 #include "extensions/browser/extension_api_frame_id_map.h"
12 12
13 namespace content { 13 namespace content {
14 class NavigationHandle; 14 class NavigationHandle;
15 } 15 }
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 // PlzNavigate: initialized on the UI thread for all navigations. A copy is used 19 // PlzNavigate: initialized on the UI thread for all navigations. A copy is used
20 // on the IO thread by the WebRequest API to access to the FrameData. 20 // on the IO thread by the WebRequest API to access to the FrameData.
21 class ExtensionNavigationUIData { 21 class ExtensionNavigationUIData {
22 public: 22 public:
23 ExtensionNavigationUIData(); 23 ExtensionNavigationUIData();
24 ExtensionNavigationUIData(content::NavigationHandle* navigation_handle, 24 ExtensionNavigationUIData(content::NavigationHandle* navigation_handle,
25 bool from_extension,
25 int tab_id, 26 int tab_id,
26 int window_id); 27 int window_id);
27 28
28 std::unique_ptr<ExtensionNavigationUIData> DeepCopy() const; 29 std::unique_ptr<ExtensionNavigationUIData> DeepCopy() const;
29 30
31 bool from_extension() const { return from_extension_; }
30 const ExtensionApiFrameIdMap::FrameData& frame_data() const { 32 const ExtensionApiFrameIdMap::FrameData& frame_data() const {
31 return frame_data_; 33 return frame_data_;
32 } 34 }
33 35
34 private: 36 private:
35 void set_frame_data(const ExtensionApiFrameIdMap::FrameData& frame_data) { 37 void set_frame_data(const ExtensionApiFrameIdMap::FrameData& frame_data) {
36 frame_data_ = frame_data; 38 frame_data_ = frame_data;
37 } 39 }
38 40
41 bool from_extension_;
39 ExtensionApiFrameIdMap::FrameData frame_data_; 42 ExtensionApiFrameIdMap::FrameData frame_data_;
40 43
41 DISALLOW_COPY_AND_ASSIGN(ExtensionNavigationUIData); 44 DISALLOW_COPY_AND_ASSIGN(ExtensionNavigationUIData);
42 }; 45 };
43 46
44 } // namespace extensions 47 } // namespace extensions
45 48
46 #endif // EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_ 49 #endif // EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698