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

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

Issue 2396553002: [ARC] Converts part of ios/web/ui to ARC.
Patch Set: co Created 4 years, 2 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/error_translation_util.mm ('k') | ios/web/web_state/js/credential_util.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/global_web_state_event_tracker.h" 5 #include "ios/web/web_state/global_web_state_event_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "ios/web/public/web_state/web_state_observer.h" 11 #include "ios/web/public/web_state/web_state_observer.h"
12 #include "ios/web/public/web_state/web_state_user_data.h" 12 #include "ios/web/public/web_state/web_state_user_data.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
14 namespace web { 18 namespace web {
15 19
16 class WebStateEventForwarder; 20 class WebStateEventForwarder;
17 DEFINE_WEB_STATE_USER_DATA_KEY(WebStateEventForwarder); 21 DEFINE_WEB_STATE_USER_DATA_KEY(WebStateEventForwarder);
18 22
19 // Helper class that forwards events from a single associated WebState instance 23 // Helper class that forwards events from a single associated WebState instance
20 // to the GlobalWebStateEventTracker singleton. 24 // to the GlobalWebStateEventTracker singleton.
21 class WebStateEventForwarder : public WebStateUserData<WebStateEventForwarder>, 25 class WebStateEventForwarder : public WebStateUserData<WebStateEventForwarder>,
22 public WebStateObserver { 26 public WebStateObserver {
23 public: 27 public:
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 FOR_EACH_OBSERVER(GlobalWebStateObserver, observer_list_, 144 FOR_EACH_OBSERVER(GlobalWebStateObserver, observer_list_,
141 PageLoaded(web_state, load_completion_status)); 145 PageLoaded(web_state, load_completion_status));
142 } 146 }
143 147
144 void GlobalWebStateEventTracker::WebStateDestroyed(WebState* web_state) { 148 void GlobalWebStateEventTracker::WebStateDestroyed(WebState* web_state) {
145 FOR_EACH_OBSERVER(GlobalWebStateObserver, observer_list_, 149 FOR_EACH_OBSERVER(GlobalWebStateObserver, observer_list_,
146 WebStateDestroyed(web_state)); 150 WebStateDestroyed(web_state));
147 } 151 }
148 152
149 } // namespace web 153 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/error_translation_util.mm ('k') | ios/web/web_state/js/credential_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698