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

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

Issue 11365201: Remove TabContents from TabStripModelObserver::TabMoved. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: linux oops Created 8 years, 1 month 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 #include "chrome/browser/ui/tab_contents/tab_contents.h" 8 #include "chrome/browser/ui/tab_contents/tab_contents.h"
9 9
10 using content::WebContents; 10 using content::WebContents;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if ([controller_ respondsToSelector: 68 if ([controller_ respondsToSelector:
69 @selector(activateTabWithContents:previousContents:atIndex: 69 @selector(activateTabWithContents:previousContents:atIndex:
70 userGesture:)]) { 70 userGesture:)]) {
71 [controller_ activateTabWithContents:WebContentsOf(new_contents) 71 [controller_ activateTabWithContents:WebContentsOf(new_contents)
72 previousContents:WebContentsOf(old_contents) 72 previousContents:WebContentsOf(old_contents)
73 atIndex:index 73 atIndex:index
74 userGesture:user_gesture]; 74 userGesture:user_gesture];
75 } 75 }
76 } 76 }
77 77
78 void TabStripModelObserverBridge::TabMoved(TabContents* contents, 78 void TabStripModelObserverBridge::TabMoved(WebContents* contents,
79 int from_index, 79 int from_index,
80 int to_index) { 80 int to_index) {
81 if ([controller_ respondsToSelector: 81 if ([controller_ respondsToSelector:
82 @selector(tabMovedWithContents:fromIndex:toIndex:)]) { 82 @selector(tabMovedWithContents:fromIndex:toIndex:)]) {
83 [controller_ tabMovedWithContents:WebContentsOf(contents) 83 [controller_ tabMovedWithContents:contents
84 fromIndex:from_index 84 fromIndex:from_index
85 toIndex:to_index]; 85 toIndex:to_index];
86 } 86 }
87 } 87 }
88 88
89 void TabStripModelObserverBridge::TabChangedAt(TabContents* contents, 89 void TabStripModelObserverBridge::TabChangedAt(TabContents* contents,
90 int index, 90 int index,
91 TabChangeType change_type) { 91 TabChangeType change_type) {
92 if ([controller_ respondsToSelector: 92 if ([controller_ respondsToSelector:
93 @selector(tabChangedWithContents:atIndex:changeType:)]) { 93 @selector(tabChangedWithContents:atIndex:changeType:)]) {
(...skipping 30 matching lines...) Expand all
124 124
125 void TabStripModelObserverBridge::TabStripEmpty() { 125 void TabStripModelObserverBridge::TabStripEmpty() {
126 if ([controller_ respondsToSelector:@selector(tabStripEmpty)]) 126 if ([controller_ respondsToSelector:@selector(tabStripEmpty)])
127 [controller_ tabStripEmpty]; 127 [controller_ tabStripEmpty];
128 } 128 }
129 129
130 void TabStripModelObserverBridge::TabStripModelDeleted() { 130 void TabStripModelObserverBridge::TabStripModelDeleted() {
131 if ([controller_ respondsToSelector:@selector(tabStripModelDeleted)]) 131 if ([controller_ respondsToSelector:@selector(tabStripModelDeleted)])
132 [controller_ tabStripModelDeleted]; 132 [controller_ tabStripModelDeleted];
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h ('k') | chrome/browser/ui/gtk/tabs/tab_strip_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698