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

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

Issue 1136753004: Use WeakNSProtocol/WeakNSObject for WebControllerObserverBridge ivars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | 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 #ifndef IOS_WEB_WEB_STATE_WEB_CONTROLLER_OBSERVER_BRIDGE_H_ 5 #ifndef IOS_WEB_WEB_STATE_WEB_CONTROLLER_OBSERVER_BRIDGE_H_
6 #define IOS_WEB_WEB_STATE_WEB_CONTROLLER_OBSERVER_BRIDGE_H_ 6 #define IOS_WEB_WEB_STATE_WEB_CONTROLLER_OBSERVER_BRIDGE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #import "base/ios/weak_nsobject.h"
10 #include "ios/web/public/web_state/web_state_observer.h" 11 #include "ios/web/public/web_state/web_state_observer.h"
11 12
12 @class CRWWebController; 13 @class CRWWebController;
13 @protocol CRWWebControllerObserver; 14 @protocol CRWWebControllerObserver;
14 class GURL; 15 class GURL;
15 16
16 namespace base { 17 namespace base {
17 class DictionaryValue; 18 class DictionaryValue;
18 } 19 }
19 20
(...skipping 25 matching lines...) Expand all
45 46
46 private: 47 private:
47 // WebStateObserver implementation. 48 // WebStateObserver implementation.
48 void PageLoaded(PageLoadCompletionStatus load_completion_status) override; 49 void PageLoaded(PageLoadCompletionStatus load_completion_status) override;
49 50
50 // Callback for script commands. 51 // Callback for script commands.
51 bool ScriptCommandReceived(const base::DictionaryValue& value, 52 bool ScriptCommandReceived(const base::DictionaryValue& value,
52 const GURL& url, 53 const GURL& url,
53 bool user_is_interacting); 54 bool user_is_interacting);
54 55
55 id<CRWWebControllerObserver> web_controller_observer_; // Weak. 56 base::WeakNSProtocol<id<CRWWebControllerObserver>> web_controller_observer_;
56 CRWWebController* web_controller_; // Weak. 57 base::WeakNSObject<CRWWebController> web_controller_;
57 std::string script_command_callback_prefix_; 58 std::string script_command_callback_prefix_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(WebControllerObserverBridge); 60 DISALLOW_COPY_AND_ASSIGN(WebControllerObserverBridge);
60 }; 61 };
61 62
62 } // namespace web 63 } // namespace web
63 64
64 #endif // IOS_WEB_WEB_STATE_WEB_CONTROLLER_OBSERVER_BRIDGE_H_ 65 #endif // IOS_WEB_WEB_STATE_WEB_CONTROLLER_OBSERVER_BRIDGE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698