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

Side by Side Diff: components/navigation_interception/navigation_params.cc

Issue 2524763002: make NavigationGesture part of public content API and use it outside content (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/navigation_interception/navigation_params.h" 5 #include "components/navigation_interception/navigation_params.h"
6 6
7 namespace navigation_interception { 7 namespace navigation_interception {
8 8
9 NavigationParams::NavigationParams(const NavigationParams& other) { 9 NavigationParams::NavigationParams(const NavigationParams& other) {
10 Assign(other); 10 Assign(other);
11 } 11 }
12 12
13 NavigationParams::NavigationParams(const GURL& url, 13 NavigationParams::NavigationParams(const GURL& url,
14 const content::Referrer& referrer, 14 const content::Referrer& referrer,
15 bool has_user_gesture, 15 content::NavigationGesture gesture,
16 bool is_post, 16 bool is_post,
17 ui::PageTransition transition_type, 17 ui::PageTransition transition_type,
18 bool is_redirect, 18 bool is_redirect,
19 bool is_external_protocol, 19 bool is_external_protocol,
20 bool is_main_frame) 20 bool is_main_frame)
21 : url_(url), 21 : url_(url),
22 referrer_(referrer), 22 referrer_(referrer),
23 has_user_gesture_(has_user_gesture), 23 gesture_(gesture),
24 is_post_(is_post), 24 is_post_(is_post),
25 transition_type_(transition_type), 25 transition_type_(transition_type),
26 is_redirect_(is_redirect), 26 is_redirect_(is_redirect),
27 is_external_protocol_(is_external_protocol), 27 is_external_protocol_(is_external_protocol),
28 is_main_frame_(is_main_frame) { 28 is_main_frame_(is_main_frame) {}
29 }
30 29
31 void NavigationParams::operator=(const NavigationParams& rhs) { 30 void NavigationParams::operator=(const NavigationParams& rhs) {
32 Assign(rhs); 31 Assign(rhs);
33 } 32 }
34 33
35 void NavigationParams::Assign(const NavigationParams& other) { 34 void NavigationParams::Assign(const NavigationParams& other) {
36 url_ = other.url(); 35 url_ = other.url();
37 referrer_ = other.referrer(); 36 referrer_ = other.referrer();
38 has_user_gesture_ = other.has_user_gesture(); 37 gesture_ = other.gesture();
39 is_post_ = other.is_post(); 38 is_post_ = other.is_post();
40 transition_type_ = other.transition_type(); 39 transition_type_ = other.transition_type();
41 is_redirect_ = other.is_redirect(); 40 is_redirect_ = other.is_redirect();
42 is_external_protocol_ = other.is_external_protocol(); 41 is_external_protocol_ = other.is_external_protocol();
43 is_main_frame_ = other.is_main_frame(); 42 is_main_frame_ = other.is_main_frame();
44 } 43 }
45 44
46 } // namespace navigation_interception 45 } // namespace navigation_interception
47
OLDNEW
« no previous file with comments | « components/navigation_interception/navigation_params.h ('k') | content/browser/frame_host/navigation_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698