Roll WebRTC 9189:9205, Libjingle 9186:9198
[chromium-blink-merge.git] / content / renderer / navigation_state_impl.cc
blob38d1eed8d569f0aa47b28935f442ad3f7d78780b
1 // Copyright 2015 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.
5 #include "content/renderer/navigation_state_impl.h"
7 namespace content {
9 NavigationStateImpl::~NavigationStateImpl() {
12 NavigationStateImpl* NavigationStateImpl::CreateBrowserInitiated(
13 const CommonNavigationParams& common_params,
14 const StartNavigationParams& start_params,
15 const RequestNavigationParams& request_params) {
16 return new NavigationStateImpl(common_params, start_params, request_params,
17 false);
20 NavigationStateImpl* NavigationStateImpl::CreateContentInitiated() {
21 return new NavigationStateImpl(CommonNavigationParams(),
22 StartNavigationParams(),
23 RequestNavigationParams(), true);
26 ui::PageTransition NavigationStateImpl::GetTransitionType() {
27 return common_params_.transition;
30 bool NavigationStateImpl::WasWithinSamePage() {
31 return was_within_same_page_;
34 bool NavigationStateImpl::IsContentInitiated() {
35 return is_content_initiated_;
38 NavigationStateImpl::NavigationStateImpl(
39 const CommonNavigationParams& common_params,
40 const StartNavigationParams& start_params,
41 const RequestNavigationParams& request_params,
42 bool is_content_initiated)
43 : request_committed_(false),
44 was_within_same_page_(false),
45 is_content_initiated_(is_content_initiated),
46 common_params_(common_params),
47 start_params_(start_params),
48 request_params_(request_params) {
51 } // namespace content