OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h" | 5 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h" |
6 | 6 |
7 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
8 | 8 |
9 using content::WebContents; | 9 using content::WebContents; |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 void TabStripModelObserverBridge::TabClosingAt(TabStripModel* tab_strip_model, | 36 void TabStripModelObserverBridge::TabClosingAt(TabStripModel* tab_strip_model, |
37 WebContents* contents, | 37 WebContents* contents, |
38 int index) { | 38 int index) { |
39 if ([controller_ respondsToSelector: | 39 if ([controller_ respondsToSelector: |
40 @selector(tabClosingWithContents:atIndex:)]) { | 40 @selector(tabClosingWithContents:atIndex:)]) { |
41 [controller_ tabClosingWithContents:contents atIndex:index]; | 41 [controller_ tabClosingWithContents:contents atIndex:index]; |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 void TabStripModelObserverBridge::TabDetachedAt(WebContents* contents, | 45 void TabStripModelObserverBridge::TabDetachedAt(WebContents* contents, |
46 int index) { | 46 int index, |
| 47 bool closing_all) { |
47 if ([controller_ respondsToSelector: | 48 if ([controller_ respondsToSelector: |
48 @selector(tabDetachedWithContents:atIndex:)]) { | 49 @selector(tabDetachedWithContents:atIndex:)]) { |
49 [controller_ tabDetachedWithContents:contents atIndex:index]; | 50 [controller_ tabDetachedWithContents:contents atIndex:index]; |
50 } | 51 } |
51 } | 52 } |
52 | 53 |
53 void TabStripModelObserverBridge::TabDeactivated(WebContents* contents) { | 54 void TabStripModelObserverBridge::TabDeactivated(WebContents* contents) { |
54 if ([controller_ respondsToSelector:@selector(tabDeactivatedWithContents:)]) | 55 if ([controller_ respondsToSelector:@selector(tabDeactivatedWithContents:)]) |
55 [controller_ tabDeactivatedWithContents:contents]; | 56 [controller_ tabDeactivatedWithContents:contents]; |
56 } | 57 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 116 |
116 void TabStripModelObserverBridge::TabStripEmpty() { | 117 void TabStripModelObserverBridge::TabStripEmpty() { |
117 if ([controller_ respondsToSelector:@selector(tabStripEmpty)]) | 118 if ([controller_ respondsToSelector:@selector(tabStripEmpty)]) |
118 [controller_ tabStripEmpty]; | 119 [controller_ tabStripEmpty]; |
119 } | 120 } |
120 | 121 |
121 void TabStripModelObserverBridge::TabStripModelDeleted() { | 122 void TabStripModelObserverBridge::TabStripModelDeleted() { |
122 if ([controller_ respondsToSelector:@selector(tabStripModelDeleted)]) | 123 if ([controller_ respondsToSelector:@selector(tabStripModelDeleted)]) |
123 [controller_ tabStripModelDeleted]; | 124 [controller_ tabStripModelDeleted]; |
124 } | 125 } |
OLD | NEW |