1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ 6 #define CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ 7 8 #include "chrome/browser/ui/browser_navigator.h" 9 #include "content/public/common/referrer.h" 10 #include "third_party/WebKit/public/web/WebWindowFeatures.h" 11 #include "ui/base/window_open_disposition.h" 12 #include "url/gurl.h" 13 14 namespace content { 15 class WebContents; 16 } // namespace content 17 18 class BlockedWindowParams { 19 public: 20 BlockedWindowParams(const GURL& target_url, 21 const content::Referrer& referrer, 22 WindowOpenDisposition disposition, 23 const blink::WebWindowFeatures& features, 24 bool user_gesture, 25 bool opener_suppressed, 26 int render_process_id, 27 int opener_id); 28 29 chrome::NavigateParams CreateNavigateParams( 30 content::WebContents* web_contents) const; 31 32 blink::WebWindowFeatures features() const { 33 return features_; 34 } 35 36 int opener_id() const { 37 return opener_id_; 38 } 39 40 int render_process_id() const { 41 return render_process_id_; 42 } 43 44 const GURL& target_url() const { 45 return target_url_; 46 } 47 48 private: 49 GURL target_url_; 50 content::Referrer referrer_; 51 WindowOpenDisposition disposition_; 52 blink::WebWindowFeatures features_; 53 bool user_gesture_; 54 bool opener_suppressed_; 55 int render_process_id_; 56 int opener_id_; 57 }; 58 59 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ 60