 Chromium Code Reviews
 Chromium Code Reviews Issue 2921753002:
  NOT YET READY: Making chrome.windows.create establish an actual "opener" relationship.
    
  
    Issue 2921753002:
  NOT YET READY: Making chrome.windows.create establish an actual "opener" relationship. 
  | 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 #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 
| 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" | 
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" | 
| 13 #include "content/public/browser/global_request_id.h" | 13 #include "content/public/browser/global_request_id.h" | 
| 14 #include "content/public/browser/site_instance.h" | 14 #include "content/public/browser/site_instance.h" | 
| 15 #include "content/public/common/referrer.h" | 15 #include "content/public/common/referrer.h" | 
| 16 #include "content/public/common/resource_request_body.h" | 16 #include "content/public/common/resource_request_body.h" | 
| 17 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" | 
| 18 #include "ui/base/window_open_disposition.h" | 18 #include "ui/base/window_open_disposition.h" | 
| 19 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" | 
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" | 
| 21 | 21 | 
| 22 class Browser; | 22 class Browser; | 
| 23 class Profile; | 23 class Profile; | 
| 24 | 24 | 
| 25 namespace content { | 25 namespace content { | 
| 26 class RenderFrameHost; | |
| 26 class WebContents; | 27 class WebContents; | 
| 27 struct OpenURLParams; | 28 struct OpenURLParams; | 
| 28 } | 29 } | 
| 29 | 30 | 
| 30 namespace chrome { | 31 namespace chrome { | 
| 31 | 32 | 
| 32 // Parameters that tell Navigate() what to do. | 33 // Parameters that tell Navigate() what to do. | 
| 33 // | 34 // | 
| 34 // Some basic examples: | 35 // Some basic examples: | 
| 35 // | 36 // | 
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 // CURRENT_TAB " " " NEW_FOREGROUND_TAB | 126 // CURRENT_TAB " " " NEW_FOREGROUND_TAB | 
| 126 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB | 127 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB | 
| 127 // | 128 // | 
| 128 // If disposition is NEW_BACKGROUND_TAB, TabStripModel::ADD_ACTIVE is | 129 // If disposition is NEW_BACKGROUND_TAB, TabStripModel::ADD_ACTIVE is | 
| 129 // removed from |tabstrip_add_types| automatically. | 130 // removed from |tabstrip_add_types| automatically. | 
| 130 // If disposition is one of NEW_WINDOW, NEW_POPUP, NEW_FOREGROUND_TAB or | 131 // If disposition is one of NEW_WINDOW, NEW_POPUP, NEW_FOREGROUND_TAB or | 
| 131 // SINGLETON_TAB, then TabStripModel::ADD_ACTIVE is automatically added to | 132 // SINGLETON_TAB, then TabStripModel::ADD_ACTIVE is automatically added to | 
| 132 // |tabstrip_add_types|. | 133 // |tabstrip_add_types|. | 
| 133 WindowOpenDisposition disposition; | 134 WindowOpenDisposition disposition; | 
| 134 | 135 | 
| 135 // Controls creation of new web contents (in case |disposition| asks for a new | 136 // Allows setting the opener for the case when new web contents are created | 
| 
Charlie Reis
2017/06/05 21:06:28
nit: WebContents
 
Łukasz Anforowicz
2017/06/05 22:06:54
Done.
 | |
| 136 // tab or window). If |force_new_process_for_new_contents| is true, then we | 137 // (i.e. in case |disposition| asks for a new tab or window). | 
| 137 // try to put the new contents in a new renderer, even if they are same-site | 138 content::RenderFrameHost* opener; | 
| 138 // as |source_site_instance| (this is subject to renderer process limits). | |
| 139 bool force_new_process_for_new_contents; | |
| 140 | 139 | 
| 141 // Sets browser->is_trusted_source. Default is false. | 140 // Sets browser->is_trusted_source. Default is false. | 
| 142 bool trusted_source; | 141 bool trusted_source; | 
| 143 | 142 | 
| 144 // The transition type of the navigation. Default is | 143 // The transition type of the navigation. Default is | 
| 145 // ui::PAGE_TRANSITION_LINK when target_contents is specified in the | 144 // ui::PAGE_TRANSITION_LINK when target_contents is specified in the | 
| 146 // constructor. | 145 // constructor. | 
| 147 ui::PageTransition transition; | 146 ui::PageTransition transition; | 
| 148 | 147 | 
| 149 // Whether this navigation was initiated by the renderer process. Default is | 148 // Whether this navigation was initiated by the renderer process. Default is | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 NavigateParams(); | 252 NavigateParams(); | 
| 254 }; | 253 }; | 
| 255 | 254 | 
| 256 // Copies fields from |params| struct to |nav_params| struct. | 255 // Copies fields from |params| struct to |nav_params| struct. | 
| 257 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, | 256 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, | 
| 258 const content::OpenURLParams& params); | 257 const content::OpenURLParams& params); | 
| 259 | 258 | 
| 260 } // namespace chrome | 259 } // namespace chrome | 
| 261 | 260 | 
| 262 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 261 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 
| OLD | NEW |