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

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

Issue 2451743002: [ObjC ARC] Converts the rest of ios/web to ARC. (Closed)
Patch Set: rebase Created 4 years, 1 month 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/web_state_impl.mm ('k') | ios/web/web_state/web_state_observer_bridge.mm » ('j') | 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/public/web_state/web_state_observer.h" 5 #include "ios/web/public/web_state/web_state_observer.h"
6 6
7 #include "ios/web/public/load_committed_details.h" 7 #include "ios/web/public/load_committed_details.h"
8 #include "ios/web/public/web_state/web_state.h" 8 #include "ios/web/public/web_state/web_state.h"
9 9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
10 namespace web { 14 namespace web {
11 15
12 int WebStateObserver::kInvalidFormKeyCode = -1; 16 int WebStateObserver::kInvalidFormKeyCode = -1;
13 17
14 WebStateObserver::WebStateObserver(WebState* web_state) : web_state_(nullptr) { 18 WebStateObserver::WebStateObserver(WebState* web_state) : web_state_(nullptr) {
15 Observe(web_state); 19 Observe(web_state);
16 } 20 }
17 21
18 WebStateObserver::WebStateObserver() : web_state_(nullptr) {} 22 WebStateObserver::WebStateObserver() : web_state_(nullptr) {}
19 23
(...skipping 13 matching lines...) Expand all
33 if (web_state_) 37 if (web_state_)
34 web_state_->AddObserver(this); 38 web_state_->AddObserver(this);
35 } 39 }
36 40
37 void WebStateObserver::ResetWebState() { 41 void WebStateObserver::ResetWebState() {
38 web_state_->RemoveObserver(this); 42 web_state_->RemoveObserver(this);
39 web_state_ = nullptr; 43 web_state_ = nullptr;
40 } 44 }
41 45
42 } // namespace web 46 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | ios/web/web_state/web_state_observer_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698