Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Side by Side Diff: content/renderer/navigation_state_impl.cc

Issue 1001043002: Refactor NavigationState to use NavigationParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/navigation_state_impl.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "content/renderer/navigation_state_impl.h"
6
7 namespace content {
8
9 NavigationStateImpl::~NavigationStateImpl() {
10 }
11
12 NavigationStateImpl* NavigationStateImpl::CreateBrowserInitiated(
13 const CommonNavigationParams& common_params,
14 const StartNavigationParams& start_params,
15 const HistoryNavigationParams& history_params) {
16 return new NavigationStateImpl(common_params, start_params, history_params,
17 false);
18 }
19
20 NavigationStateImpl* NavigationStateImpl::CreateContentInitiated() {
21 return new NavigationStateImpl(CommonNavigationParams(),
22 StartNavigationParams(),
23 HistoryNavigationParams(), true);
24 }
25
26 ui::PageTransition NavigationStateImpl::GetTransitionType() {
27 return common_params_.transition;
28 }
29
30 bool NavigationStateImpl::WasWithinSamePage() {
31 return was_within_same_page_;
32 }
33
34 bool NavigationStateImpl::IsContentInitiated() {
35 return is_content_initiated_;
36 }
37
38 NavigationStateImpl::NavigationStateImpl(
39 const CommonNavigationParams& common_params,
40 const StartNavigationParams& start_params,
41 const HistoryNavigationParams& history_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 history_params_(history_params) {
49 }
50
51 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/navigation_state_impl.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698