OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/clean/chrome/browser/ui/tab_grid/tab_grid_mediator.h" | 5 #import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_mediator.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_consumer.h" |
8 #include "base/strings/sys_string_conversions.h" | |
9 #import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h" | |
10 #import "ios/shared/chrome/browser/tabs/web_state_list.h" | 8 #import "ios/shared/chrome/browser/tabs/web_state_list.h" |
11 #import "ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h" | 9 #import "ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h" |
12 #include "ios/web/public/web_state/web_state.h" | 10 #include "ios/web/public/web_state/web_state.h" |
13 | 11 |
14 #if !defined(__has_feature) || !__has_feature(objc_arc) | 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
15 #error "This file requires ARC support." | 13 #error "This file requires ARC support." |
16 #endif | 14 #endif |
17 | 15 |
18 @implementation TabGridMediator | 16 @implementation TabGridMediator |
19 @dynamic consumer; | 17 @dynamic consumer; |
(...skipping 10 matching lines...) Expand all Loading... |
30 - (void)webStateList:(WebStateList*)webStateList | 28 - (void)webStateList:(WebStateList*)webStateList |
31 didDetachWebState:(web::WebState*)webState | 29 didDetachWebState:(web::WebState*)webState |
32 atIndex:(int)index { | 30 atIndex:(int)index { |
33 [super webStateList:webStateList didDetachWebState:webState atIndex:index]; | 31 [super webStateList:webStateList didDetachWebState:webState atIndex:index]; |
34 if (webStateList->empty()) { | 32 if (webStateList->empty()) { |
35 [self.consumer addNoTabsOverlay]; | 33 [self.consumer addNoTabsOverlay]; |
36 } | 34 } |
37 } | 35 } |
38 | 36 |
39 @end | 37 @end |
OLD | NEW |