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

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

Issue 2821011: Removes phantom tabs. (Closed)
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/tab_strip_model_observer_bridge.h" 5 #include "chrome/browser/cocoa/tab_strip_model_observer_bridge.h"
6 6
7 TabStripModelObserverBridge::TabStripModelObserverBridge(TabStripModel* model, 7 TabStripModelObserverBridge::TabStripModelObserverBridge(TabStripModel* model,
8 id controller) 8 id controller)
9 : controller_(controller), model_(model) { 9 : controller_(controller), model_(model) {
10 DCHECK(model && controller); 10 DCHECK(model && controller);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 int index, 74 int index,
75 TabChangeType change_type) { 75 TabChangeType change_type) {
76 if ([controller_ respondsToSelector: 76 if ([controller_ respondsToSelector:
77 @selector(tabChangedWithContents:atIndex:changeType:)]) { 77 @selector(tabChangedWithContents:atIndex:changeType:)]) {
78 [controller_ tabChangedWithContents:contents 78 [controller_ tabChangedWithContents:contents
79 atIndex:index 79 atIndex:index
80 changeType:change_type]; 80 changeType:change_type];
81 } 81 }
82 } 82 }
83 83
84 void TabStripModelObserverBridge::TabReplacedAt(TabContents* old_contents,
85 TabContents* new_contents,
86 int index) {
87 TabChangedAt(new_contents, index, ALL);
88 }
89
90 void TabStripModelObserverBridge::TabMiniStateChanged(TabContents* contents, 84 void TabStripModelObserverBridge::TabMiniStateChanged(TabContents* contents,
91 int index) { 85 int index) {
92 if ([controller_ respondsToSelector: 86 if ([controller_ respondsToSelector:
93 @selector(tabMiniStateChangedWithContents:atIndex:)]) { 87 @selector(tabMiniStateChangedWithContents:atIndex:)]) {
94 [controller_ tabMiniStateChangedWithContents:contents atIndex:index]; 88 [controller_ tabMiniStateChangedWithContents:contents atIndex:index];
95 } 89 }
96 } 90 }
97 91
98 void TabStripModelObserverBridge::TabStripEmpty() { 92 void TabStripModelObserverBridge::TabStripEmpty() {
99 if ([controller_ respondsToSelector:@selector(tabStripEmpty)]) 93 if ([controller_ respondsToSelector:@selector(tabStripEmpty)])
100 [controller_ tabStripEmpty]; 94 [controller_ tabStripEmpty];
101 } 95 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/tab_strip_model_observer_bridge.h ('k') | chrome/browser/cocoa/tab_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698