OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_ | 5 #ifndef IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_ |
6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_ | 6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 - (void)webStateList:(WebStateList*)webStateList | 26 - (void)webStateList:(WebStateList*)webStateList |
27 didMoveWebState:(web::WebState*)webState | 27 didMoveWebState:(web::WebState*)webState |
28 fromIndex:(int)fromIndex | 28 fromIndex:(int)fromIndex |
29 toIndex:(int)toIndex; | 29 toIndex:(int)toIndex; |
30 | 30 |
31 // Invoked after the WebState at the specified index is replaced by another | 31 // Invoked after the WebState at the specified index is replaced by another |
32 // WebState. | 32 // WebState. |
33 - (void)webStateList:(WebStateList*)webStateList | 33 - (void)webStateList:(WebStateList*)webStateList |
34 didReplaceWebState:(web::WebState*)oldWebState | 34 didReplaceWebState:(web::WebState*)oldWebState |
35 withWebState:(web::WebState*)newWebState | 35 withWebState:(web::WebState*)newWebState |
36 atIndex:(int)index; | 36 atIndex:(int)atIndex; |
37 | |
38 // Invoked before the specified WebState is detached from the WebStateList. | |
39 // The WebState is still valid and still in the WebStateList. | |
40 - (void)webStateList:(WebStateList*)webStateList | |
41 willDetachWebState:(web::WebState*)webState | |
42 atIndex:(int)atIndex; | |
37 | 43 |
38 // Invoked after the WebState at the specified index has been detached. The | 44 // Invoked after the WebState at the specified index has been detached. The |
39 // WebState is still valid but is no longer in the WebStateList. | 45 // WebState is still valid but is no longer in the WebStateList. |
40 - (void)webStateList:(WebStateList*)webStateList | 46 - (void)webStateList:(WebStateList*)webStateList |
41 didDetachWebState:(web::WebState*)webState | 47 didDetachWebState:(web::WebState*)webState |
42 atIndex:(int)index; | 48 atIndex:(int)atIndex; |
49 | |
50 // Invoked before the specified WebState is destroyed via the WebStateList. | |
51 // The WebState is still valid but is no longer in the WebStateList. | |
52 - (void)webStateList:(WebStateList*)webStateList | |
53 willCloseWebState:(web::WebState*)webState | |
54 atIndex:(int)atIndex; | |
43 | 55 |
44 // Invoked after |newWebState| was activated at the specified index. Both | 56 // Invoked after |newWebState| was activated at the specified index. Both |
45 // WebState are either valid or null (if there was no selection or there is | 57 // WebState are either valid or null (if there was no selection or there is |
58 // no selection). If the change is due to an user action, |userAction| will | |
59 // be true. | |
60 - (void)webStateList:(WebStateList*)webStateList | |
rohitrao (ping after 24h)
2017/03/24 01:20:52
Inadvertent duplication?
sdefresne
2017/03/24 09:26:18
Cause by cherry-picking/rebasing, yes. Thank you.
| |
61 didChangeActiveWebState:(web::WebState*)newWebState | |
62 oldWebState:(web::WebState*)oldWebState | |
63 atIndex:(int)atIndex | |
64 userAction:(BOOL)userAction; | |
65 | |
66 // Invoked after |newWebState| was activated at the specified index. Both | |
67 // WebState are either valid or null (if there was no selection or there is | |
46 // no selection). If the change is due to an user action, |userAction| will | 68 // no selection). If the change is due to an user action, |userAction| will |
47 // be true. | 69 // be true. |
48 - (void)webStateList:(WebStateList*)webStateList | 70 - (void)webStateList:(WebStateList*)webStateList |
49 didChangeActiveWebState:(web::WebState*)newWebState | 71 didChangeActiveWebState:(web::WebState*)newWebState |
50 oldWebState:(web::WebState*)oldWebState | 72 oldWebState:(web::WebState*)oldWebState |
51 atIndex:(int)atIndex | 73 atIndex:(int)atIndex |
52 userAction:(BOOL)userAction; | 74 userAction:(BOOL)userAction; |
53 | 75 |
54 @end | 76 @end |
55 | 77 |
(...skipping 10 matching lines...) Expand all Loading... | |
66 web::WebState* web_state, | 88 web::WebState* web_state, |
67 int index) override; | 89 int index) override; |
68 void WebStateMoved(WebStateList* web_state_list, | 90 void WebStateMoved(WebStateList* web_state_list, |
69 web::WebState* web_state, | 91 web::WebState* web_state, |
70 int from_index, | 92 int from_index, |
71 int to_index) override; | 93 int to_index) override; |
72 void WebStateReplacedAt(WebStateList* web_state_list, | 94 void WebStateReplacedAt(WebStateList* web_state_list, |
73 web::WebState* old_web_state, | 95 web::WebState* old_web_state, |
74 web::WebState* new_web_state, | 96 web::WebState* new_web_state, |
75 int index) override; | 97 int index) override; |
98 void WillDetachWebStateAt(WebStateList* web_state_list, | |
99 web::WebState* web_state, | |
100 int index) override; | |
76 void WebStateDetachedAt(WebStateList* web_state_list, | 101 void WebStateDetachedAt(WebStateList* web_state_list, |
77 web::WebState* web_state, | 102 web::WebState* web_state, |
78 int index) override; | 103 int index) override; |
104 void WillCloseWebStateAt(WebStateList* web_state_list, | |
105 web::WebState* web_state, | |
106 int index) override; | |
79 void WebStateActivatedAt(WebStateList* web_state_list, | 107 void WebStateActivatedAt(WebStateList* web_state_list, |
80 web::WebState* old_web_state, | 108 web::WebState* old_web_state, |
81 web::WebState* new_web_state, | 109 web::WebState* new_web_state, |
82 int active_index, | 110 int active_index, |
83 bool user_action) override; | 111 bool user_action) override; |
84 | 112 |
85 id<WebStateListObserving> observer_; | 113 id<WebStateListObserving> observer_; |
86 | 114 |
87 DISALLOW_COPY_AND_ASSIGN(WebStateListObserverBridge); | 115 DISALLOW_COPY_AND_ASSIGN(WebStateListObserverBridge); |
88 }; | 116 }; |
89 | 117 |
90 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_ | 118 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_ |
OLD | NEW |