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