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

Unified Diff: ios/web_view/shell/shell_view_controller.m

Issue 2659393004: Convert ios_web_view_shell to pure Objective-C. (Closed)
Patch Set: Move const and format. 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/web_view/shell/shell_exe_main.mm ('k') | ios/web_view/shell/shell_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/shell/shell_view_controller.m
diff --git a/ios/web_view/shell/shell_view_controller.mm b/ios/web_view/shell/shell_view_controller.m
similarity index 95%
rename from ios/web_view/shell/shell_view_controller.mm
rename to ios/web_view/shell/shell_view_controller.m
index ed95efaa9b332fa023891b7f42627f415fc12d8a..274a624514c458be2bb80842c814c188e526f55a 100644
--- a/ios/web_view/shell/shell_view_controller.mm
+++ b/ios/web_view/shell/shell_view_controller.m
@@ -12,21 +12,17 @@
#error "This file requires ARC support."
#endif
-namespace {
-const CGFloat kButtonSize = 44;
-}
-
@interface ShellViewController ()
// Container for |webView|.
-@property (nonatomic, strong) UIView* containerView;
+@property(nonatomic, strong) UIView* containerView;
// Text field used for navigating to URLs.
-@property (nonatomic, strong) UITextField* field;
+@property(nonatomic, strong) UITextField* field;
// Toolbar containing navigation buttons and |field|.
-@property (nonatomic, strong) UIToolbar* toolbar;
+@property(nonatomic, strong) UIToolbar* toolbar;
// CRIWV view which renders the web page.
-@property (nonatomic, strong) id<CRIWVWebView> webView;
+@property(nonatomic, strong) id<CRIWVWebView> webView;
// Handles the translation of the content displayed in |webView|.
-@property (nonatomic, strong) TranslateController* translateController;
+@property(nonatomic, strong) TranslateController* translateController;
- (void)back;
- (void)forward;
@@ -66,8 +62,10 @@ const CGFloat kButtonSize = 44;
UIViewAutoresizingFlexibleHeight];
[self.view addSubview:_containerView];
- // Text field.
const int kButtonCount = 3;
+ const CGFloat kButtonSize = 44;
+
+ // Text field.
self.field = [[UITextField alloc]
initWithFrame:CGRectMake(kButtonCount * kButtonSize, 6,
CGRectGetWidth([_toolbar frame]) -
« no previous file with comments | « ios/web_view/shell/shell_exe_main.mm ('k') | ios/web_view/shell/shell_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698