Chromium Code Reviews| Index: content/renderer/navigation_state_impl.cc |
| diff --git a/content/renderer/navigation_state_impl.cc b/content/renderer/navigation_state_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..34a56dc41387bfe81079095443ffb2d7944df16a |
| --- /dev/null |
| +++ b/content/renderer/navigation_state_impl.cc |
| @@ -0,0 +1,51 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
Avi (use Gerrit)
2015/03/16 18:10:24
no (c)
clamy
2015/03/17 16:08:18
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/renderer/navigation_state_impl.h" |
| + |
| +namespace content { |
| + |
| +NavigationStateImpl* NavigationStateImpl::CreateBrowserInitiated( |
| + const CommonNavigationParams& common_params, |
| + const StartNavigationParams& start_params, |
| + const HistoryNavigationParams& history_params) { |
| + return new NavigationStateImpl(common_params, start_params, history_params, |
| + false); |
| +} |
| + |
| +NavigationStateImpl* NavigationStateImpl::CreateContentInitiated() { |
| + return new NavigationStateImpl(CommonNavigationParams(), |
| + StartNavigationParams(), |
| + HistoryNavigationParams(), true); |
| +} |
| + |
| +NavigationStateImpl::NavigationStateImpl( |
| + const CommonNavigationParams& common_params, |
| + const StartNavigationParams& start_params, |
| + const HistoryNavigationParams& history_params, |
| + bool is_content_initiated) |
| + : request_committed_(false), |
| + was_within_same_page_(false), |
| + is_content_initiated_(is_content_initiated), |
| + common_params_(common_params), |
| + start_params_(start_params), |
| + history_params_(history_params) { |
| +} |
| + |
| +NavigationStateImpl::~NavigationStateImpl() { |
| +} |
| + |
| +ui::PageTransition NavigationStateImpl::GetTransitionType() const { |
| + return common_params_.transition; |
| +} |
| + |
| +bool NavigationStateImpl::GetWasWithinSamePage() const { |
| + return was_within_same_page_; |
| +} |
| + |
| +bool NavigationStateImpl::IsContentInitiated() const { |
| + return is_content_initiated_; |
| +} |
| + |
| +} // namespace content |