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

Side by Side Diff: content/public/browser/navigation_controller.cc

Issue 1243253004: Pass user gesture bit when chrome handles an intent fired by itself (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix findbugs warning Created 5 years, 4 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/public/browser/navigation_controller.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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/browser/navigation_controller.h" 5 #include "content/public/browser/navigation_controller.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 NavigationController::LoadURLParams::LoadURLParams(const GURL& url) 11 NavigationController::LoadURLParams::LoadURLParams(const GURL& url)
12 : url(url), 12 : url(url),
13 load_type(LOAD_TYPE_DEFAULT), 13 load_type(LOAD_TYPE_DEFAULT),
14 transition_type(ui::PAGE_TRANSITION_LINK), 14 transition_type(ui::PAGE_TRANSITION_LINK),
15 frame_tree_node_id(-1), 15 frame_tree_node_id(-1),
16 is_renderer_initiated(false), 16 is_renderer_initiated(false),
17 override_user_agent(UA_OVERRIDE_INHERIT), 17 override_user_agent(UA_OVERRIDE_INHERIT),
18 browser_initiated_post_data(nullptr), 18 browser_initiated_post_data(nullptr),
19 can_load_local_resources(false), 19 can_load_local_resources(false),
20 should_replace_current_entry(false), 20 should_replace_current_entry(false),
21 #if defined(OS_ANDROID)
22 intent_received_timestamp(0),
23 has_user_gesture(false),
24 #endif
21 should_clear_history_list(false) { 25 should_clear_history_list(false) {
22 #if defined(OS_ANDROID)
23 intent_received_timestamp = 0;
24 #endif
25 } 26 }
26 27
27 NavigationController::LoadURLParams::~LoadURLParams() { 28 NavigationController::LoadURLParams::~LoadURLParams() {
28 } 29 }
29 30
30 NavigationController::LoadURLParams::LoadURLParams( 31 NavigationController::LoadURLParams::LoadURLParams(
31 const NavigationController::LoadURLParams& other) 32 const NavigationController::LoadURLParams& other)
32 : url(other.url), 33 : url(other.url),
33 load_type(other.load_type), 34 load_type(other.load_type),
34 transition_type(other.transition_type), 35 transition_type(other.transition_type),
35 frame_tree_node_id(other.frame_tree_node_id), 36 frame_tree_node_id(other.frame_tree_node_id),
36 referrer(other.referrer), 37 referrer(other.referrer),
37 extra_headers(other.extra_headers), 38 extra_headers(other.extra_headers),
38 is_renderer_initiated(other.is_renderer_initiated), 39 is_renderer_initiated(other.is_renderer_initiated),
39 override_user_agent(other.override_user_agent), 40 override_user_agent(other.override_user_agent),
40 transferred_global_request_id(other.transferred_global_request_id), 41 transferred_global_request_id(other.transferred_global_request_id),
41 base_url_for_data_url(other.base_url_for_data_url), 42 base_url_for_data_url(other.base_url_for_data_url),
42 virtual_url_for_data_url(other.virtual_url_for_data_url), 43 virtual_url_for_data_url(other.virtual_url_for_data_url),
43 browser_initiated_post_data(other.browser_initiated_post_data), 44 browser_initiated_post_data(other.browser_initiated_post_data),
44 should_replace_current_entry(false), 45 should_replace_current_entry(false),
46 #if defined(OS_ANDROID)
47 intent_received_timestamp(other.intent_received_timestamp),
48 has_user_gesture(other.has_user_gesture),
49 #endif
45 should_clear_history_list(false) { 50 should_clear_history_list(false) {
46 #if defined(OS_ANDROID)
47 intent_received_timestamp = other.intent_received_timestamp;
48 #endif
49 } 51 }
50 52
51 NavigationController::LoadURLParams& 53 NavigationController::LoadURLParams&
52 NavigationController::LoadURLParams::operator=( 54 NavigationController::LoadURLParams::operator=(
53 const NavigationController::LoadURLParams& other) { 55 const NavigationController::LoadURLParams& other) {
54 url = other.url; 56 url = other.url;
55 load_type = other.load_type; 57 load_type = other.load_type;
56 transition_type = other.transition_type; 58 transition_type = other.transition_type;
57 frame_tree_node_id = other.frame_tree_node_id; 59 frame_tree_node_id = other.frame_tree_node_id;
58 referrer = other.referrer; 60 referrer = other.referrer;
59 redirect_chain = other.redirect_chain; 61 redirect_chain = other.redirect_chain;
60 extra_headers = other.extra_headers; 62 extra_headers = other.extra_headers;
61 is_renderer_initiated = other.is_renderer_initiated; 63 is_renderer_initiated = other.is_renderer_initiated;
62 override_user_agent = other.override_user_agent; 64 override_user_agent = other.override_user_agent;
63 transferred_global_request_id = other.transferred_global_request_id; 65 transferred_global_request_id = other.transferred_global_request_id;
64 base_url_for_data_url = other.base_url_for_data_url; 66 base_url_for_data_url = other.base_url_for_data_url;
65 virtual_url_for_data_url = other.virtual_url_for_data_url; 67 virtual_url_for_data_url = other.virtual_url_for_data_url;
66 browser_initiated_post_data = other.browser_initiated_post_data; 68 browser_initiated_post_data = other.browser_initiated_post_data;
67 should_replace_current_entry = other.should_replace_current_entry; 69 should_replace_current_entry = other.should_replace_current_entry;
68 should_clear_history_list = other.should_clear_history_list; 70 should_clear_history_list = other.should_clear_history_list;
69 #if defined(OS_ANDROID) 71 #if defined(OS_ANDROID)
70 intent_received_timestamp = other.intent_received_timestamp; 72 intent_received_timestamp = other.intent_received_timestamp;
73 has_user_gesture = other.has_user_gesture;
71 #endif 74 #endif
72 75
73 return *this; 76 return *this;
74 } 77 }
75 78
76 } // namespace content 79 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/navigation_controller.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698