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

Side by Side Diff: ios/web/web_state/blocked_popup_info.h

Issue 2717613006: Moved ios popup opening code from Tab to BlockedPopupTabHelper. (Closed)
Patch Set: Self review Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_ 5 #ifndef IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_
6 #define IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_ 6 #define IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_
7 7
8 #import <Foundation/Foundation.h>
9
10 #import "base/ios/block_types.h"
11 #import "base/mac/scoped_nsobject.h"
12 #include "ios/web/public/referrer.h" 8 #include "ios/web/public/referrer.h"
13 #include "url/gurl.h" 9 #include "url/gurl.h"
14 10
15 namespace web { 11 namespace web {
16 12
17 // Contain all information related to a blocked popup. 13 // Contain all information related to a blocked popup.
18 // TODO(eugenebut): rename to BlockedPopup as it's not an info object anymore. 14 // TODO(crbug.com/692117): Fold this class into BlockedPopupTabHelper.
Eugene But (OOO till 7-30) 2017/02/24 19:36:54 I will do this in a separate CL
19 class BlockedPopupInfo { 15 class BlockedPopupInfo {
20 public: 16 public:
21 BlockedPopupInfo(const GURL& url, 17 BlockedPopupInfo(const GURL& url, const Referrer& referrer);
22 const Referrer& referrer,
23 NSString* window_name,
24 ProceduralBlock show_popup_handler);
25 ~BlockedPopupInfo(); 18 ~BlockedPopupInfo();
26 19
27 // Returns the URL of the popup that was blocked. 20 // Returns the URL of the popup that was blocked.
28 const GURL& url() const { return url_; } 21 const GURL& url() const { return url_; }
29 // Returns the Referrer of the URL that was blocked. 22 // Returns the Referrer of the URL that was blocked.
30 const Referrer& referrer() const { return referrer_; } 23 const Referrer& referrer() const { return referrer_; }
31 // Returns the window name of the popup that was blocked.
32 NSString* window_name() const { return window_name_; }
33 // Allows the popup by opening the blocked popup window.
34 void ShowPopup() const;
35 24
36 BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info); 25 BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info);
37 void operator=(const BlockedPopupInfo& blocked_popup_info); 26 void operator=(const BlockedPopupInfo& blocked_popup_info);
38 private: 27 private:
39 GURL url_; 28 GURL url_;
40 Referrer referrer_; 29 Referrer referrer_;
41 base::scoped_nsobject<NSString> window_name_;
42 ProceduralBlock show_popup_handler_;
43 }; 30 };
44 31
45 } // namespace web 32 } // namespace web
46 33
47 #endif // IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_ 34 #endif // IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698