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

Side by Side Diff: ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h

Issue 2768093003: [ios] Extend WebStateListObserver amd WebStateListDelegate APIs. (Closed)
Patch Set: Remove duplicated method. Created 3 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
OLDNEW
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
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
46 // no selection). If the change is due to an user action, |userAction| will 58 // no selection). If the change is due to an user action, |userAction| will
47 // be true. 59 // be true.
48 - (void)webStateList:(WebStateList*)webStateList 60 - (void)webStateList:(WebStateList*)webStateList
49 didChangeActiveWebState:(web::WebState*)newWebState 61 didChangeActiveWebState:(web::WebState*)newWebState
50 oldWebState:(web::WebState*)oldWebState 62 oldWebState:(web::WebState*)oldWebState
51 atIndex:(int)atIndex 63 atIndex:(int)atIndex
52 userAction:(BOOL)userAction; 64 userAction:(BOOL)userAction;
(...skipping 13 matching lines...) Expand all
66 web::WebState* web_state, 78 web::WebState* web_state,
67 int index) override; 79 int index) override;
68 void WebStateMoved(WebStateList* web_state_list, 80 void WebStateMoved(WebStateList* web_state_list,
69 web::WebState* web_state, 81 web::WebState* web_state,
70 int from_index, 82 int from_index,
71 int to_index) override; 83 int to_index) override;
72 void WebStateReplacedAt(WebStateList* web_state_list, 84 void WebStateReplacedAt(WebStateList* web_state_list,
73 web::WebState* old_web_state, 85 web::WebState* old_web_state,
74 web::WebState* new_web_state, 86 web::WebState* new_web_state,
75 int index) override; 87 int index) override;
88 void WillDetachWebStateAt(WebStateList* web_state_list,
89 web::WebState* web_state,
90 int index) override;
76 void WebStateDetachedAt(WebStateList* web_state_list, 91 void WebStateDetachedAt(WebStateList* web_state_list,
77 web::WebState* web_state, 92 web::WebState* web_state,
78 int index) override; 93 int index) override;
94 void WillCloseWebStateAt(WebStateList* web_state_list,
95 web::WebState* web_state,
96 int index) override;
79 void WebStateActivatedAt(WebStateList* web_state_list, 97 void WebStateActivatedAt(WebStateList* web_state_list,
80 web::WebState* old_web_state, 98 web::WebState* old_web_state,
81 web::WebState* new_web_state, 99 web::WebState* new_web_state,
82 int active_index, 100 int active_index,
83 bool user_action) override; 101 bool user_action) override;
84 102
85 id<WebStateListObserving> observer_; 103 id<WebStateListObserving> observer_;
86 104
87 DISALLOW_COPY_AND_ASSIGN(WebStateListObserverBridge); 105 DISALLOW_COPY_AND_ASSIGN(WebStateListObserverBridge);
88 }; 106 };
89 107
90 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_ 108 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_OBSERVER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698