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

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

Issue 2921753002: NOT YET READY: Making chrome.windows.create establish an actual "opener" relationship.
Patch Set: Adding setSelfAsOpener parameter. Created 3 years, 6 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 | « chrome/browser/ui/browser_navigator_params.h ('k') | chrome/common/extensions/api/windows.json » ('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 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 force_new_process_for_new_contents(false), 29 opener(nullptr),
30 trusted_source(false), 30 trusted_source(false),
31 transition(ui::PAGE_TRANSITION_LINK), 31 transition(ui::PAGE_TRANSITION_LINK),
32 is_renderer_initiated(false), 32 is_renderer_initiated(false),
33 tabstrip_index(-1), 33 tabstrip_index(-1),
34 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 34 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
35 window_action(NO_ACTION), 35 window_action(NO_ACTION),
36 user_gesture(true), 36 user_gesture(true),
37 path_behavior(RESPECT), 37 path_behavior(RESPECT),
38 ref_behavior(IGNORE_REF), 38 ref_behavior(IGNORE_REF),
39 initiating_profile(nullptr), 39 initiating_profile(nullptr),
40 should_replace_current_entry(false), 40 should_replace_current_entry(false),
41 created_with_opener(false), 41 created_with_opener(false),
42 started_from_context_menu(false) {} 42 started_from_context_menu(false) {}
43 #else 43 #else
44 NavigateParams::NavigateParams(Browser* a_browser, 44 NavigateParams::NavigateParams(Browser* a_browser,
45 const GURL& a_url, 45 const GURL& a_url,
46 ui::PageTransition a_transition) 46 ui::PageTransition a_transition)
47 : url(a_url), 47 : url(a_url),
48 frame_tree_node_id(-1), 48 frame_tree_node_id(-1),
49 uses_post(false), 49 uses_post(false),
50 target_contents(NULL), 50 target_contents(NULL),
51 source_contents(NULL), 51 source_contents(NULL),
52 disposition(WindowOpenDisposition::CURRENT_TAB), 52 disposition(WindowOpenDisposition::CURRENT_TAB),
53 force_new_process_for_new_contents(false), 53 opener(nullptr),
54 trusted_source(false), 54 trusted_source(false),
55 transition(a_transition), 55 transition(a_transition),
56 is_renderer_initiated(false), 56 is_renderer_initiated(false),
57 tabstrip_index(-1), 57 tabstrip_index(-1),
58 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 58 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
59 window_action(NO_ACTION), 59 window_action(NO_ACTION),
60 user_gesture(true), 60 user_gesture(true),
61 path_behavior(RESPECT), 61 path_behavior(RESPECT),
62 ref_behavior(IGNORE_REF), 62 ref_behavior(IGNORE_REF),
63 browser(a_browser), 63 browser(a_browser),
64 initiating_profile(NULL), 64 initiating_profile(NULL),
65 should_replace_current_entry(false), 65 should_replace_current_entry(false),
66 created_with_opener(false), 66 created_with_opener(false),
67 started_from_context_menu(false) {} 67 started_from_context_menu(false) {}
68 68
69 NavigateParams::NavigateParams(Browser* a_browser, 69 NavigateParams::NavigateParams(Browser* a_browser,
70 WebContents* a_target_contents) 70 WebContents* a_target_contents)
71 : frame_tree_node_id(-1), 71 : frame_tree_node_id(-1),
72 uses_post(false), 72 uses_post(false),
73 target_contents(a_target_contents), 73 target_contents(a_target_contents),
74 source_contents(NULL), 74 source_contents(NULL),
75 disposition(WindowOpenDisposition::CURRENT_TAB), 75 disposition(WindowOpenDisposition::CURRENT_TAB),
76 force_new_process_for_new_contents(false), 76 opener(nullptr),
77 trusted_source(false), 77 trusted_source(false),
78 transition(ui::PAGE_TRANSITION_LINK), 78 transition(ui::PAGE_TRANSITION_LINK),
79 is_renderer_initiated(false), 79 is_renderer_initiated(false),
80 tabstrip_index(-1), 80 tabstrip_index(-1),
81 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 81 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
82 window_action(NO_ACTION), 82 window_action(NO_ACTION),
83 user_gesture(true), 83 user_gesture(true),
84 path_behavior(RESPECT), 84 path_behavior(RESPECT),
85 ref_behavior(IGNORE_REF), 85 ref_behavior(IGNORE_REF),
86 browser(a_browser), 86 browser(a_browser),
87 initiating_profile(NULL), 87 initiating_profile(NULL),
88 should_replace_current_entry(false), 88 should_replace_current_entry(false),
89 created_with_opener(false), 89 created_with_opener(false),
90 started_from_context_menu(false) {} 90 started_from_context_menu(false) {}
91 #endif // !defined(OS_ANDROID) 91 #endif // !defined(OS_ANDROID)
92 92
93 NavigateParams::NavigateParams(Profile* a_profile, 93 NavigateParams::NavigateParams(Profile* a_profile,
94 const GURL& a_url, 94 const GURL& a_url,
95 ui::PageTransition a_transition) 95 ui::PageTransition a_transition)
96 : url(a_url), 96 : url(a_url),
97 frame_tree_node_id(-1), 97 frame_tree_node_id(-1),
98 uses_post(false), 98 uses_post(false),
99 target_contents(NULL), 99 target_contents(NULL),
100 source_contents(NULL), 100 source_contents(NULL),
101 disposition(WindowOpenDisposition::NEW_FOREGROUND_TAB), 101 disposition(WindowOpenDisposition::NEW_FOREGROUND_TAB),
102 force_new_process_for_new_contents(false), 102 opener(nullptr),
103 trusted_source(false), 103 trusted_source(false),
104 transition(a_transition), 104 transition(a_transition),
105 is_renderer_initiated(false), 105 is_renderer_initiated(false),
106 tabstrip_index(-1), 106 tabstrip_index(-1),
107 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 107 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
108 window_action(SHOW_WINDOW), 108 window_action(SHOW_WINDOW),
109 user_gesture(true), 109 user_gesture(true),
110 path_behavior(RESPECT), 110 path_behavior(RESPECT),
111 ref_behavior(IGNORE_REF), 111 ref_behavior(IGNORE_REF),
112 #if !defined(OS_ANDROID) 112 #if !defined(OS_ANDROID)
(...skipping 10 matching lines...) Expand all
123 NavigateParams::~NavigateParams() {} 123 NavigateParams::~NavigateParams() {}
124 124
125 void FillNavigateParamsFromOpenURLParams(NavigateParams* nav_params, 125 void FillNavigateParamsFromOpenURLParams(NavigateParams* nav_params,
126 const content::OpenURLParams& params) { 126 const content::OpenURLParams& params) {
127 nav_params->referrer = params.referrer; 127 nav_params->referrer = params.referrer;
128 nav_params->source_site_instance = params.source_site_instance; 128 nav_params->source_site_instance = params.source_site_instance;
129 nav_params->frame_tree_node_id = params.frame_tree_node_id; 129 nav_params->frame_tree_node_id = params.frame_tree_node_id;
130 nav_params->redirect_chain = params.redirect_chain; 130 nav_params->redirect_chain = params.redirect_chain;
131 nav_params->extra_headers = params.extra_headers; 131 nav_params->extra_headers = params.extra_headers;
132 nav_params->disposition = params.disposition; 132 nav_params->disposition = params.disposition;
133 nav_params->force_new_process_for_new_contents =
134 params.force_new_process_for_new_contents;
135 nav_params->trusted_source = false; 133 nav_params->trusted_source = false;
136 nav_params->is_renderer_initiated = params.is_renderer_initiated; 134 nav_params->is_renderer_initiated = params.is_renderer_initiated;
137 nav_params->should_replace_current_entry = 135 nav_params->should_replace_current_entry =
138 params.should_replace_current_entry; 136 params.should_replace_current_entry;
139 nav_params->uses_post = params.uses_post; 137 nav_params->uses_post = params.uses_post;
140 nav_params->post_data = params.post_data; 138 nav_params->post_data = params.post_data;
141 nav_params->started_from_context_menu = params.started_from_context_menu; 139 nav_params->started_from_context_menu = params.started_from_context_menu;
142 } 140 }
143 141
144 } // namespace chrome 142 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_params.h ('k') | chrome/common/extensions/api/windows.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698