OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // ====== New Architecture ===== | 5 // ====== New Architecture ===== |
6 // = This code is only used in the new iOS Chrome architecture. = | 6 // = This code is only used in the new iOS Chrome architecture. = |
7 // ============================================================================ | 7 // ============================================================================ |
8 | 8 |
9 #import "ios/clean/chrome/browser/ui/web_contents/web_coordinator.h" | 9 #import "ios/clean/chrome/browser/ui/web_contents/web_coordinator.h" |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 - (void)start { | 43 - (void)start { |
44 self.viewController = [[WebContentsViewController alloc] init]; | 44 self.viewController = [[WebContentsViewController alloc] init]; |
45 self.mediator.consumer = self.viewController; | 45 self.mediator.consumer = self.viewController; |
46 | 46 |
47 // Reminder: this is a no-op if |baseViewController| is nil, for example | 47 // Reminder: this is a no-op if |baseViewController| is nil, for example |
48 // when this coordinator's view controller will be contained instead of | 48 // when this coordinator's view controller will be contained instead of |
49 // presented. | 49 // presented. |
50 [self.context.baseViewController presentViewController:self.viewController | 50 [self.context.baseViewController presentViewController:self.viewController |
51 animated:self.context.animated | 51 animated:self.context.animated |
52 completion:nil]; | 52 completion:nil]; |
| 53 [super start]; |
53 } | 54 } |
54 | 55 |
55 - (void)stop { | 56 - (void)stop { |
| 57 [super stop]; |
56 // PLACEHOLDER: This is how the webUsageEnabled is set to false. Find a | 58 // PLACEHOLDER: This is how the webUsageEnabled is set to false. Find a |
57 // better way in the future. | 59 // better way in the future. |
58 self.mediator.webState = nullptr; | 60 self.mediator.webState = nullptr; |
59 } | 61 } |
60 | 62 |
61 @end | 63 @end |
OLD | NEW |