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

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

Issue 1023013002: Minor cleanup in ios/web utils (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 5 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/navigation/nscoder_util.mm ('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 #include "ios/web/web_state/blocked_popup_info.h" 5 #include "ios/web/web_state/blocked_popup_info.h"
6 6
7 namespace web { 7 namespace web {
8 8
9 BlockedPopupInfo::BlockedPopupInfo(const GURL& url, 9 BlockedPopupInfo::BlockedPopupInfo(const GURL& url,
10 const Referrer& referrer, 10 const Referrer& referrer,
11 NSString* window_name, 11 NSString* window_name,
12 ProceduralBlock show_popup_handler) 12 ProceduralBlock show_popup_handler)
13 : url_(url), 13 : url_(url),
14 referrer_(referrer), 14 referrer_(referrer),
15 window_name_([window_name copy]), 15 window_name_([window_name copy]),
16 show_popup_handler_([show_popup_handler copy]){ 16 show_popup_handler_([show_popup_handler copy]) {
17 } 17 }
18 18
19 BlockedPopupInfo::BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info) 19 BlockedPopupInfo::BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info)
20 : url_(blocked_popup_info.url_), 20 : url_(blocked_popup_info.url_),
21 referrer_(blocked_popup_info.referrer_), 21 referrer_(blocked_popup_info.referrer_),
22 window_name_([blocked_popup_info.window_name_ copy]), 22 window_name_([blocked_popup_info.window_name_ copy]),
23 show_popup_handler_([blocked_popup_info.show_popup_handler_ copy]) { 23 show_popup_handler_([blocked_popup_info.show_popup_handler_ copy]) {
24 } 24 }
25 25
26 BlockedPopupInfo::~BlockedPopupInfo() {} 26 BlockedPopupInfo::~BlockedPopupInfo() {}
27 27
28 void BlockedPopupInfo::ShowPopup() const { 28 void BlockedPopupInfo::ShowPopup() const {
29 show_popup_handler_(); 29 show_popup_handler_();
30 } 30 }
31 31
32 void BlockedPopupInfo::operator=(const BlockedPopupInfo& blocked_popup_info) { 32 void BlockedPopupInfo::operator=(const BlockedPopupInfo& blocked_popup_info) {
33 url_ = blocked_popup_info.url_; 33 url_ = blocked_popup_info.url_;
34 referrer_ = blocked_popup_info.referrer_; 34 referrer_ = blocked_popup_info.referrer_;
35 window_name_.reset([blocked_popup_info.window_name_ copy]); 35 window_name_.reset([blocked_popup_info.window_name_ copy]);
36 show_popup_handler_ = [blocked_popup_info.show_popup_handler_ copy]; 36 show_popup_handler_ = [blocked_popup_info.show_popup_handler_ copy];
37 } 37 }
38 38
39 } // namespace web 39 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/nscoder_util.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698