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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm

Issue 17382005: Unbreak tabs.onRemove extension API in face of fast tab closure Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't modify content Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698