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

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

Issue 6155003: Changes instant so that the newly created tab has a new id. Doing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 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/ui/cocoa/tab_strip_model_observer_bridge.h" 5 #include "chrome/browser/ui/cocoa/tab_strip_model_observer_bridge.h"
6 6
7 #include "chrome/browser/tabs/tab_strip_model.h" 7 #include "chrome/browser/tabs/tab_strip_model.h"
8 8
9 TabStripModelObserverBridge::TabStripModelObserverBridge(TabStripModel* model, 9 TabStripModelObserverBridge::TabStripModelObserverBridge(TabStripModel* model,
10 id controller) 10 id controller)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 TabChangeType change_type) { 79 TabChangeType change_type) {
80 if ([controller_ respondsToSelector: 80 if ([controller_ respondsToSelector:
81 @selector(tabChangedWithContents:atIndex:changeType:)]) { 81 @selector(tabChangedWithContents:atIndex:changeType:)]) {
82 [controller_ tabChangedWithContents:contents 82 [controller_ tabChangedWithContents:contents
83 atIndex:index 83 atIndex:index
84 changeType:change_type]; 84 changeType:change_type];
85 } 85 }
86 } 86 }
87 87
88 void TabStripModelObserverBridge::TabReplacedAt( 88 void TabStripModelObserverBridge::TabReplacedAt(
89 TabStripModel* tab_strip_model,
89 TabContentsWrapper* old_contents, 90 TabContentsWrapper* old_contents,
90 TabContentsWrapper* new_contents, 91 TabContentsWrapper* new_contents,
91 int index) { 92 int index) {
92 if ([controller_ respondsToSelector: 93 if ([controller_ respondsToSelector:
93 @selector(tabReplacedWithContents:previousContents:atIndex:)]) { 94 @selector(tabReplacedWithContents:previousContents:atIndex:)]) {
94 [controller_ tabReplacedWithContents:new_contents 95 [controller_ tabReplacedWithContents:new_contents
95 previousContents:old_contents 96 previousContents:old_contents
96 atIndex:index]; 97 atIndex:index];
97 } else { 98 } else {
98 TabChangedAt(new_contents, index, ALL); 99 TabChangedAt(new_contents, index, ALL);
(...skipping 10 matching lines...) Expand all
109 110
110 void TabStripModelObserverBridge::TabStripEmpty() { 111 void TabStripModelObserverBridge::TabStripEmpty() {
111 if ([controller_ respondsToSelector:@selector(tabStripEmpty)]) 112 if ([controller_ respondsToSelector:@selector(tabStripEmpty)])
112 [controller_ tabStripEmpty]; 113 [controller_ tabStripEmpty];
113 } 114 }
114 115
115 void TabStripModelObserverBridge::TabStripModelDeleted() { 116 void TabStripModelObserverBridge::TabStripModelDeleted() {
116 if ([controller_ respondsToSelector:@selector(tabStripModelDeleted)]) 117 if ([controller_ respondsToSelector:@selector(tabStripModelDeleted)])
117 [controller_ tabStripModelDeleted]; 118 [controller_ tabStripModelDeleted];
118 } 119 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_strip_model_observer_bridge.h ('k') | chrome/browser/ui/toolbar/wrench_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698