| 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 #import <MobileCoreServices/MobileCoreServices.h> | 7 #import <MobileCoreServices/MobileCoreServices.h> |
| 8 | 8 |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | 13 |
| 14 #import "base/mac/scoped_nsobject.h" | 14 #import "base/mac/scoped_nsobject.h" |
| 15 #include "base/strings/sys_string_conversions.h" | 15 #include "base/strings/sys_string_conversions.h" |
| 16 #import "ios/net/crn_http_protocol_handler.h" | |
| 17 #import "ios/net/empty_nsurlcache.h" | 16 #import "ios/net/empty_nsurlcache.h" |
| 18 #import "ios/net/request_tracker.h" | 17 #import "ios/net/request_tracker.h" |
| 19 #import "ios/web/public/navigation_manager.h" | 18 #import "ios/web/public/navigation_manager.h" |
| 20 #include "ios/web/public/referrer.h" | 19 #include "ios/web/public/referrer.h" |
| 21 #import "ios/web/public/web_state/context_menu_params.h" | 20 #import "ios/web/public/web_state/context_menu_params.h" |
| 22 #import "ios/web/public/web_state/web_state.h" | 21 #import "ios/web/public/web_state/web_state.h" |
| 23 #import "ios/web/public/web_state/web_state_delegate_bridge.h" | 22 #import "ios/web/public/web_state/web_state_delegate_bridge.h" |
| 24 #import "ios/web/public/web_state/web_state_observer_bridge.h" | 23 #import "ios/web/public/web_state/web_state_observer_bridge.h" |
| 25 #import "net/base/mac/url_conversions.h" | 24 #import "net/base/mac/url_conversions.h" |
| 26 #include "ui/base/page_transition_types.h" | 25 #include "ui/base/page_transition_types.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 56 | 55 |
| 57 - (instancetype)initWithBrowserState:(web::BrowserState*)browserState { | 56 - (instancetype)initWithBrowserState:(web::BrowserState*)browserState { |
| 58 self = [super initWithNibName:nil bundle:nil]; | 57 self = [super initWithNibName:nil bundle:nil]; |
| 59 if (self) { | 58 if (self) { |
| 60 _browserState = browserState; | 59 _browserState = browserState; |
| 61 } | 60 } |
| 62 return self; | 61 return self; |
| 63 } | 62 } |
| 64 | 63 |
| 65 - (void)dealloc { | 64 - (void)dealloc { |
| 66 net::HTTPProtocolHandlerDelegate::SetInstance(nullptr); | |
| 67 net::RequestTracker::SetRequestTrackerFactory(nullptr); | 65 net::RequestTracker::SetRequestTrackerFactory(nullptr); |
| 68 } | 66 } |
| 69 | 67 |
| 70 - (void)viewDidLoad { | 68 - (void)viewDidLoad { |
| 71 [super viewDidLoad]; | 69 [super viewDidLoad]; |
| 72 | 70 |
| 73 CGRect bounds = self.view.bounds; | 71 CGRect bounds = self.view.bounds; |
| 74 | 72 |
| 75 // Set up the toolbar. | 73 // Set up the toolbar. |
| 76 _toolbarView = [[UIToolbar alloc] init]; | 74 _toolbarView = [[UIToolbar alloc] init]; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" | 316 [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" |
| 319 style:UIAlertActionStyleCancel | 317 style:UIAlertActionStyleCancel |
| 320 handler:nil]]; | 318 handler:nil]]; |
| 321 | 319 |
| 322 [self presentViewController:alert animated:YES completion:nil]; | 320 [self presentViewController:alert animated:YES completion:nil]; |
| 323 | 321 |
| 324 return YES; | 322 return YES; |
| 325 } | 323 } |
| 326 | 324 |
| 327 @end | 325 @end |
| OLD | NEW |