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

Side by Side Diff: chrome/browser/ui/browser_navigator_params.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
OLDNEW
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(CURRENT_TAB), 28 disposition(WindowOpenDisposition::CURRENT_TAB),
29 trusted_source(false), 29 trusted_source(false),
30 transition(ui::PAGE_TRANSITION_LINK), 30 transition(ui::PAGE_TRANSITION_LINK),
31 is_renderer_initiated(false), 31 is_renderer_initiated(false),
32 tabstrip_index(-1), 32 tabstrip_index(-1),
33 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 33 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
34 window_action(NO_ACTION), 34 window_action(NO_ACTION),
35 user_gesture(true), 35 user_gesture(true),
36 path_behavior(RESPECT), 36 path_behavior(RESPECT),
37 ref_behavior(IGNORE_REF), 37 ref_behavior(IGNORE_REF),
38 initiating_profile(nullptr), 38 initiating_profile(nullptr),
39 should_replace_current_entry(false), 39 should_replace_current_entry(false),
40 created_with_opener(false) { 40 created_with_opener(false) {}
41 }
42 #else 41 #else
43 NavigateParams::NavigateParams(Browser* a_browser, 42 NavigateParams::NavigateParams(Browser* a_browser,
44 const GURL& a_url, 43 const GURL& a_url,
45 ui::PageTransition a_transition) 44 ui::PageTransition a_transition)
46 : url(a_url), 45 : url(a_url),
47 frame_tree_node_id(-1), 46 frame_tree_node_id(-1),
48 uses_post(false), 47 uses_post(false),
49 target_contents(NULL), 48 target_contents(NULL),
50 source_contents(NULL), 49 source_contents(NULL),
51 disposition(CURRENT_TAB), 50 disposition(WindowOpenDisposition::CURRENT_TAB),
52 trusted_source(false), 51 trusted_source(false),
53 transition(a_transition), 52 transition(a_transition),
54 is_renderer_initiated(false), 53 is_renderer_initiated(false),
55 tabstrip_index(-1), 54 tabstrip_index(-1),
56 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 55 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
57 window_action(NO_ACTION), 56 window_action(NO_ACTION),
58 user_gesture(true), 57 user_gesture(true),
59 path_behavior(RESPECT), 58 path_behavior(RESPECT),
60 ref_behavior(IGNORE_REF), 59 ref_behavior(IGNORE_REF),
61 browser(a_browser), 60 browser(a_browser),
62 initiating_profile(NULL), 61 initiating_profile(NULL),
63 should_replace_current_entry(false), 62 should_replace_current_entry(false),
64 created_with_opener(false) { 63 created_with_opener(false) {}
65 }
66 64
67 NavigateParams::NavigateParams(Browser* a_browser, 65 NavigateParams::NavigateParams(Browser* a_browser,
68 WebContents* a_target_contents) 66 WebContents* a_target_contents)
69 : frame_tree_node_id(-1), 67 : frame_tree_node_id(-1),
70 uses_post(false), 68 uses_post(false),
71 target_contents(a_target_contents), 69 target_contents(a_target_contents),
72 source_contents(NULL), 70 source_contents(NULL),
73 disposition(CURRENT_TAB), 71 disposition(WindowOpenDisposition::CURRENT_TAB),
74 trusted_source(false), 72 trusted_source(false),
75 transition(ui::PAGE_TRANSITION_LINK), 73 transition(ui::PAGE_TRANSITION_LINK),
76 is_renderer_initiated(false), 74 is_renderer_initiated(false),
77 tabstrip_index(-1), 75 tabstrip_index(-1),
78 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 76 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
79 window_action(NO_ACTION), 77 window_action(NO_ACTION),
80 user_gesture(true), 78 user_gesture(true),
81 path_behavior(RESPECT), 79 path_behavior(RESPECT),
82 ref_behavior(IGNORE_REF), 80 ref_behavior(IGNORE_REF),
83 browser(a_browser), 81 browser(a_browser),
84 initiating_profile(NULL), 82 initiating_profile(NULL),
85 should_replace_current_entry(false), 83 should_replace_current_entry(false),
86 created_with_opener(false) { 84 created_with_opener(false) {}
87 }
88 #endif // !defined(OS_ANDROID) 85 #endif // !defined(OS_ANDROID)
89 86
90 NavigateParams::NavigateParams(Profile* a_profile, 87 NavigateParams::NavigateParams(Profile* a_profile,
91 const GURL& a_url, 88 const GURL& a_url,
92 ui::PageTransition a_transition) 89 ui::PageTransition a_transition)
93 : url(a_url), 90 : url(a_url),
94 frame_tree_node_id(-1), 91 frame_tree_node_id(-1),
95 uses_post(false), 92 uses_post(false),
96 target_contents(NULL), 93 target_contents(NULL),
97 source_contents(NULL), 94 source_contents(NULL),
98 disposition(NEW_FOREGROUND_TAB), 95 disposition(WindowOpenDisposition::NEW_FOREGROUND_TAB),
99 trusted_source(false), 96 trusted_source(false),
100 transition(a_transition), 97 transition(a_transition),
101 is_renderer_initiated(false), 98 is_renderer_initiated(false),
102 tabstrip_index(-1), 99 tabstrip_index(-1),
103 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 100 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
104 window_action(SHOW_WINDOW), 101 window_action(SHOW_WINDOW),
105 user_gesture(true), 102 user_gesture(true),
106 path_behavior(RESPECT), 103 path_behavior(RESPECT),
107 ref_behavior(IGNORE_REF), 104 ref_behavior(IGNORE_REF),
108 #if !defined(OS_ANDROID) 105 #if !defined(OS_ANDROID)
(...skipping 18 matching lines...) Expand all
127 nav_params->disposition = params.disposition; 124 nav_params->disposition = params.disposition;
128 nav_params->trusted_source = false; 125 nav_params->trusted_source = false;
129 nav_params->is_renderer_initiated = params.is_renderer_initiated; 126 nav_params->is_renderer_initiated = params.is_renderer_initiated;
130 nav_params->should_replace_current_entry = 127 nav_params->should_replace_current_entry =
131 params.should_replace_current_entry; 128 params.should_replace_current_entry;
132 nav_params->uses_post = params.uses_post; 129 nav_params->uses_post = params.uses_post;
133 nav_params->post_data = params.post_data; 130 nav_params->post_data = params.post_data;
134 } 131 }
135 132
136 } // namespace chrome 133 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest_chromeos.cc ('k') | chrome/browser/ui/browser_tabrestore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698