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