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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip_layout.cc

Issue 1545153002: Switch to standard integer types in chrome/browser/ui/views/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/views/tabs/tab_strip_layout.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip_layout.h"
6 6
7 #include <stddef.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 10
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
11 13
12 namespace { 14 namespace {
13 15
14 // Calculates the size for normal tabs. 16 // Calculates the size for normal tabs.
15 // |is_active_tab_normal| is true if the active tab is a normal tab, if false 17 // |is_active_tab_normal| is true if the active tab is a normal tab, if false
16 // the active tab is not in the set of normal tabs. 18 // the active tab is not in the set of normal tabs.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (expand_width_count > 0 && (!is_active || give_extra_space_to_active)) { 124 if (expand_width_count > 0 && (!is_active || give_extra_space_to_active)) {
123 ++width; 125 ++width;
124 --expand_width_count; 126 --expand_width_count;
125 } 127 }
126 tabs_bounds[i].SetRect(next_x, 0, width, tab_size_info.max_size.height()); 128 tabs_bounds[i].SetRect(next_x, 0, width, tab_size_info.max_size.height());
127 next_x += tabs_bounds[i].width() - tab_size_info.tab_overlap; 129 next_x += tabs_bounds[i].width() - tab_size_info.tab_overlap;
128 } 130 }
129 131
130 return tabs_bounds; 132 return tabs_bounds;
131 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/tabs/tab_strip_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698