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

Side by Side Diff: chrome/browser/renderer_host/chrome_navigation_ui_data.h

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: PlzNavigate: support the WebRequest API 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 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 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_NAVIGATION_UI_DATA_H_
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_NAVIGATION_UI_DATA_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "content/public/browser/navigation_ui_data.h"
12 #include "extensions/browser/extension_navigation_ui_data.h"
13
14 namespace content {
15 class NavigationHandle;
16 }
17
18 class ChromeNavigationUIData : public content::NavigationUIData {
19 public:
20 ChromeNavigationUIData();
21 explicit ChromeNavigationUIData(content::NavigationHandle* navigation_handle);
22 ~ChromeNavigationUIData() override;
23
24 // Creates a new ChromeNavigationUIData that is a deep copy of the original.
25 // Any
Devlin 2016/09/16 16:17:26 nit: wrapping
clamy 2016/09/19 15:10:03 Done.
26 // changes to the original after the clone is created will not be reflected in
27 // the clone.
28 // |extension_data_| is deep copied.
29 std::unique_ptr<content::NavigationUIData> Clone() const override;
30
31 #if defined(ENABLE_EXTENSIONS)
32 void SetExtensionNavigationUIData(
33 std::unique_ptr<extensions::ExtensionNavigationUIData> extension_data) {
34 extension_data_ = std::move(extension_data);
35 }
36
37 extensions::ExtensionNavigationUIData* GetExtensionNavigationUIData() const {
38 return extension_data_.get();
39 }
40 #endif
41
42 private:
43 #if defined(ENABLE_EXTENSIONS)
44 // Manages the lifetime of optional ExtensionNavigationUIData information.
45 std::unique_ptr<extensions::ExtensionNavigationUIData> extension_data_;
46 #endif
47
48 DISALLOW_COPY_AND_ASSIGN(ChromeNavigationUIData);
49 };
50
51 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_NAVIGATION_UI_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698