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

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

Issue 265713007: views: Update event-related API to use PointF/RectF instead of Point/Rect. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Returns false when there is a drag operation in progress so that the frame 148 // Returns false when there is a drag operation in progress so that the frame
149 // doesn't close. 149 // doesn't close.
150 bool IsTabStripCloseable() const; 150 bool IsTabStripCloseable() const;
151 151
152 // Updates the loading animations displayed by tabs in the tabstrip to the 152 // Updates the loading animations displayed by tabs in the tabstrip to the
153 // next frame. 153 // next frame.
154 void UpdateLoadingAnimations(); 154 void UpdateLoadingAnimations();
155 155
156 // Returns true if the specified point (in TabStrip coordinates) is in the 156 // Returns true if the specified point (in TabStrip coordinates) is in the
157 // window caption area of the browser window. 157 // window caption area of the browser window.
158 bool IsPositionInWindowCaption(const gfx::Point& point); 158 bool IsPositionInWindowCaption(const gfx::PointF& point);
159 159
160 // Returns true if the specified rect (in TabStrip coordinates) intersects 160 // Returns true if the specified rect (in TabStrip coordinates) intersects
161 // the window caption area of the browser window. 161 // the window caption area of the browser window.
162 bool IsRectInWindowCaption(const gfx::Rect& rect); 162 bool IsRectInWindowCaption(const gfx::RectF& rect);
163 163
164 // Set the background offset used by inactive tabs to match the frame image. 164 // Set the background offset used by inactive tabs to match the frame image.
165 void SetBackgroundOffset(const gfx::Point& offset); 165 void SetBackgroundOffset(const gfx::Point& offset);
166 166
167 // Returns the new tab button. This is never NULL. 167 // Returns the new tab button. This is never NULL.
168 views::View* newtab_button(); 168 views::View* newtab_button();
169 169
170 // Sets a painting style with miniature "tab indicator" rectangles at the top. 170 // Sets a painting style with miniature "tab indicator" rectangles at the top.
171 void SetImmersiveStyle(bool enable); 171 void SetImmersiveStyle(bool enable);
172 172
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; 217 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE;
218 virtual const char* GetClassName() const OVERRIDE; 218 virtual const char* GetClassName() const OVERRIDE;
219 virtual gfx::Size GetPreferredSize() OVERRIDE; 219 virtual gfx::Size GetPreferredSize() OVERRIDE;
220 // NOTE: the drag and drop methods are invoked from FrameView. This is done 220 // NOTE: the drag and drop methods are invoked from FrameView. This is done
221 // to allow for a drop region that extends outside the bounds of the TabStrip. 221 // to allow for a drop region that extends outside the bounds of the TabStrip.
222 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; 222 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE;
223 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; 223 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
224 virtual void OnDragExited() OVERRIDE; 224 virtual void OnDragExited() OVERRIDE;
225 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; 225 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
226 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 226 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
227 virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE; 227 virtual views::View* GetEventHandlerForRect(const gfx::RectF& rect) OVERRIDE;
228 virtual views::View* GetTooltipHandlerForPoint( 228 virtual views::View* GetTooltipHandlerForPoint(
229 const gfx::Point& point) OVERRIDE; 229 const gfx::Point& point) OVERRIDE;
230 230
231 // Returns preferred height in immersive style. 231 // Returns preferred height in immersive style.
232 static int GetImmersiveHeight(); 232 static int GetImmersiveHeight();
233 233
234 protected: 234 protected:
235 // Horizontal gap between mini and non-mini-tabs. 235 // Horizontal gap between mini and non-mini-tabs.
236 static const int kMiniToNonMiniGap; 236 static const int kMiniToNonMiniGap;
237 237
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 bool immersive_style_; 634 bool immersive_style_;
635 635
636 // Our observers. 636 // Our observers.
637 typedef ObserverList<TabStripObserver> TabStripObservers; 637 typedef ObserverList<TabStripObserver> TabStripObservers;
638 TabStripObservers observers_; 638 TabStripObservers observers_;
639 639
640 DISALLOW_COPY_AND_ASSIGN(TabStrip); 640 DISALLOW_COPY_AND_ASSIGN(TabStrip);
641 }; 641 };
642 642
643 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 643 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698