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

Side by Side Diff: extensions/shell/browser/shell_navigation_ui_data.h

Issue 2465253010: Add WebView PlzNavigate related fixes to extensions_browsertests harness. (Closed)
Patch Set: Created 4 years, 1 month 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 CHROME_BROWSER_RENDERER_HOST_CHROME_NAVIGATION_UI_DATA_H_ 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_NAVIGATION_UI_DATA_H_
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_NAVIGATION_UI_DATA_H_ 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_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 "content/public/browser/navigation_ui_data.h" 11 #include "content/public/browser/navigation_ui_data.h"
12 #include "extensions/browser/extension_navigation_ui_data.h" 12 #include "extensions/browser/extension_navigation_ui_data.h"
13 13
14 namespace content { 14 namespace extensions {
15 class NavigationHandle;
16 }
17 15
18 // PlzNavigate 16 // PlzNavigate
19 // Contains data that is passed from the UI thread to the IO thread at the 17 // Contains data that is passed from the UI thread to the IO thread at the
20 // beginning of each navigation. The class is instantiated on the UI thread, 18 // beginning of each navigation. The class is instantiated on the UI thread,
21 // then a copy created using Clone is passed to the content::ResourceRequestInfo 19 // then a copy created using Clone is passed to the content::ResourceRequestInfo
22 // on the IO thread. 20 // on the IO thread.
23 class ChromeNavigationUIData : public content::NavigationUIData { 21 class ShellNavigationUIData : public content::NavigationUIData {
24 public: 22 public:
25 ChromeNavigationUIData(); 23 ShellNavigationUIData();
26 explicit ChromeNavigationUIData(content::NavigationHandle* navigation_handle); 24 explicit ShellNavigationUIData(content::NavigationHandle* navigation_handle);
27 ~ChromeNavigationUIData() override; 25 ~ShellNavigationUIData() override;
28 26
29 // Creates a new ChromeNavigationUIData that is a deep copy of the original. 27 // Creates a new ChromeNavigationUIData that is a deep copy of the original.
30 // Any changes to the original after the clone is created will not be 28 // Any changes to the original after the clone is created will not be
31 // reflected in the clone. |extension_data_| is deep copied. 29 // reflected in the clone. |extension_data_| is deep copied.
32 std::unique_ptr<content::NavigationUIData> Clone() const override; 30 std::unique_ptr<content::NavigationUIData> Clone() const override;
33 31
34 #if defined(ENABLE_EXTENSIONS)
35 void SetExtensionNavigationUIData( 32 void SetExtensionNavigationUIData(
36 std::unique_ptr<extensions::ExtensionNavigationUIData> extension_data); 33 std::unique_ptr<ExtensionNavigationUIData> extension_data);
37 34
38 extensions::ExtensionNavigationUIData* GetExtensionNavigationUIData() const { 35 ExtensionNavigationUIData* GetExtensionNavigationUIData() const {
39 return extension_data_.get(); 36 return extension_data_.get();
40 } 37 }
41 #endif
42 38
43 private: 39 private:
44 #if defined(ENABLE_EXTENSIONS)
45 // Manages the lifetime of optional ExtensionNavigationUIData information. 40 // Manages the lifetime of optional ExtensionNavigationUIData information.
46 std::unique_ptr<extensions::ExtensionNavigationUIData> extension_data_; 41 std::unique_ptr<ExtensionNavigationUIData> extension_data_;
47 #endif
48 42
49 DISALLOW_COPY_AND_ASSIGN(ChromeNavigationUIData); 43 DISALLOW_COPY_AND_ASSIGN(ShellNavigationUIData);
50 }; 44 };
51 45
52 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_NAVIGATION_UI_DATA_H_ 46 } // namespace extensions
47
48 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_NAVIGATION_UI_DATA_H_
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_extensions_browser_client.cc ('k') | extensions/shell/browser/shell_navigation_ui_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698