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 #import "ios/web/shell/view_controller.h" | 5 #import "ios/web/shell/view_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 return self; | 57 return self; |
58 } | 58 } |
59 | 59 |
60 - (void)dealloc { | 60 - (void)dealloc { |
61 net::HTTPProtocolHandlerDelegate::SetInstance(nullptr); | 61 net::HTTPProtocolHandlerDelegate::SetInstance(nullptr); |
62 net::RequestTracker::SetRequestTrackerFactory(nullptr); | 62 net::RequestTracker::SetRequestTrackerFactory(nullptr); |
63 [super dealloc]; | 63 [super dealloc]; |
64 } | 64 } |
65 | 65 |
| 66 - (CRWWebController*)webController { |
| 67 return _webController; |
| 68 } |
| 69 |
66 - (void)viewDidLoad { | 70 - (void)viewDidLoad { |
67 [super viewDidLoad]; | 71 [super viewDidLoad]; |
68 | 72 |
69 // Set up the toolbar buttons. | 73 // Set up the toolbar buttons. |
70 UIButton* back = [UIButton buttonWithType:UIButtonTypeCustom]; | 74 UIButton* back = [UIButton buttonWithType:UIButtonTypeCustom]; |
71 [back setImage:[UIImage imageNamed:@"toolbar_back"] | 75 [back setImage:[UIImage imageNamed:@"toolbar_back"] |
72 forState:UIControlStateNormal]; | 76 forState:UIControlStateNormal]; |
73 [back setFrame:CGRectMake(0, 0, 44, 44)]; | 77 [back setFrame:CGRectMake(0, 0, 44, 44)]; |
74 [back setImageEdgeInsets:UIEdgeInsetsMake(5, 5, 4, 4)]; | 78 [back setImageEdgeInsets:UIEdgeInsetsMake(5, 5, 4, 4)]; |
75 [back setAutoresizingMask:UIViewAutoresizingFlexibleRightMargin]; | 79 [back setAutoresizingMask:UIViewAutoresizingFlexibleRightMargin]; |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 - (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry { | 352 - (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry { |
349 } | 353 } |
350 - (int)downloadImageAtUrl:(const GURL&)url | 354 - (int)downloadImageAtUrl:(const GURL&)url |
351 maxBitmapSize:(uint32_t)maxBitmapSize | 355 maxBitmapSize:(uint32_t)maxBitmapSize |
352 callback: | 356 callback: |
353 (const web::WebState::ImageDownloadCallback&)callback { | 357 (const web::WebState::ImageDownloadCallback&)callback { |
354 return -1; | 358 return -1; |
355 } | 359 } |
356 | 360 |
357 @end | 361 @end |
OLD | NEW |