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

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

Issue 1053143002: Make View::Paint use ui::PaintRecorder to access PaintContext's canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: paintrecorder: . Created 5 years, 8 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) override; 238 bool ShouldPaintTab(const Tab* tab, gfx::Rect* clip) override;
239 bool IsImmersiveStyle() const override; 239 bool IsImmersiveStyle() const override;
240 void UpdateTabAccessibilityState(const Tab* tab, 240 void UpdateTabAccessibilityState(const Tab* tab,
241 ui::AXViewState* state) override; 241 ui::AXViewState* state) 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 PaintContext& context) override; 248 void PaintChildren(const ui::PaintContext& context) override;
249 const char* GetClassName() const override; 249 const char* GetClassName() const override;
250 gfx::Size GetPreferredSize() const override; 250 gfx::Size GetPreferredSize() 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 GetAccessibleState(ui::AXViewState* state) override; 257 void GetAccessibleState(ui::AXViewState* state) override;
258 views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override; 258 views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 void DestroyDragController(); 424 void DestroyDragController();
425 425
426 // Releases ownership of the current TabDragController. 426 // Releases ownership of the current TabDragController.
427 TabDragController* ReleaseDragController(); 427 TabDragController* ReleaseDragController();
428 428
429 // Finds |tab| in the |tab_closing_map_| and returns a pair of iterators 429 // Finds |tab| in the |tab_closing_map_| and returns a pair of iterators
430 // indicating precisely where it is. 430 // indicating precisely where it is.
431 FindClosingTabResult FindClosingTab(const Tab* tab); 431 FindClosingTabResult FindClosingTab(const Tab* tab);
432 432
433 // Paints all the tabs in |tabs_closing_map_[index]|. 433 // Paints all the tabs in |tabs_closing_map_[index]|.
434 void PaintClosingTabs(int index, const PaintContext& context); 434 void PaintClosingTabs(int index, const ui::PaintContext& context);
435 435
436 // Invoked when a mouse event occurs over |source|. Potentially switches the 436 // Invoked when a mouse event occurs over |source|. Potentially switches the
437 // |stacked_layout_|. 437 // |stacked_layout_|.
438 void UpdateStackedLayoutFromMouseEvent(views::View* source, 438 void UpdateStackedLayoutFromMouseEvent(views::View* source,
439 const ui::MouseEvent& event); 439 const ui::MouseEvent& event);
440 440
441 // -- Tab Resize Layout ----------------------------------------------------- 441 // -- Tab Resize Layout -----------------------------------------------------
442 442
443 // Returns the exact (unrounded) current width of each tab. 443 // Returns the exact (unrounded) current width of each tab.
444 void GetCurrentTabWidths(double* unselected_width, 444 void GetCurrentTabWidths(double* unselected_width,
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 bool immersive_style_; 670 bool immersive_style_;
671 671
672 // Our observers. 672 // Our observers.
673 typedef ObserverList<TabStripObserver> TabStripObservers; 673 typedef ObserverList<TabStripObserver> TabStripObservers;
674 TabStripObservers observers_; 674 TabStripObservers observers_;
675 675
676 DISALLOW_COPY_AND_ASSIGN(TabStrip); 676 DISALLOW_COPY_AND_ASSIGN(TabStrip);
677 }; 677 };
678 678
679 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 679 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698