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

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

Issue 16832003: Add UMA metrics to measure the effectiveness of views fuzzing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 7 years, 6 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_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Start/stop the mini-tab title animation. 93 // Start/stop the mini-tab title animation.
94 void StartMiniTabTitleAnimation(); 94 void StartMiniTabTitleAnimation();
95 void StopMiniTabTitleAnimation(); 95 void StopMiniTabTitleAnimation();
96 96
97 // Set the background offset used to match the image in the inactive tab 97 // Set the background offset used to match the image in the inactive tab
98 // to the frame image. 98 // to the frame image.
99 void set_background_offset(const gfx::Point& offset) { 99 void set_background_offset(const gfx::Point& offset) {
100 background_offset_ = offset; 100 background_offset_ = offset;
101 } 101 }
102 102
103 // Returns true if this tab became the active tab selected in
104 // response to the last ui::ET_GESTURE_BEGIN gesture dispatched to
105 // this tab. Only used for collecting UMA metrics.
106 // See ash/touch/touch_uma.cc.
107 bool tab_activated_with_last_gesture_begin() const {
108 return tab_activated_with_last_gesture_begin_;
109 }
110
103 views::GlowHoverController* hover_controller() { 111 views::GlowHoverController* hover_controller() {
104 return &hover_controller_; 112 return &hover_controller_;
105 } 113 }
106 114
107 // Returns the minimum possible size of a single unselected Tab. 115 // Returns the minimum possible size of a single unselected Tab.
108 static gfx::Size GetMinimumUnselectedSize(); 116 static gfx::Size GetMinimumUnselectedSize();
109 // Returns the minimum possible size of a selected Tab. Selected tabs must 117 // Returns the minimum possible size of a selected Tab. Selected tabs must
110 // always show a close button and have a larger minimum size than unselected 118 // always show a close button and have a larger minimum size than unselected
111 // tabs. 119 // tabs.
112 static gfx::Size GetMinimumSelectedSize(); 120 static gfx::Size GetMinimumSelectedSize();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 scoped_ptr<ui::LinearAnimation> icon_animation_; 321 scoped_ptr<ui::LinearAnimation> icon_animation_;
314 322
315 scoped_refptr<ui::AnimationContainer> animation_container_; 323 scoped_refptr<ui::AnimationContainer> animation_container_;
316 324
317 scoped_ptr<TabAudioIndicator> tab_audio_indicator_; 325 scoped_ptr<TabAudioIndicator> tab_audio_indicator_;
318 326
319 views::ImageButton* close_button_; 327 views::ImageButton* close_button_;
320 328
321 ui::ThemeProvider* theme_provider_; 329 ui::ThemeProvider* theme_provider_;
322 330
331 bool tab_activated_with_last_gesture_begin_;
332
323 views::GlowHoverController hover_controller_; 333 views::GlowHoverController hover_controller_;
324 334
325 // The bounds of various sections of the display. 335 // The bounds of various sections of the display.
326 gfx::Rect favicon_bounds_; 336 gfx::Rect favicon_bounds_;
327 gfx::Rect title_bounds_; 337 gfx::Rect title_bounds_;
328 338
329 // The offset used to paint the inactive background image. 339 // The offset used to paint the inactive background image.
330 gfx::Point background_offset_; 340 gfx::Point background_offset_;
331 341
332 struct TabImage { 342 struct TabImage {
(...skipping 23 matching lines...) Expand all
356 static int font_height_; 366 static int font_height_;
357 367
358 // As the majority of the tabs are inactive, and painting tabs is slowish, 368 // As the majority of the tabs are inactive, and painting tabs is slowish,
359 // we cache a handful of the inactive tab backgrounds here. 369 // we cache a handful of the inactive tab backgrounds here.
360 static ImageCache* image_cache_; 370 static ImageCache* image_cache_;
361 371
362 DISALLOW_COPY_AND_ASSIGN(Tab); 372 DISALLOW_COPY_AND_ASSIGN(Tab);
363 }; 373 };
364 374
365 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 375 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698