Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8399)

Unified Diff: chrome/browser/views/tabs/browser_tab_strip.h

Issue 42490: Experiments with a new tabstrip + animator (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/tabs/browser_tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/browser_tab_strip.h
===================================================================
--- chrome/browser/views/tabs/browser_tab_strip.h (revision 0)
+++ chrome/browser/views/tabs/browser_tab_strip.h (revision 0)
@@ -0,0 +1,58 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_
+#define CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_
+
+#include "chrome/browser/views/tabs/tab_strip_2.h"
+#include "chrome/browser/tabs/tab_strip_model.h"
+
+// A specialization fo TabStrip2 for the browser window.
+//
+// TODO(beng): This shouldn't be a subclass of TabStrip2, rather it should own
+// one.
+class BrowserTabStrip : public TabStrip2,
+ public TabStrip2Model,
+ public TabStripModelObserver {
+ public:
+ explicit BrowserTabStrip(TabStripModel* model);
+ virtual ~BrowserTabStrip();
+
+ // Detaches the tab at the specified index.
+ TabContents* DetachTab(int index);
+
+ // Attaches the specified TabContents at the appropriate position given the
+ // mouse cursor at the specified screen position.
+ void AttachTab(TabContents* contents, const gfx::Point& screen_point,
+ const gfx::Rect& tab_screen_bounds);
+
+ // Overridden from TabStripModelObserver:
+ virtual void TabInsertedAt(TabContents* contents,
+ int index,
+ bool foreground);
+ virtual void TabDetachedAt(TabContents* contents, int index);
+ virtual void TabSelectedAt(TabContents* old_contents,
+ TabContents* contents,
+ int index,
+ bool user_gesture);
+ virtual void TabMoved(TabContents* contents, int from_index, int to_index);
+ virtual void TabChangedAt(TabContents* contents, int index);
+
+ // Overridden from TabStrip2Model:
+ virtual string16 GetTitle(int index) const;
+ virtual bool IsSelected(int index) const;
+ virtual void SelectTabAt(int index);
+ virtual bool CanDragTabs() const;
+ virtual void MoveTabAt(int index, int to_index);
+ virtual void DetachTabAt(int index,
+ const gfx::Rect& window_bounds,
+ const gfx::Rect& tab_bounds);
+
+ private:
+ TabStripModel* model_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserTabStrip);
+};
+
+#endif // #ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_
Property changes on: chrome\browser\views\tabs\browser_tab_strip.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/tabs/browser_tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698