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

Unified Diff: ios/shared/chrome/browser/tabs/web_state_handle.h

Issue 2640093004: WebStateList is an array of web::WebState* wrappers. (Closed)
Patch Set: Fix leaks (caught by unit tests). Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/shared/chrome/browser/tabs/BUILD.gn ('k') | ios/shared/chrome/browser/tabs/web_state_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/shared/chrome/browser/tabs/web_state_handle.h
diff --git a/ios/shared/chrome/browser/tabs/web_state_handle.h b/ios/shared/chrome/browser/tabs/web_state_handle.h
new file mode 100644
index 0000000000000000000000000000000000000000..da765b9c94d9abe8d85a4b92e04f8830ccbdaece
--- /dev/null
+++ b/ios/shared/chrome/browser/tabs/web_state_handle.h
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_HANDLE_H_
+#define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_HANDLE_H_
+
+namespace web {
+class WebState;
+class WebStateImpl;
+}
+
+// Wraps a web::WebState instance in an Objective-C instance. Allows using
+// Objective-C collection to reference web::WebStates.
+@protocol WebStateHandle
+
+// Returns the wrapped web::WebState.
+@property(nonatomic, readonly) web::WebState* webState;
+
+// Returns the wrapped web::WebState as a web::WebStateImpl. Deprecated,
+// use webState instead if possible.
+@property(nonatomic, readonly) web::WebStateImpl* webStateImpl;
+
+@end
+
+#endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_HANDLE_H_
« no previous file with comments | « ios/shared/chrome/browser/tabs/BUILD.gn ('k') | ios/shared/chrome/browser/tabs/web_state_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698