| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TABS_TAB_STRIP_MODEL_H_ | 5 #ifndef CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
| 6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // The selected TabContents changed from |old_contents| to |new_contents| at | 66 // The selected TabContents changed from |old_contents| to |new_contents| at |
| 67 // |index|. |user_gesture| specifies whether or not this was done by a user | 67 // |index|. |user_gesture| specifies whether or not this was done by a user |
| 68 // input event (e.g. clicking on a tab, keystroke) or as a side-effect of | 68 // input event (e.g. clicking on a tab, keystroke) or as a side-effect of |
| 69 // some other function. | 69 // some other function. |
| 70 virtual void TabSelectedAt(TabContents* old_contents, | 70 virtual void TabSelectedAt(TabContents* old_contents, |
| 71 TabContents* new_contents, | 71 TabContents* new_contents, |
| 72 int index, | 72 int index, |
| 73 bool user_gesture) { } | 73 bool user_gesture) { } |
| 74 | 74 |
| 75 // The specified TabContents at |from_index| was moved to |to_index|. | |
| 76 // TODO(sky): nuke and convert all to 4 arg variant. | |
| 77 virtual void TabMoved(TabContents* contents, | |
| 78 int from_index, | |
| 79 int to_index) { } | |
| 80 | |
| 81 // The specified TabContents at |from_index| was moved to |to_index|. If | 75 // The specified TabContents at |from_index| was moved to |to_index|. If |
| 82 // the pinned state of the tab is changing |pinned_state_changed| is true. | 76 // the pinned state of the tab is changing |pinned_state_changed| is true. |
| 83 virtual void TabMoved(TabContents* contents, | 77 virtual void TabMoved(TabContents* contents, |
| 84 int from_index, | 78 int from_index, |
| 85 int to_index, | 79 int to_index, |
| 86 bool pinned_state_changed) { | 80 bool pinned_state_changed) { } |
| 87 TabMoved(contents, from_index, to_index); | |
| 88 } | |
| 89 | 81 |
| 90 // The specified TabContents at |index| changed in some way. |contents| may | 82 // The specified TabContents at |index| changed in some way. |contents| may |
| 91 // be an entirely different object and the old value is no longer available | 83 // be an entirely different object and the old value is no longer available |
| 92 // by the time this message is delivered. | 84 // by the time this message is delivered. |
| 93 // | 85 // |
| 94 // If only the loading state was updated, the loading_only flag should be | 86 // If only the loading state was updated, the loading_only flag should be |
| 95 // specified. The tab model will update only the throbber, loading status, | 87 // specified. The tab model will update only the throbber, loading status, |
| 96 // and crashed state. | 88 // and crashed state. |
| 97 // | 89 // |
| 98 // If other things change, set this flag to false to update all state, | 90 // If other things change, set this flag to false to update all state, |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 typedef ObserverList<TabStripModelObserver> TabStripModelObservers; | 625 typedef ObserverList<TabStripModelObserver> TabStripModelObservers; |
| 634 TabStripModelObservers observers_; | 626 TabStripModelObservers observers_; |
| 635 | 627 |
| 636 // A scoped container for notification registries. | 628 // A scoped container for notification registries. |
| 637 NotificationRegistrar registrar_; | 629 NotificationRegistrar registrar_; |
| 638 | 630 |
| 639 DISALLOW_COPY_AND_ASSIGN(TabStripModel); | 631 DISALLOW_COPY_AND_ASSIGN(TabStripModel); |
| 640 }; | 632 }; |
| 641 | 633 |
| 642 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 634 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
| OLD | NEW |