Index: ios/shared/chrome/browser/tabs/web_state_list.h |
diff --git a/ios/shared/chrome/browser/tabs/web_state_list.h b/ios/shared/chrome/browser/tabs/web_state_list.h |
index 3916076b3662eacfd423ba32515e8db9b5c1259b..09eb4683e9bdc829946144002d43888c3cc593ae 100644 |
--- a/ios/shared/chrome/browser/tabs/web_state_list.h |
+++ b/ios/shared/chrome/browser/tabs/web_state_list.h |
@@ -8,6 +8,7 @@ |
#include <memory> |
#include <vector> |
+#include "base/compiler_specific.h" |
#include "base/macros.h" |
#include "base/observer_list.h" |
@@ -85,10 +86,11 @@ class WebStateList { |
// returned WebState). An optional opener for the new WebState may be passed. |
web::WebState* ReplaceWebStateAt(int index, |
web::WebState* web_state, |
- web::WebState* opener); |
+ web::WebState* opener) WARN_UNUSED_RESULT; |
- // Detaches the WebState at the specified index. |
- void DetachWebStateAt(int index); |
+ // Detaches the WebState at the specified index. Returns the detached WebState |
+ // to the caller (abandon ownership of the returned WebState). |
+ web::WebState* DetachWebStateAt(int index) WARN_UNUSED_RESULT; |
// Adds an observer to the model. |
void AddObserver(WebStateListObserver* observer); |