| OLD | NEW |
| 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_COCOA_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_COCOA_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ | 6 #define CHROME_BROWSER_COCOA_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include "chrome/browser/tabs/tab_strip_model.h" | 10 #include "chrome/browser/tabs/tab_strip_model.h" |
| 11 | 11 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 29 virtual void TabDetachedAt(TabContents* contents, int index); | 29 virtual void TabDetachedAt(TabContents* contents, int index); |
| 30 virtual void TabSelectedAt(TabContents* old_contents, | 30 virtual void TabSelectedAt(TabContents* old_contents, |
| 31 TabContents* new_contents, | 31 TabContents* new_contents, |
| 32 int index, | 32 int index, |
| 33 bool user_gesture); | 33 bool user_gesture); |
| 34 virtual void TabMoved(TabContents* contents, | 34 virtual void TabMoved(TabContents* contents, |
| 35 int from_index, | 35 int from_index, |
| 36 int to_index); | 36 int to_index); |
| 37 virtual void TabChangedAt(TabContents* contents, int index, | 37 virtual void TabChangedAt(TabContents* contents, int index, |
| 38 TabChangeType change_type); | 38 TabChangeType change_type); |
| 39 virtual void TabPinnedStateChanged(TabContents* contents, int index); | 39 virtual void TabReplacedAt(TabContents* old_contents, |
| 40 TabContents* new_contents, |
| 41 int index); |
| 42 virtual void TabMiniStateChanged(TabContents* contents, int index); |
| 40 virtual void TabStripEmpty(); | 43 virtual void TabStripEmpty(); |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 id controller_; // weak, owns me | 46 id controller_; // weak, owns me |
| 44 TabStripModel* model_; // weak, owned by Browser | 47 TabStripModel* model_; // weak, owned by Browser |
| 45 }; | 48 }; |
| 46 | 49 |
| 47 // A collection of methods which can be selectively implemented by any | 50 // A collection of methods which can be selectively implemented by any |
| 48 // Cocoa object to receive updates about changes to a tab strip model. It is | 51 // Cocoa object to receive updates about changes to a tab strip model. It is |
| 49 // ok to not implement them, the calling code checks before calling. | 52 // ok to not implement them, the calling code checks before calling. |
| 50 @interface NSObject(TabStripModelBridge) | 53 @interface NSObject(TabStripModelBridge) |
| 51 - (void)insertTabWithContents:(TabContents*)contents | 54 - (void)insertTabWithContents:(TabContents*)contents |
| 52 atIndex:(NSInteger)index | 55 atIndex:(NSInteger)index |
| 53 inForeground:(bool)inForeground; | 56 inForeground:(bool)inForeground; |
| 54 - (void)tabClosingWithContents:(TabContents*)contents | 57 - (void)tabClosingWithContents:(TabContents*)contents |
| 55 atIndex:(NSInteger)index; | 58 atIndex:(NSInteger)index; |
| 56 - (void)tabDetachedWithContents:(TabContents*)contents | 59 - (void)tabDetachedWithContents:(TabContents*)contents |
| 57 atIndex:(NSInteger)index; | 60 atIndex:(NSInteger)index; |
| 58 - (void)selectTabWithContents:(TabContents*)newContents | 61 - (void)selectTabWithContents:(TabContents*)newContents |
| 59 previousContents:(TabContents*)oldContents | 62 previousContents:(TabContents*)oldContents |
| 60 atIndex:(NSInteger)index | 63 atIndex:(NSInteger)index |
| 61 userGesture:(bool)wasUserGesture; | 64 userGesture:(bool)wasUserGesture; |
| 62 - (void)tabMovedWithContents:(TabContents*)contents | 65 - (void)tabMovedWithContents:(TabContents*)contents |
| 63 fromIndex:(NSInteger)from | 66 fromIndex:(NSInteger)from |
| 64 toIndex:(NSInteger)to | 67 toIndex:(NSInteger)to; |
| 65 pinnedStateChanged:(BOOL)pinnedChanged; | |
| 66 - (void)tabChangedWithContents:(TabContents*)contents | 68 - (void)tabChangedWithContents:(TabContents*)contents |
| 67 atIndex:(NSInteger)index | 69 atIndex:(NSInteger)index |
| 68 changeType:(TabStripModelObserver::TabChangeType)change; | 70 changeType:(TabStripModelObserver::TabChangeType)change; |
| 69 - (void)tabPinnedStateChangedWithContents:(TabContents*)contents | 71 - (void)tabMiniStateChangedWithContents:(TabContents*)contents |
| 70 atIndex:(NSInteger)index; | 72 atIndex:(NSInteger)index; |
| 71 - (void)tabStripEmpty; | 73 - (void)tabStripEmpty; |
| 72 @end | 74 @end |
| 73 | 75 |
| 74 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ | 76 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ |
| OLD | NEW |