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

Side by Side Diff: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm

Issue 2734333003: Child coordinators notify their parent upon -start and -stop. (Closed)
Patch Set: Feedback Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ios/clean/chrome/browser/ui/tools/tools_coordinator.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/tools/tools_coordinator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698