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

Side by Side Diff: ios/shared/chrome/browser/tabs/web_state_list_delegate.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_DELEGATE_H_ 5 #ifndef IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_DELEGATE_H_
6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_DELEGATE_H_ 6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace web { 10 namespace web {
11 class WebState; 11 class WebState;
12 } 12 }
13 13
14 // A delegate interface that the WebStateList uses to perform work that it 14 // A delegate interface that the WebStateList uses to perform work that it
15 // cannot do itself such as attaching tab helpers, ... 15 // cannot do itself such as attaching tab helpers, ...
16 class WebStateListDelegate { 16 class WebStateListDelegate {
17 public: 17 public:
18 WebStateListDelegate() = default; 18 WebStateListDelegate() = default;
19 virtual ~WebStateListDelegate() = default; 19 virtual ~WebStateListDelegate() = default;
20 20
21 // Notifies the delegate that the specified WebState will be added to the 21 // Notifies the delegate that the specified WebState will be added to the
22 // WebStateList (via insertion/appending/replacing existing) and allows it 22 // WebStateList (via insertion/appending/replacing existing) and allows it
23 // to do any preparation that it deems necessary. 23 // to do any preparation that it deems necessary.
24 virtual void WillAddWebState(web::WebState* web_state) = 0; 24 virtual void WillAddWebState(web::WebState* web_state) = 0;
25 25
26 // Notifies the delegate that the specified WebState has been detached from
27 // the WebStateList (via detaching/closing/replacing existing) and allows it
28 // to do any clean up that it deems necessary.
29 virtual void WebStateDetached(web::WebState* web_state) = 0;
30
26 private: 31 private:
27 DISALLOW_COPY_AND_ASSIGN(WebStateListDelegate); 32 DISALLOW_COPY_AND_ASSIGN(WebStateListDelegate);
28 }; 33 };
29 34
30 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_DELEGATE_H_ 35 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_DELEGATE_H_
OLDNEW
« no previous file with comments | « ios/shared/chrome/browser/tabs/web_state_list.mm ('k') | ios/shared/chrome/browser/tabs/web_state_list_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698