OLD | NEW |
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_OPENER_H_ | 5 #ifndef IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_OPENER_H_ |
6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_OPENER_H_ | 6 #define IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_OPENER_H_ |
7 | 7 |
8 namespace web { | 8 namespace web { |
9 class WebState; | 9 class WebState; |
10 } | 10 } |
11 | 11 |
12 // Represents the opener of a WebState. | 12 // Represents the opener of a WebState. |
13 struct WebStateOpener { | 13 struct WebStateOpener { |
14 // WebState responsible for the creation of the new WebState. May be null if | 14 // WebState responsible for the creation of the new WebState. May be null if |
15 // the WebState has no opener. | 15 // the WebState has no opener. |
16 web::WebState* opener; | 16 web::WebState* opener; |
17 | 17 |
18 // Recorded value of the |opener| last committed navigation index when the | 18 // Recorded value of the |opener| last committed navigation index when the |
19 // WebState was open. Value is undefined if |opener| is null. | 19 // WebState was open. Value is undefined if |opener| is null. |
20 int navigation_index; | 20 int navigation_index; |
21 | 21 |
22 // Creates WebStateOpener initialising the members from |opener| (the | 22 // Creates WebStateOpener initialising the members from |opener| (the |
23 // |navigation_index| will be initialised from |opener|'s navigation | 23 // |navigation_index| will be initialised from |opener|'s navigation |
24 // manager if |opener| is not null). | 24 // manager if |opener| is not null). |
25 explicit WebStateOpener(web::WebState* opener); | 25 explicit WebStateOpener(web::WebState* opener); |
26 | 26 |
27 // Creates WebStateOpener initialising the members from the parameters. | 27 // Creates WebStateOpener initialising the members from the parameters. |
28 WebStateOpener(web::WebState* opener, int navigation_index); | 28 WebStateOpener(web::WebState* opener, int navigation_index); |
29 | 29 |
30 // Forbids default construction. | 30 // Forbids default construction. |
31 WebStateOpener() = delete; | 31 WebStateOpener() = delete; |
32 }; | 32 }; |
33 | 33 |
34 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_OPENER_H_ | 34 #endif // IOS_CHROME_BROWSER_WEB_STATE_LIST_WEB_STATE_OPENER_H_ |
OLD | NEW |