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

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

Issue 7065052: Improve large tab strip by leveraging touch icons when present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resynced (again) Created 9 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) 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_strip.h" 5 #include "chrome/browser/ui/touch/tabs/touch_tab_strip.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "chrome/browser/ui/touch/tabs/touch_tab.h" 10 #include "chrome/browser/ui/touch/tabs/touch_tab.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } else { 264 } else {
265 scroll_offset_ = min_scroll_offset_; 265 scroll_offset_ = min_scroll_offset_;
266 } 266 }
267 } 267 }
268 } 268 }
269 269
270 TouchTab* TouchTabStrip::GetTabAtTabDataIndex(int tab_data_index) const { 270 TouchTab* TouchTabStrip::GetTabAtTabDataIndex(int tab_data_index) const {
271 return static_cast<TouchTab*>(base_tab_at_tab_index(tab_data_index)); 271 return static_cast<TouchTab*>(base_tab_at_tab_index(tab_data_index));
272 } 272 }
273 273
274 // Retrieves the Tab at the specified *model* index.
275 TouchTab* TouchTabStrip::GetTouchTabAtModelIndex(int model_index) const {
276 return static_cast<TouchTab*>(GetBaseTabAtModelIndex(model_index));
277 }
278
274 //////////////////////////////////////////////////////////////////////////////// 279 ////////////////////////////////////////////////////////////////////////////////
275 // TouchTabStrip, private: 280 // TouchTabStrip, private:
276 281
277 void TouchTabStrip::Init() { 282 void TouchTabStrip::Init() {
278 set_id(VIEW_ID_TAB_STRIP); 283 set_id(VIEW_ID_TAB_STRIP);
279 } 284 }
280 285
281 //////////////////////////////////////////////////////////////////////////////// 286 ////////////////////////////////////////////////////////////////////////////////
282 // TouchTabStrip, views::View overrides, private: 287 // TouchTabStrip, views::View overrides, private:
283 288
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 last_tapped_view_ = view; 358 last_tapped_view_ = view;
354 return ui::TOUCH_STATUS_UNKNOWN; 359 return ui::TOUCH_STATUS_UNKNOWN;
355 } 360 }
356 361
357 void TouchTabStrip::ViewHierarchyChanged(bool is_add, 362 void TouchTabStrip::ViewHierarchyChanged(bool is_add,
358 View* parent, 363 View* parent,
359 View* child) { 364 View* child) {
360 if (!is_add && last_tapped_view_ == child) 365 if (!is_add && last_tapped_view_ == child)
361 last_tapped_view_ = NULL; 366 last_tapped_view_ = NULL;
362 } 367 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/touch/tabs/touch_tab_strip.h ('k') | chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698