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

Side by Side Diff: chrome/browser/views/tabs/tab_strip_wrapper.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
« no previous file with comments | « chrome/browser/views/tabs/tab_strip_2.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // LICENSE file.
4
5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_WRAPPER_H_
6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_WRAPPER_H_
7
8 class BrowserTabStrip;
9 namespace gfx {
10 class Point;
11 class Rect;
12 }
13 class TabStrip;
14 class TabStripModel;
15 namespace views {
16 class View;
17 }
18
19 // A temporary interface to abstract the TabStrip implementation (which can be
20 // either TabStrip or TabStrip2) from the rest of the Browser frontend code
21 // while the new TabStrip is brought up.
22 class TabStripWrapper {
23 public:
24 // Returns the preferred height of this TabStrip. This is based on the
25 // typical height of its constituent tabs.
26 virtual int GetPreferredHeight() = 0;
27
28 // Returns true if Tabs in this TabStrip are currently changing size or
29 // position.
30 virtual bool IsAnimating() const = 0;
31
32 // Set the background offset used by inactive tabs to match the frame image.
33 virtual void SetBackgroundOffset(gfx::Point offset) = 0;
34
35 // Returns true if the specified point(TabStrip coordinates) should be
36 // considered to be within the window caption area of the browser window.
37 virtual bool PointIsWithinWindowCaption(const gfx::Point& point) = 0;
38
39 // Returns true if a drag session is currently active.
40 virtual bool IsDragSessionActive() const = 0;
41
42 // Return true if this tab strip is compatible with the provided tab strip.
43 // Compatible tab strips can transfer tabs during drag and drop.
44 virtual bool IsCompatibleWith(TabStripWrapper* other) const = 0;
45
46 // Sets the bounds of the tab at the specified |tab_index|. |tab_bounds| are
47 // in TabStrip coordinates.
48 virtual void SetDraggedTabBounds(int tab_index,
49 const gfx::Rect& tab_bounds) = 0;
50
51 // Updates the loading animations displayed by tabs in the tabstrip to the
52 // next frame.
53 virtual void UpdateLoadingAnimations() = 0;
54
55 // Returns the views::View of the wrapped tabstrip, for layout and sizing.
56 virtual views::View* GetView() = 0;
57
58 // Shim to provide access to the BrowserTabStrip implementation for code only
59 // called from within TabStrip2::Enabled() == true blocks. Returns NULL when
60 // old TabStrip is in effect.
61 virtual BrowserTabStrip* AsBrowserTabStrip() = 0;
62
63 // Shim to provide access to the TabStrip implementation for code only called
64 // from within TabStrip2::Enabled() == false blocks. Returns NULL when the new
65 // TabStrip is in effect.
66 virtual TabStrip* AsTabStrip() = 0;
67
68 // Creates a TabStrip - either the old or new one depending on command line
69 // flags.
70 static TabStripWrapper* CreateTabStrip(TabStripModel* model);
71 };
72
73 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_WRAPPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab_strip_2.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698