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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 BaseTab* tab, 177 BaseTab* tab,
178 const ui::LocatedEvent& event, 178 const ui::LocatedEvent& event,
179 const TabStripSelectionModel& original_selection) OVERRIDE; 179 const TabStripSelectionModel& original_selection) OVERRIDE;
180 virtual void ContinueDrag(views::View* view, 180 virtual void ContinueDrag(views::View* view,
181 const gfx::Point& location) OVERRIDE; 181 const gfx::Point& location) OVERRIDE;
182 virtual bool EndDrag(bool canceled) OVERRIDE; 182 virtual bool EndDrag(bool canceled) OVERRIDE;
183 virtual BaseTab* GetTabAt(BaseTab* tab, 183 virtual BaseTab* GetTabAt(BaseTab* tab,
184 const gfx::Point& tab_in_tab_coordinates) OVERRIDE; 184 const gfx::Point& tab_in_tab_coordinates) OVERRIDE;
185 virtual void ClickActiveTab(const BaseTab* tab) const OVERRIDE; 185 virtual void ClickActiveTab(const BaseTab* tab) const OVERRIDE;
186 virtual void OnMouseEventInTab(views::View* source, 186 virtual void OnMouseEventInTab(views::View* source,
187 const views::MouseEvent& event) OVERRIDE; 187 const ui::MouseEvent& event) OVERRIDE;
188 virtual bool ShouldPaintTab(const BaseTab* tab, gfx::Rect* clip) OVERRIDE; 188 virtual bool ShouldPaintTab(const BaseTab* tab, gfx::Rect* clip) OVERRIDE;
189 virtual bool IsInstantExtendedAPIEnabled() OVERRIDE; 189 virtual bool IsInstantExtendedAPIEnabled() OVERRIDE;
190 190
191 // MouseWatcherListener overrides: 191 // MouseWatcherListener overrides:
192 virtual void MouseMovedOutOfHost() OVERRIDE; 192 virtual void MouseMovedOutOfHost() OVERRIDE;
193 193
194 // views::View overrides: 194 // views::View overrides:
195 virtual void Layout() OVERRIDE; 195 virtual void Layout() OVERRIDE;
196 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; 196 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE;
197 virtual std::string GetClassName() const OVERRIDE; 197 virtual std::string GetClassName() const OVERRIDE;
(...skipping 18 matching lines...) Expand all
216 216
217 // Returns the number of mini-tabs. 217 // Returns the number of mini-tabs.
218 int GetMiniTabCount() const; 218 int GetMiniTabCount() const;
219 219
220 // views::ButtonListener implementation: 220 // views::ButtonListener implementation:
221 virtual void ButtonPressed(views::Button* sender, 221 virtual void ButtonPressed(views::Button* sender,
222 const ui::Event& event) OVERRIDE; 222 const ui::Event& event) OVERRIDE;
223 223
224 // View overrides. 224 // View overrides.
225 virtual const views::View* GetViewByID(int id) const OVERRIDE; 225 virtual const views::View* GetViewByID(int id) const OVERRIDE;
226 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 226 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
227 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; 227 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
228 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 228 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
229 virtual void OnMouseCaptureLost() OVERRIDE; 229 virtual void OnMouseCaptureLost() OVERRIDE;
230 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; 230 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
231 virtual ui::GestureStatus OnGestureEvent( 231 virtual ui::GestureStatus OnGestureEvent(
232 const views::GestureEvent& event) OVERRIDE; 232 const views::GestureEvent& event) OVERRIDE;
233 233
234 private: 234 private:
235 typedef std::map<int, std::vector<BaseTab*> > TabsClosingMap; 235 typedef std::map<int, std::vector<BaseTab*> > TabsClosingMap;
236 236
237 class RemoveTabDelegate; 237 class RemoveTabDelegate;
238 238
239 friend class TabDragController; 239 friend class TabDragController;
240 friend class TabDragControllerTest; 240 friend class TabDragControllerTest;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 // Releases ownership of the current TabDragController. 356 // Releases ownership of the current TabDragController.
357 TabDragController* ReleaseDragController(); 357 TabDragController* ReleaseDragController();
358 358
359 // Paints all the tabs in |tabs_closing_map_[index]|. 359 // Paints all the tabs in |tabs_closing_map_[index]|.
360 void PaintClosingTabs(gfx::Canvas* canvas, int index); 360 void PaintClosingTabs(gfx::Canvas* canvas, int index);
361 361
362 // Invoked when a mouse event occurs over |source|. Potentially switches the 362 // Invoked when a mouse event occurs over |source|. Potentially switches the
363 // layout type. 363 // layout type.
364 void UpdateLayoutTypeFromMouseEvent(views::View* source, 364 void UpdateLayoutTypeFromMouseEvent(views::View* source,
365 const views::MouseEvent& event); 365 const ui::MouseEvent& event);
366 366
367 // -- Tab Resize Layout ----------------------------------------------------- 367 // -- Tab Resize Layout -----------------------------------------------------
368 368
369 // Returns the exact (unrounded) current width of each tab. 369 // Returns the exact (unrounded) current width of each tab.
370 void GetCurrentTabWidths(double* unselected_width, 370 void GetCurrentTabWidths(double* unselected_width,
371 double* selected_width) const; 371 double* selected_width) const;
372 372
373 // Returns the exact (unrounded) desired width of each tab, based on the 373 // Returns the exact (unrounded) desired width of each tab, based on the
374 // desired strip width and number of tabs. If 374 // desired strip width and number of tabs. If
375 // |width_of_tabs_for_mouse_close_| is nonnegative we use that value in 375 // |width_of_tabs_for_mouse_close_| is nonnegative we use that value in
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // Time of the last mouse move event. 539 // Time of the last mouse move event.
540 base::TimeTicks last_mouse_move_time_; 540 base::TimeTicks last_mouse_move_time_;
541 541
542 // Number of mouse moves. 542 // Number of mouse moves.
543 int mouse_move_count_; 543 int mouse_move_count_;
544 544
545 DISALLOW_COPY_AND_ASSIGN(TabStrip); 545 DISALLOW_COPY_AND_ASSIGN(TabStrip);
546 }; 546 };
547 547
548 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ 548 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_controller.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698