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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.h

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Sync with ToT Created 3 years, 4 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
OLDNEW
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 base::string16 GetAccessibleTabName(const Tab* tab) const override; 244 base::string16 GetAccessibleTabName(const Tab* tab) const override;
245 int GetBackgroundResourceId(bool* custom_image) const override; 245 int GetBackgroundResourceId(bool* custom_image) const override;
246 void UpdateTabAccessibilityState(const Tab* tab, 246 void UpdateTabAccessibilityState(const Tab* tab,
247 ui::AXNodeData* node_data) override; 247 ui::AXNodeData* node_data) override;
248 248
249 // MouseWatcherListener overrides: 249 // MouseWatcherListener overrides:
250 void MouseMovedOutOfHost() override; 250 void MouseMovedOutOfHost() override;
251 251
252 // views::View overrides: 252 // views::View overrides:
253 void Layout() override; 253 void Layout() override;
254 void PaintChildren(const ui::PaintContext& context) override; 254 void PaintChildren(const views::PaintInfo& paint_info) override;
255 const char* GetClassName() const override; 255 const char* GetClassName() const override;
256 gfx::Size CalculatePreferredSize() const override; 256 gfx::Size CalculatePreferredSize() const override;
257 // NOTE: the drag and drop methods are invoked from FrameView. This is done 257 // NOTE: the drag and drop methods are invoked from FrameView. This is done
258 // to allow for a drop region that extends outside the bounds of the TabStrip. 258 // to allow for a drop region that extends outside the bounds of the TabStrip.
259 void OnDragEntered(const ui::DropTargetEvent& event) override; 259 void OnDragEntered(const ui::DropTargetEvent& event) override;
260 int OnDragUpdated(const ui::DropTargetEvent& event) override; 260 int OnDragUpdated(const ui::DropTargetEvent& event) override;
261 void OnDragExited() override; 261 void OnDragExited() override;
262 int OnPerformDrop(const ui::DropTargetEvent& event) override; 262 int OnPerformDrop(const ui::DropTargetEvent& event) override;
263 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; 263 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
264 views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override; 264 views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 void DestroyDragController(); 421 void DestroyDragController();
422 422
423 // Releases ownership of the current TabDragController. 423 // Releases ownership of the current TabDragController.
424 TabDragController* ReleaseDragController(); 424 TabDragController* ReleaseDragController();
425 425
426 // Finds |tab| in the |tab_closing_map_| and returns a pair of iterators 426 // Finds |tab| in the |tab_closing_map_| and returns a pair of iterators
427 // indicating precisely where it is. 427 // indicating precisely where it is.
428 FindClosingTabResult FindClosingTab(const Tab* tab); 428 FindClosingTabResult FindClosingTab(const Tab* tab);
429 429
430 // Paints all the tabs in |tabs_closing_map_[index]|. 430 // Paints all the tabs in |tabs_closing_map_[index]|.
431 void PaintClosingTabs(int index, const ui::PaintContext& context); 431 void PaintClosingTabs(int index, const views::PaintInfo& paint_info);
432 432
433 // Invoked when a mouse event occurs over |source|. Potentially switches the 433 // Invoked when a mouse event occurs over |source|. Potentially switches the
434 // |stacked_layout_|. 434 // |stacked_layout_|.
435 void UpdateStackedLayoutFromMouseEvent(views::View* source, 435 void UpdateStackedLayoutFromMouseEvent(views::View* source,
436 const ui::MouseEvent& event); 436 const ui::MouseEvent& event);
437 437
438 // -- Tab Resize Layout ----------------------------------------------------- 438 // -- Tab Resize Layout -----------------------------------------------------
439 439
440 // Returns the current width of each tab. If the space for tabs is not evenly 440 // Returns the current width of each tab. If the space for tabs is not evenly
441 // divisible into these widths, the initial tabs in the strip will be 1 px 441 // 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
650 base::OneShotTimer resize_layout_timer_; 650 base::OneShotTimer resize_layout_timer_;
651 651
652 // Our observers. 652 // Our observers.
653 typedef base::ObserverList<TabStripObserver> TabStripObservers; 653 typedef base::ObserverList<TabStripObserver> TabStripObservers;
654 TabStripObservers observers_; 654 TabStripObservers observers_;
655 655
656 DISALLOW_COPY_AND_ASSIGN(TabStrip); 656 DISALLOW_COPY_AND_ASSIGN(TabStrip);
657 }; 657 };
658 658
659 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 659 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698