| 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 #include "extensions/shell/browser/shell_navigation_ui_data.h" |
| 6 |
| 7 #include "base/memory/ptr_util.h" |
| 8 #include "content/public/browser/navigation_handle.h" |
| 9 |
| 10 namespace extensions { |
| 11 |
| 12 ShellNavigationUIData::ShellNavigationUIData() {} |
| 13 |
| 14 ShellNavigationUIData::ShellNavigationUIData( |
| 15 content::NavigationHandle* navigation_handle) { |
| 16 extension_data_ = base::MakeUnique<ExtensionNavigationUIData>( |
| 17 navigation_handle, -1, -1); |
| 18 } |
| 19 |
| 20 ShellNavigationUIData::~ShellNavigationUIData() {} |
| 21 |
| 22 std::unique_ptr<content::NavigationUIData> ShellNavigationUIData::Clone() |
| 23 const { |
| 24 std::unique_ptr<ShellNavigationUIData> copy = |
| 25 base::MakeUnique<ShellNavigationUIData>(); |
| 26 |
| 27 if (extension_data_) |
| 28 copy->SetExtensionNavigationUIData(extension_data_->DeepCopy()); |
| 29 |
| 30 return std::move(copy); |
| 31 } |
| 32 |
| 33 void ShellNavigationUIData::SetExtensionNavigationUIData( |
| 34 std::unique_ptr<ExtensionNavigationUIData> extension_data) { |
| 35 extension_data_ = std::move(extension_data); |
| 36 } |
| 37 |
| 38 } // namespace extensions |
| OLD | NEW |