OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/ui/browser_navigator_params.h" | 5 #include "chrome/browser/ui/browser_navigator_params.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "content/public/browser/navigation_controller.h" | 9 #include "content/public/browser/navigation_controller.h" |
10 #include "content/public/browser/page_navigator.h" | 10 #include "content/public/browser/page_navigator.h" |
11 | 11 |
12 #if !defined(OS_ANDROID) | 12 #if !defined(OS_ANDROID) |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #endif | 14 #endif |
15 | 15 |
16 using content::GlobalRequestID; | 16 using content::GlobalRequestID; |
17 using content::NavigationController; | 17 using content::NavigationController; |
18 using content::WebContents; | 18 using content::WebContents; |
19 | 19 |
20 namespace chrome { | 20 namespace chrome { |
21 | 21 |
22 #if defined(OS_ANDROID) | 22 #if defined(OS_ANDROID) |
23 NavigateParams::NavigateParams(WebContents* a_target_contents) | 23 NavigateParams::NavigateParams(WebContents* a_target_contents) |
24 : frame_tree_node_id(-1), | 24 : frame_tree_node_id(-1), |
25 uses_post(false), | 25 uses_post(false), |
26 target_contents(a_target_contents), | 26 target_contents(a_target_contents), |
27 source_contents(nullptr), | 27 source_contents(nullptr), |
28 disposition(WindowOpenDisposition::CURRENT_TAB), | 28 disposition(WindowOpenDisposition::CURRENT_TAB), |
| 29 use_new_renderer_for_new_contents(false), |
29 trusted_source(false), | 30 trusted_source(false), |
30 transition(ui::PAGE_TRANSITION_LINK), | 31 transition(ui::PAGE_TRANSITION_LINK), |
31 is_renderer_initiated(false), | 32 is_renderer_initiated(false), |
32 tabstrip_index(-1), | 33 tabstrip_index(-1), |
33 tabstrip_add_types(TabStripModel::ADD_ACTIVE), | 34 tabstrip_add_types(TabStripModel::ADD_ACTIVE), |
34 window_action(NO_ACTION), | 35 window_action(NO_ACTION), |
35 user_gesture(true), | 36 user_gesture(true), |
36 path_behavior(RESPECT), | 37 path_behavior(RESPECT), |
37 ref_behavior(IGNORE_REF), | 38 ref_behavior(IGNORE_REF), |
38 initiating_profile(nullptr), | 39 initiating_profile(nullptr), |
39 should_replace_current_entry(false), | 40 should_replace_current_entry(false), |
40 created_with_opener(false), | 41 created_with_opener(false), |
41 started_from_context_menu(false) {} | 42 started_from_context_menu(false) {} |
42 #else | 43 #else |
43 NavigateParams::NavigateParams(Browser* a_browser, | 44 NavigateParams::NavigateParams(Browser* a_browser, |
44 const GURL& a_url, | 45 const GURL& a_url, |
45 ui::PageTransition a_transition) | 46 ui::PageTransition a_transition) |
46 : url(a_url), | 47 : url(a_url), |
47 frame_tree_node_id(-1), | 48 frame_tree_node_id(-1), |
48 uses_post(false), | 49 uses_post(false), |
49 target_contents(NULL), | 50 target_contents(NULL), |
50 source_contents(NULL), | 51 source_contents(NULL), |
51 disposition(WindowOpenDisposition::CURRENT_TAB), | 52 disposition(WindowOpenDisposition::CURRENT_TAB), |
| 53 use_new_renderer_for_new_contents(false), |
52 trusted_source(false), | 54 trusted_source(false), |
53 transition(a_transition), | 55 transition(a_transition), |
54 is_renderer_initiated(false), | 56 is_renderer_initiated(false), |
55 tabstrip_index(-1), | 57 tabstrip_index(-1), |
56 tabstrip_add_types(TabStripModel::ADD_ACTIVE), | 58 tabstrip_add_types(TabStripModel::ADD_ACTIVE), |
57 window_action(NO_ACTION), | 59 window_action(NO_ACTION), |
58 user_gesture(true), | 60 user_gesture(true), |
59 path_behavior(RESPECT), | 61 path_behavior(RESPECT), |
60 ref_behavior(IGNORE_REF), | 62 ref_behavior(IGNORE_REF), |
61 browser(a_browser), | 63 browser(a_browser), |
62 initiating_profile(NULL), | 64 initiating_profile(NULL), |
63 should_replace_current_entry(false), | 65 should_replace_current_entry(false), |
64 created_with_opener(false), | 66 created_with_opener(false), |
65 started_from_context_menu(false) {} | 67 started_from_context_menu(false) {} |
66 | 68 |
67 NavigateParams::NavigateParams(Browser* a_browser, | 69 NavigateParams::NavigateParams(Browser* a_browser, |
68 WebContents* a_target_contents) | 70 WebContents* a_target_contents) |
69 : frame_tree_node_id(-1), | 71 : frame_tree_node_id(-1), |
70 uses_post(false), | 72 uses_post(false), |
71 target_contents(a_target_contents), | 73 target_contents(a_target_contents), |
72 source_contents(NULL), | 74 source_contents(NULL), |
73 disposition(WindowOpenDisposition::CURRENT_TAB), | 75 disposition(WindowOpenDisposition::CURRENT_TAB), |
| 76 use_new_renderer_for_new_contents(false), |
74 trusted_source(false), | 77 trusted_source(false), |
75 transition(ui::PAGE_TRANSITION_LINK), | 78 transition(ui::PAGE_TRANSITION_LINK), |
76 is_renderer_initiated(false), | 79 is_renderer_initiated(false), |
77 tabstrip_index(-1), | 80 tabstrip_index(-1), |
78 tabstrip_add_types(TabStripModel::ADD_ACTIVE), | 81 tabstrip_add_types(TabStripModel::ADD_ACTIVE), |
79 window_action(NO_ACTION), | 82 window_action(NO_ACTION), |
80 user_gesture(true), | 83 user_gesture(true), |
81 path_behavior(RESPECT), | 84 path_behavior(RESPECT), |
82 ref_behavior(IGNORE_REF), | 85 ref_behavior(IGNORE_REF), |
83 browser(a_browser), | 86 browser(a_browser), |
84 initiating_profile(NULL), | 87 initiating_profile(NULL), |
85 should_replace_current_entry(false), | 88 should_replace_current_entry(false), |
86 created_with_opener(false), | 89 created_with_opener(false), |
87 started_from_context_menu(false) {} | 90 started_from_context_menu(false) {} |
88 #endif // !defined(OS_ANDROID) | 91 #endif // !defined(OS_ANDROID) |
89 | 92 |
90 NavigateParams::NavigateParams(Profile* a_profile, | 93 NavigateParams::NavigateParams(Profile* a_profile, |
91 const GURL& a_url, | 94 const GURL& a_url, |
92 ui::PageTransition a_transition) | 95 ui::PageTransition a_transition) |
93 : url(a_url), | 96 : url(a_url), |
94 frame_tree_node_id(-1), | 97 frame_tree_node_id(-1), |
95 uses_post(false), | 98 uses_post(false), |
96 target_contents(NULL), | 99 target_contents(NULL), |
97 source_contents(NULL), | 100 source_contents(NULL), |
98 disposition(WindowOpenDisposition::NEW_FOREGROUND_TAB), | 101 disposition(WindowOpenDisposition::NEW_FOREGROUND_TAB), |
| 102 use_new_renderer_for_new_contents(false), |
99 trusted_source(false), | 103 trusted_source(false), |
100 transition(a_transition), | 104 transition(a_transition), |
101 is_renderer_initiated(false), | 105 is_renderer_initiated(false), |
102 tabstrip_index(-1), | 106 tabstrip_index(-1), |
103 tabstrip_add_types(TabStripModel::ADD_ACTIVE), | 107 tabstrip_add_types(TabStripModel::ADD_ACTIVE), |
104 window_action(SHOW_WINDOW), | 108 window_action(SHOW_WINDOW), |
105 user_gesture(true), | 109 user_gesture(true), |
106 path_behavior(RESPECT), | 110 path_behavior(RESPECT), |
107 ref_behavior(IGNORE_REF), | 111 ref_behavior(IGNORE_REF), |
108 #if !defined(OS_ANDROID) | 112 #if !defined(OS_ANDROID) |
(...skipping 22 matching lines...) Expand all Loading... |
131 nav_params->trusted_source = false; | 135 nav_params->trusted_source = false; |
132 nav_params->is_renderer_initiated = params.is_renderer_initiated; | 136 nav_params->is_renderer_initiated = params.is_renderer_initiated; |
133 nav_params->should_replace_current_entry = | 137 nav_params->should_replace_current_entry = |
134 params.should_replace_current_entry; | 138 params.should_replace_current_entry; |
135 nav_params->uses_post = params.uses_post; | 139 nav_params->uses_post = params.uses_post; |
136 nav_params->post_data = params.post_data; | 140 nav_params->post_data = params.post_data; |
137 nav_params->started_from_context_menu = params.started_from_context_menu; | 141 nav_params->started_from_context_menu = params.started_from_context_menu; |
138 } | 142 } |
139 | 143 |
140 } // namespace chrome | 144 } // namespace chrome |
OLD | NEW |