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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 base::string16 GetAccessibleTabName(const Tab* tab) const override; | 241 base::string16 GetAccessibleTabName(const Tab* tab) const override; |
242 int GetBackgroundResourceId(bool* custom_image) const override; | 242 int GetBackgroundResourceId(bool* custom_image) const override; |
243 void UpdateTabAccessibilityState(const Tab* tab, | 243 void UpdateTabAccessibilityState(const Tab* tab, |
244 ui::AXNodeData* node_data) override; | 244 ui::AXNodeData* node_data) override; |
245 | 245 |
246 // MouseWatcherListener overrides: | 246 // MouseWatcherListener overrides: |
247 void MouseMovedOutOfHost() override; | 247 void MouseMovedOutOfHost() override; |
248 | 248 |
249 // views::View overrides: | 249 // views::View overrides: |
250 void Layout() override; | 250 void Layout() override; |
251 void PaintChildren(const ui::PaintContext& context) override; | 251 void PaintChildren(const views::PaintInfo& paint_info) override; |
252 const char* GetClassName() const override; | 252 const char* GetClassName() const override; |
253 gfx::Size CalculatePreferredSize() const override; | 253 gfx::Size CalculatePreferredSize() const override; |
254 // NOTE: the drag and drop methods are invoked from FrameView. This is done | 254 // NOTE: the drag and drop methods are invoked from FrameView. This is done |
255 // to allow for a drop region that extends outside the bounds of the TabStrip. | 255 // to allow for a drop region that extends outside the bounds of the TabStrip. |
256 void OnDragEntered(const ui::DropTargetEvent& event) override; | 256 void OnDragEntered(const ui::DropTargetEvent& event) override; |
257 int OnDragUpdated(const ui::DropTargetEvent& event) override; | 257 int OnDragUpdated(const ui::DropTargetEvent& event) override; |
258 void OnDragExited() override; | 258 void OnDragExited() override; |
259 int OnPerformDrop(const ui::DropTargetEvent& event) override; | 259 int OnPerformDrop(const ui::DropTargetEvent& event) override; |
260 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; | 260 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
261 views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override; | 261 views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 void DestroyDragController(); | 418 void DestroyDragController(); |
419 | 419 |
420 // Releases ownership of the current TabDragController. | 420 // Releases ownership of the current TabDragController. |
421 TabDragController* ReleaseDragController(); | 421 TabDragController* ReleaseDragController(); |
422 | 422 |
423 // Finds |tab| in the |tab_closing_map_| and returns a pair of iterators | 423 // Finds |tab| in the |tab_closing_map_| and returns a pair of iterators |
424 // indicating precisely where it is. | 424 // indicating precisely where it is. |
425 FindClosingTabResult FindClosingTab(const Tab* tab); | 425 FindClosingTabResult FindClosingTab(const Tab* tab); |
426 | 426 |
427 // Paints all the tabs in |tabs_closing_map_[index]|. | 427 // Paints all the tabs in |tabs_closing_map_[index]|. |
428 void PaintClosingTabs(int index, const ui::PaintContext& context); | 428 void PaintClosingTabs(int index, const views::PaintInfo& paint_info); |
429 | 429 |
430 // Invoked when a mouse event occurs over |source|. Potentially switches the | 430 // Invoked when a mouse event occurs over |source|. Potentially switches the |
431 // |stacked_layout_|. | 431 // |stacked_layout_|. |
432 void UpdateStackedLayoutFromMouseEvent(views::View* source, | 432 void UpdateStackedLayoutFromMouseEvent(views::View* source, |
433 const ui::MouseEvent& event); | 433 const ui::MouseEvent& event); |
434 | 434 |
435 // -- Tab Resize Layout ----------------------------------------------------- | 435 // -- Tab Resize Layout ----------------------------------------------------- |
436 | 436 |
437 // Returns the current width of each tab. If the space for tabs is not evenly | 437 // Returns the current width of each tab. If the space for tabs is not evenly |
438 // divisible into these widths, the initial tabs in the strip will be 1 px | 438 // divisible into these widths, the initial tabs in the strip will be 1 px |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 base::OneShotTimer resize_layout_timer_; | 647 base::OneShotTimer resize_layout_timer_; |
648 | 648 |
649 // Our observers. | 649 // Our observers. |
650 typedef base::ObserverList<TabStripObserver> TabStripObservers; | 650 typedef base::ObserverList<TabStripObserver> TabStripObservers; |
651 TabStripObservers observers_; | 651 TabStripObservers observers_; |
652 | 652 |
653 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 653 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
654 }; | 654 }; |
655 | 655 |
656 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 656 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
OLD | NEW |