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

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

Issue 2766413004: [ios] Change API to inform WebStateList of opener-opened relationship. (Closed)
Patch Set: Rebase on origin/master. 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 side-by-side diff with in-line comments
Download patch
Index: ios/shared/chrome/browser/tabs/web_state_opener.h
diff --git a/ios/shared/chrome/browser/tabs/web_state_opener.h b/ios/shared/chrome/browser/tabs/web_state_opener.h
new file mode 100644
index 0000000000000000000000000000000000000000..49f1e282fd2b5d58a42c1f0624192f4b1f6258d8
--- /dev/null
+++ b/ios/shared/chrome/browser/tabs/web_state_opener.h
@@ -0,0 +1,25 @@
+// 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_OPENER_H_
+#define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_OPENER_H_
+
+namespace web {
+class WebState;
+}
+
+// Represents the opener of a WebState.
+struct WebStateOpener {
+ web::WebState* opener;
marq (ping after 24h) 2017/03/24 09:35:27 Comment on every field.
sdefresne 2017/03/24 10:08:10 Done.
+ int navigation_index;
+
+ // Creates WebStateOpener initialising the members from the parameters. If
+ // |navigation_index| is negative, it will be initialised from |opener|.
marq (ping after 24h) 2017/03/24 09:35:26 I dislike magic behavior for some values of intege
sdefresne 2017/03/24 10:08:10 Done.
+ explicit WebStateOpener(web::WebState* opener, int navigation_index = -1);
+
+ // Forbids default construction.
+ WebStateOpener() = delete;
+};
+
+#endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_OPENER_H_
« no previous file with comments | « ios/shared/chrome/browser/tabs/web_state_list_unittest.mm ('k') | ios/shared/chrome/browser/tabs/web_state_opener.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698