Chromium Code Reviews| Index: extensions/browser/extension_navigation_ui_data.cc |
| diff --git a/extensions/browser/extension_navigation_ui_data.cc b/extensions/browser/extension_navigation_ui_data.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0cf2cb02b2b0d9d0f2788c9bf16a07747c61bfa6 |
| --- /dev/null |
| +++ b/extensions/browser/extension_navigation_ui_data.cc |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "extensions/browser/extension_navigation_ui_data.h" |
| + |
| +#include "content/public/browser/navigation_handle.h" |
| + |
| +namespace extensions { |
| + |
| +ExtensionNavigationUIData::ExtensionNavigationUIData() {} |
| + |
| +ExtensionNavigationUIData::ExtensionNavigationUIData( |
| + content::NavigationHandle* navigation_handle, |
| + int tab_id, |
| + int window_id) { |
| + frame_data_.frame_id = ExtensionApiFrameIdMap::GetFrameId(navigation_handle); |
|
Devlin
2016/09/16 16:17:26
It makes me a little sad that we now have two sepa
clamy
2016/09/19 15:10:03
Done.
|
| + frame_data_.parent_frame_id = |
| + ExtensionApiFrameIdMap::GetParentFrameId(navigation_handle); |
| + frame_data_.tab_id = tab_id; |
| + frame_data_.window_id = window_id; |
| +} |
| + |
| +std::unique_ptr<ExtensionNavigationUIData> ExtensionNavigationUIData::DeepCopy() |
| + const { |
| + std::unique_ptr<ExtensionNavigationUIData> copy( |
| + new ExtensionNavigationUIData()); |
| + copy->set_frame_data(frame_data_); |
| + return copy; |
| +} |
| + |
| +} // namespace extensions |