OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 bool IsTabStripCloseable() const; | 154 bool IsTabStripCloseable() const; |
155 | 155 |
156 // Updates the loading animations displayed by tabs in the tabstrip to the | 156 // Updates the loading animations displayed by tabs in the tabstrip to the |
157 // next frame. | 157 // next frame. |
158 void UpdateLoadingAnimations(); | 158 void UpdateLoadingAnimations(); |
159 | 159 |
160 // Returns true if the specified point (in TabStrip coordinates) is in the | 160 // Returns true if the specified point (in TabStrip coordinates) is in the |
161 // window caption area of the browser window. | 161 // window caption area of the browser window. |
162 bool IsPositionInWindowCaption(const gfx::Point& point); | 162 bool IsPositionInWindowCaption(const gfx::Point& point); |
163 | 163 |
| 164 // Returns true if the specified rect (in TabStrip coordinates) intersects |
| 165 // the window caption area of the browser window. |
| 166 bool IsRectInWindowCaption(const gfx::Rect& rect); |
| 167 |
164 // Set the background offset used by inactive tabs to match the frame image. | 168 // Set the background offset used by inactive tabs to match the frame image. |
165 void SetBackgroundOffset(const gfx::Point& offset); | 169 void SetBackgroundOffset(const gfx::Point& offset); |
166 | 170 |
167 // Returns the new tab button. This is never NULL. | 171 // Returns the new tab button. This is never NULL. |
168 views::View* newtab_button(); | 172 views::View* newtab_button(); |
169 | 173 |
170 // Sets a painting style with miniature "tab indicator" rectangles at the top. | 174 // Sets a painting style with miniature "tab indicator" rectangles at the top. |
171 void SetImmersiveStyle(bool enable); | 175 void SetImmersiveStyle(bool enable); |
172 | 176 |
173 // Returns true if Tabs in this TabStrip are currently changing size or | 177 // Returns true if Tabs in this TabStrip are currently changing size or |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 218 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
215 virtual const char* GetClassName() const OVERRIDE; | 219 virtual const char* GetClassName() const OVERRIDE; |
216 virtual gfx::Size GetPreferredSize() OVERRIDE; | 220 virtual gfx::Size GetPreferredSize() OVERRIDE; |
217 // NOTE: the drag and drop methods are invoked from FrameView. This is done | 221 // NOTE: the drag and drop methods are invoked from FrameView. This is done |
218 // to allow for a drop region that extends outside the bounds of the TabStrip. | 222 // to allow for a drop region that extends outside the bounds of the TabStrip. |
219 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; | 223 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; |
220 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 224 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
221 virtual void OnDragExited() OVERRIDE; | 225 virtual void OnDragExited() OVERRIDE; |
222 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 226 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
223 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 227 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
224 virtual views::View* GetEventHandlerForPoint( | 228 virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE; |
225 const gfx::Point& point) OVERRIDE; | |
226 virtual views::View* GetTooltipHandlerForPoint( | 229 virtual views::View* GetTooltipHandlerForPoint( |
227 const gfx::Point& point) OVERRIDE; | 230 const gfx::Point& point) OVERRIDE; |
228 | 231 |
229 // Returns preferred height in immersive style. | 232 // Returns preferred height in immersive style. |
230 static int GetImmersiveHeight(); | 233 static int GetImmersiveHeight(); |
231 | 234 |
232 protected: | 235 protected: |
233 // Horizontal gap between mini and non-mini-tabs. | 236 // Horizontal gap between mini and non-mini-tabs. |
234 static const int kMiniToNonMiniGap; | 237 static const int kMiniToNonMiniGap; |
235 | 238 |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 bool immersive_style_; | 627 bool immersive_style_; |
625 | 628 |
626 // Our observers. | 629 // Our observers. |
627 typedef ObserverList<TabStripObserver> TabStripObservers; | 630 typedef ObserverList<TabStripObserver> TabStripObservers; |
628 TabStripObservers observers_; | 631 TabStripObservers observers_; |
629 | 632 |
630 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 633 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
631 }; | 634 }; |
632 | 635 |
633 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 636 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
OLD | NEW |