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 10class 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//////////////////////////////////////////////////////////////////////////////// 23class CHROME_VIEWS_EXPORT TabStripObserver { 24 public: 25 // A new tab was added to |tab_strip| at |index|. 26 virtual void TabStripAddedTabAt(TabStrip* tab_strip, int index); 27 28 // The tab at |from_index| was moved to |to_index| in |tab_strip|. 29 virtual void TabStripMovedTab(TabStrip* tab_strip, 30 int from_index, 31 int to_index); 32 33 // The tab at |index| was removed from |tab_strip|. 34 virtual void TabStripRemovedTabAt(TabStrip* tab_strip, int index); 35 36 // Sent when the |tabstrip| is about to be deleted and any reference held must 37 // be dropped. 38 virtual void TabStripDeleted(TabStrip* tab_strip); 39 40 protected: 41 virtual ~TabStripObserver() {} 42}; 43 44#endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_OBSERVER_H_ 45