OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEB_SHELL_VIEW_CONTROLLER_H_ | 5 #ifndef IOS_WEB_SHELL_VIEW_CONTROLLER_H_ |
6 #define IOS_WEB_SHELL_VIEW_CONTROLLER_H_ | 6 #define IOS_WEB_SHELL_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 namespace web { | 10 namespace web { |
11 class BrowserState; | 11 class BrowserState; |
| 12 class WebState; |
12 } | 13 } |
13 | 14 |
14 // Accessibility label for the back button. | 15 // Accessibility label for the back button. |
15 extern NSString* const kWebShellBackButtonAccessibilityLabel; | 16 extern NSString* const kWebShellBackButtonAccessibilityLabel; |
16 // Accessibility label for the forward button. | 17 // Accessibility label for the forward button. |
17 extern NSString* const kWebShellForwardButtonAccessibilityLabel; | 18 extern NSString* const kWebShellForwardButtonAccessibilityLabel; |
18 // Accessibility label for the URL address text field. | 19 // Accessibility label for the URL address text field. |
19 extern NSString* const kWebShellAddressFieldAccessibilityLabel; | 20 extern NSString* const kWebShellAddressFieldAccessibilityLabel; |
20 | 21 |
21 // Implements the main UI for ios_web_shell, including a toolbar and web view. | 22 // Implements the main UI for ios_web_shell, including a toolbar and web view. |
22 @interface ViewController : UIViewController | 23 @interface ViewController : UIViewController |
23 | 24 |
24 @property(nonatomic, retain) IBOutlet UIView* containerView; | 25 @property(nonatomic, retain) IBOutlet UIView* containerView; |
25 @property(nonatomic, retain) IBOutlet UIToolbar* toolbarView; | 26 @property(nonatomic, retain) IBOutlet UIToolbar* toolbarView; |
| 27 @property(nonatomic, assign, readonly) web::WebState* webState; |
26 | 28 |
27 // Initializes a new ViewController from |MainView.xib| using the given | 29 // Initializes a new ViewController from |MainView.xib| using the given |
28 // |browserState|. | 30 // |browserState|. |
29 - (instancetype)initWithBrowserState:(web::BrowserState*)browserState; | 31 - (instancetype)initWithBrowserState:(web::BrowserState*)browserState; |
30 | 32 |
31 @end | 33 @end |
32 | 34 |
33 #endif // IOS_WEB_SHELL_VIEW_CONTROLLER_H_ | 35 #endif // IOS_WEB_SHELL_VIEW_CONTROLLER_H_ |
OLD | NEW |