| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 13 | 13 |
| 14 class TabContentsWrapper; | 14 class TabContents; |
| 15 typedef TabContents TabContentsWrapper; |
| 15 class TabStripModel; | 16 class TabStripModel; |
| 16 | 17 |
| 17 // A C++ bridge class to handle receiving notifications from the C++ tab strip | 18 // A C++ bridge class to handle receiving notifications from the C++ tab strip |
| 18 // model. When the caller allocates a bridge, it automatically registers for | 19 // model. When the caller allocates a bridge, it automatically registers for |
| 19 // notifications from |model| and passes messages to |controller| via the | 20 // notifications from |model| and passes messages to |controller| via the |
| 20 // informal protocol below. The owner of this object is responsible for deleting | 21 // informal protocol below. The owner of this object is responsible for deleting |
| 21 // it (and thus unhooking notifications) before |controller| is destroyed. | 22 // it (and thus unhooking notifications) before |controller| is destroyed. |
| 22 class TabStripModelObserverBridge : public TabStripModelObserver { | 23 class TabStripModelObserverBridge : public TabStripModelObserver { |
| 23 public: | 24 public: |
| 24 TabStripModelObserverBridge(TabStripModel* model, id controller); | 25 TabStripModelObserverBridge(TabStripModel* model, id controller); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 - (void)tabReplacedWithContents:(TabContentsWrapper*)newContents | 80 - (void)tabReplacedWithContents:(TabContentsWrapper*)newContents |
| 80 previousContents:(TabContentsWrapper*)oldContents | 81 previousContents:(TabContentsWrapper*)oldContents |
| 81 atIndex:(NSInteger)index; | 82 atIndex:(NSInteger)index; |
| 82 - (void)tabMiniStateChangedWithContents:(TabContentsWrapper*)contents | 83 - (void)tabMiniStateChangedWithContents:(TabContentsWrapper*)contents |
| 83 atIndex:(NSInteger)index; | 84 atIndex:(NSInteger)index; |
| 84 - (void)tabStripEmpty; | 85 - (void)tabStripEmpty; |
| 85 - (void)tabStripModelDeleted; | 86 - (void)tabStripModelDeleted; |
| 86 @end | 87 @end |
| 87 | 88 |
| 88 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ | 89 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_MODEL_OBSERVER_BRIDGE_H_ |
| OLD | NEW |