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

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

Issue 2717613006: Moved ios popup opening code from Tab to BlockedPopupTabHelper. (Closed)
Patch Set: Rebased 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
« no previous file with comments | « ios/web/web_state/blocked_popup_info.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "ios/web/web_state/blocked_popup_info.h" 5 #import "ios/web/web_state/blocked_popup_info.h"
6 6
7 #if !defined(__has_feature) || !__has_feature(objc_arc) 7 #if !defined(__has_feature) || !__has_feature(objc_arc)
8 #error "This file requires ARC support." 8 #error "This file requires ARC support."
9 #endif 9 #endif
10 10
11 namespace web { 11 namespace web {
12 12
13 BlockedPopupInfo::BlockedPopupInfo(const GURL& url, 13 BlockedPopupInfo::BlockedPopupInfo(const GURL& url, const Referrer& referrer)
14 const Referrer& referrer, 14 : url_(url), referrer_(referrer) {}
15 NSString* window_name,
16 ProceduralBlock show_popup_handler)
17 : url_(url),
18 referrer_(referrer),
19 window_name_([window_name copy]),
20 show_popup_handler_([show_popup_handler copy]) {
21 }
22 15
23 BlockedPopupInfo::BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info) 16 BlockedPopupInfo::BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info)
24 : url_(blocked_popup_info.url_), 17 : url_(blocked_popup_info.url_), referrer_(blocked_popup_info.referrer_) {}
25 referrer_(blocked_popup_info.referrer_),
26 window_name_([blocked_popup_info.window_name_ copy]),
27 show_popup_handler_([blocked_popup_info.show_popup_handler_ copy]) {
28 }
29 18
30 BlockedPopupInfo::~BlockedPopupInfo() {} 19 BlockedPopupInfo::~BlockedPopupInfo() {}
31 20
32 void BlockedPopupInfo::ShowPopup() const {
33 show_popup_handler_();
34 }
35
36 void BlockedPopupInfo::operator=(const BlockedPopupInfo& blocked_popup_info) { 21 void BlockedPopupInfo::operator=(const BlockedPopupInfo& blocked_popup_info) {
37 url_ = blocked_popup_info.url_; 22 url_ = blocked_popup_info.url_;
38 referrer_ = blocked_popup_info.referrer_; 23 referrer_ = blocked_popup_info.referrer_;
39 window_name_.reset([blocked_popup_info.window_name_ copy]);
40 show_popup_handler_ = [blocked_popup_info.show_popup_handler_ copy];
41 } 24 }
42 25
43 } // namespace web 26 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/blocked_popup_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698