OLD | NEW |
(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 EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "extensions/browser/extension_api_frame_id_map.h" |
| 12 |
| 13 namespace content { |
| 14 class NavigationHandle; |
| 15 } |
| 16 |
| 17 namespace extensions { |
| 18 |
| 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. |
| 21 class ExtensionNavigationUIData { |
| 22 public: |
| 23 ExtensionNavigationUIData(); |
| 24 ExtensionNavigationUIData(content::NavigationHandle* navigation_handle, |
| 25 int tab_id, |
| 26 int window_id); |
| 27 |
| 28 std::unique_ptr<ExtensionNavigationUIData> DeepCopy() const; |
| 29 |
| 30 const ExtensionApiFrameIdMap::FrameData& frame_data() const { |
| 31 return frame_data_; |
| 32 } |
| 33 |
| 34 private: |
| 35 void set_frame_data(const ExtensionApiFrameIdMap::FrameData& frame_data) { |
| 36 frame_data_ = frame_data; |
| 37 } |
| 38 |
| 39 ExtensionApiFrameIdMap::FrameData frame_data_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(ExtensionNavigationUIData); |
| 42 }; |
| 43 |
| 44 } // namespace extensions |
| 45 |
| 46 #endif // EXTENSIONS_BROWSER_EXTENSION_NAVIGATION_UI_DATA_H_ |
OLD | NEW |