1 // Copyright 2014 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/common/navigation_params.h"
7 #include "base/memory/ref_counted_memory.h"
10 CommonNavigationParams::CommonNavigationParams()
11 : transition(ui::PAGE_TRANSITION_LINK
),
12 navigation_type(FrameMsg_Navigate_Type::NORMAL
),
13 allow_download(true) {
16 CommonNavigationParams::~CommonNavigationParams() {}
18 CommonNavigationParams::CommonNavigationParams(
20 const Referrer
& referrer
,
21 ui::PageTransition transition
,
22 FrameMsg_Navigate_Type::Value navigation_type
,
26 transition(transition
),
27 navigation_type(navigation_type
),
28 allow_download(allow_download
) {
31 RequestNavigationParams::RequestNavigationParams() : is_post(false) {}
33 RequestNavigationParams::RequestNavigationParams(
35 const std::string
& extra_headers
,
36 const base::RefCountedMemory
* post_data
)
38 extra_headers(extra_headers
) {
40 browser_initiated_post_data
.assign(
41 post_data
->front(), post_data
->front() + post_data
->size());
45 RequestNavigationParams::~RequestNavigationParams() {}
47 CommitNavigationParams::CommitNavigationParams()
48 : is_overriding_user_agent(false) {
51 CommitNavigationParams::CommitNavigationParams(const PageState
& page_state
,
52 bool is_overriding_user_agent
,
53 base::TimeTicks navigation_start
)
54 : page_state(page_state
),
55 is_overriding_user_agent(is_overriding_user_agent
),
56 browser_navigation_start(navigation_start
) {
59 CommitNavigationParams::~CommitNavigationParams() {}
61 } // namespace content