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

Side by Side Diff: chrome/browser/views/tabs/browser_tab_strip.h

Issue 155242: Add temporary TabStripWrapper interface that is implemented by both TabStrip ... (Closed) Base URL: svn://svn.chromium.org/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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_
6 #define CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_ 6 #define CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_
7 7
8 #include "chrome/browser/views/tabs/tab_strip_2.h" 8 #include "chrome/browser/views/tabs/tab_strip_2.h"
9 #include "chrome/browser/tabs/tab_strip_model.h" 9 #include "chrome/browser/tabs/tab_strip_model.h"
10 10
11 // A specialization fo TabStrip2 for the browser window. 11 // A specialization fo TabStrip2 for the browser window.
12 // 12 //
13 // TODO(beng): This shouldn't be a subclass of TabStrip2, rather it should own 13 // TODO(beng): This shouldn't be a subclass of TabStrip2, rather it should own
14 // one. 14 // one.
15 class BrowserTabStrip : public TabStrip2, 15 class BrowserTabStrip : public TabStrip2,
16 public TabStrip2Model, 16 public TabStrip2Model,
17 public TabStripModelObserver { 17 public TabStripModelObserver,
18 public TabStripWrapper {
18 public: 19 public:
19 explicit BrowserTabStrip(TabStripModel* model); 20 explicit BrowserTabStrip(TabStripModel* model);
20 virtual ~BrowserTabStrip(); 21 virtual ~BrowserTabStrip();
21 22
22 // Detaches the tab at the specified index. 23 // Detaches the tab at the specified index.
23 TabContents* DetachTab(int index); 24 TabContents* DetachTab(int index);
24 25
25 // Attaches the specified TabContents at the appropriate position given the 26 // Attaches the specified TabContents at the appropriate position given the
26 // mouse cursor at the specified screen position. 27 // mouse cursor at the specified screen position.
27 void AttachTab(TabContents* contents, const gfx::Point& screen_point, 28 void AttachTab(TabContents* contents, const gfx::Point& screen_point,
(...skipping 14 matching lines...) Expand all
42 // Overridden from TabStrip2Model: 43 // Overridden from TabStrip2Model:
43 virtual string16 GetTitle(int index) const; 44 virtual string16 GetTitle(int index) const;
44 virtual bool IsSelected(int index) const; 45 virtual bool IsSelected(int index) const;
45 virtual void SelectTabAt(int index); 46 virtual void SelectTabAt(int index);
46 virtual bool CanDragTabs() const; 47 virtual bool CanDragTabs() const;
47 virtual void MoveTabAt(int index, int to_index); 48 virtual void MoveTabAt(int index, int to_index);
48 virtual void DetachTabAt(int index, 49 virtual void DetachTabAt(int index,
49 const gfx::Rect& window_bounds, 50 const gfx::Rect& window_bounds,
50 const gfx::Rect& tab_bounds); 51 const gfx::Rect& tab_bounds);
51 52
53 // Overridden from TabStripWrapper:
54 virtual int GetPreferredHeight();
55 virtual bool IsAnimating() const;
56 virtual void SetBackgroundOffset(gfx::Point offset);
57 virtual bool PointIsWithinWindowCaption(const gfx::Point& point);
58 virtual bool IsDragSessionActive() const;
59 virtual bool IsCompatibleWith(TabStripWrapper* other) const;
60 virtual void SetDraggedTabBounds(int tab_index,
61 const gfx::Rect& tab_bounds);
62 virtual void UpdateLoadingAnimations();
63 virtual views::View* GetView();
64 virtual BrowserTabStrip* AsBrowserTabStrip();
65 virtual TabStrip* AsTabStrip();
66
52 private: 67 private:
53 TabStripModel* model_; 68 TabStripModel* model_;
54 69
55 DISALLOW_COPY_AND_ASSIGN(BrowserTabStrip); 70 DISALLOW_COPY_AND_ASSIGN(BrowserTabStrip);
56 }; 71 };
57 72
58 #endif // #ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_ 73 #endif // #ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/opaque_browser_frame_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