1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_OBSERVER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_OBSERVER_H_ 7 8 #include "chrome/browser/ui/views/chrome_views_export.h" 9 10 class TabStrip; 11 12 //////////////////////////////////////////////////////////////////////////////// 13 // 14 // TabStripObserver 15 // 16 // Objects implement this interface when they wish to be notified of changes 17 // to the TabStrip. 18 // 19 // Register your TabStripObserver with the TabStrip using its 20 // Add/RemoveObserver methods. 21 // 22 //////////////////////////////////////////////////////////////////////////////// 23 class CHROME_VIEWS_EXPORT TabStripObserver { 24 public: 25 // Sent when a new tab has been added at |index|. 26 virtual void OnTabAdded(int index); 27 28 // Sent when the tab at |from_index| has been moved to |to_index|. 29 virtual void OnTabMoved(int from_index, int to_index); 30 31 // Sent when the tab at |index| has been removed. 32 virtual void OnTabRemoved(int index); 33 34 protected: ~TabStripObserver()35 virtual ~TabStripObserver() {} 36 }; 37 38 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_OBSERVER_H_ 39