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

Side by Side Diff: chrome/browser/ui/touch/tabs/touch_tab.cc

Issue 6750007: Scrolling Tabs (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: self review 1 Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/touch/tabs/touch_tab.h" 5 #include "chrome/browser/ui/touch/tabs/touch_tab.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/themes/browser_theme_provider.h" 8 #include "chrome/browser/themes/browser_theme_provider.h"
9 #include "grit/app_resources.h" 9 #include "grit/app_resources.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return title_bounds_; 50 return title_bounds_;
51 } 51 }
52 52
53 const gfx::Rect& TouchTab::GetIconBounds() const { 53 const gfx::Rect& TouchTab::GetIconBounds() const {
54 return favicon_bounds_; 54 return favicon_bounds_;
55 } 55 }
56 56
57 //////////////////////////////////////////////////////////////////////////////// 57 ////////////////////////////////////////////////////////////////////////////////
58 // TouchTab, views::View overrides: 58 // TouchTab, views::View overrides:
59 59
60 // We'll get selected via the mouse interactions with the TouchTabStrip. There
61 // is need to directly handle the mouse movements in the TouchTab.
62
63 bool TouchTab::OnMousePressed(const views::MouseEvent& event) {
64 return false;
65 }
66
67 bool TouchTab::OnMouseDragged(const views::MouseEvent& event) {
68 return false;
69 }
70
71 void TouchTab::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
72 }
73
60 void TouchTab::OnPaint(gfx::Canvas* canvas) { 74 void TouchTab::OnPaint(gfx::Canvas* canvas) {
61 // Don't paint if we're narrower than we can render correctly. (This should 75 // Don't paint if we're narrower than we can render correctly. (This should
62 // only happen during animations). 76 // only happen during animations).
63 if (width() < GetMinimumUnselectedSize().width() && !data().mini) 77 if (width() < GetMinimumUnselectedSize().width() && !data().mini)
64 return; 78 return;
65 79
66 PaintTabBackground(canvas); 80 PaintTabBackground(canvas);
67 81
68 SkColor title_color = GetThemeProvider()-> 82 SkColor title_color = GetThemeProvider()->
69 GetColor(IsSelected() ? 83 GetColor(IsSelected() ?
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); 250 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT);
237 tab_active.l_width = tab_active.image_l->width(); 251 tab_active.l_width = tab_active.image_l->width();
238 tab_active.r_width = tab_active.image_r->width(); 252 tab_active.r_width = tab_active.image_r->width();
239 253
240 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); 254 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT);
241 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); 255 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER);
242 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); 256 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT);
243 tab_inactive.l_width = tab_inactive.image_l->width(); 257 tab_inactive.l_width = tab_inactive.image_l->width();
244 tab_inactive.r_width = tab_inactive.image_r->width(); 258 tab_inactive.r_width = tab_inactive.image_r->width();
245 } 259 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698