OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ | 5 #ifndef CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ |
6 #define CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ | 6 #define CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ |
7 | 7 |
8 #include "chrome/browser/ui/browser_navigator_params.h" | 8 #include "chrome/browser/ui/browser_navigator_params.h" |
9 #include "content/public/common/referrer.h" | 9 #include "content/public/common/referrer.h" |
10 #include "third_party/WebKit/public/web/window_features.mojom.h" | 10 #include "third_party/WebKit/public/web/window_features.mojom.h" |
11 #include "ui/base/window_open_disposition.h" | 11 #include "ui/base/window_open_disposition.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class WebContents; | 15 class WebContents; |
16 } // namespace content | 16 } // namespace content |
17 | 17 |
18 class BlockedWindowParams { | 18 class BlockedWindowParams { |
19 public: | 19 public: |
20 BlockedWindowParams(const GURL& target_url, | 20 BlockedWindowParams(const GURL& target_url, |
21 const content::Referrer& referrer, | 21 const content::Referrer& referrer, |
22 const std::string& frame_name_, | 22 const std::string& frame_name_, |
23 WindowOpenDisposition disposition, | 23 WindowOpenDisposition disposition, |
24 const blink::mojom::WindowFeatures& features, | 24 const blink::mojom::WindowFeatures& features, |
25 bool user_gesture, | 25 bool user_gesture, |
26 bool opener_suppressed, | 26 bool opener_suppressed); |
27 int render_process_id, | |
28 int opener_render_frame_id); | |
29 BlockedWindowParams(const BlockedWindowParams& other); | 27 BlockedWindowParams(const BlockedWindowParams& other); |
30 ~BlockedWindowParams(); | 28 ~BlockedWindowParams(); |
31 | 29 |
32 chrome::NavigateParams CreateNavigateParams( | 30 chrome::NavigateParams CreateNavigateParams( |
33 content::WebContents* web_contents) const; | 31 content::WebContents* web_contents) const; |
34 | 32 |
35 blink::mojom::WindowFeatures features() const { return features_; } | 33 blink::mojom::WindowFeatures features() const { return features_; } |
36 | 34 |
37 int opener_render_frame_id() const { | |
38 return opener_render_frame_id_; | |
39 } | |
40 | |
41 int render_process_id() const { | |
42 return render_process_id_; | |
43 } | |
44 | |
45 const GURL& target_url() const { | |
46 return target_url_; | |
47 } | |
48 | |
49 private: | 35 private: |
50 GURL target_url_; | 36 GURL target_url_; |
51 content::Referrer referrer_; | 37 content::Referrer referrer_; |
52 std::string frame_name_; | 38 std::string frame_name_; |
53 WindowOpenDisposition disposition_; | 39 WindowOpenDisposition disposition_; |
54 blink::mojom::WindowFeatures features_; | 40 blink::mojom::WindowFeatures features_; |
55 bool user_gesture_; | 41 bool user_gesture_; |
56 bool opener_suppressed_; | 42 bool opener_suppressed_; |
57 int render_process_id_; | |
58 int opener_render_frame_id_; | |
59 }; | 43 }; |
60 | 44 |
61 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ | 45 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_WINDOW_PARAMS_H_ |
OLD | NEW |