| OLD | NEW |
| 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 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 5 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windowsx.h> | 8 #include <windowsx.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 23 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 24 #include "chrome/browser/ui/tabs/tab_strip_selection_model.h" | 24 #include "chrome/browser/ui/tabs/tab_strip_selection_model.h" |
| 25 #include "chrome/browser/ui/view_ids.h" | 25 #include "chrome/browser/ui/view_ids.h" |
| 26 #include "chrome/browser/ui/views/tabs/tab.h" | 26 #include "chrome/browser/ui/views/tabs/tab.h" |
| 27 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" | 27 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" |
| 28 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" | 28 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" |
| 29 #include "chrome/browser/ui/views/tabs/touch_tab_strip_layout.h" | 29 #include "chrome/browser/ui/views/tabs/touch_tab_strip_layout.h" |
| 30 #include "content/public/browser/user_metrics.h" | 30 #include "content/public/browser/user_metrics.h" |
| 31 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
| 32 #include "grit/theme_resources.h" | 32 #include "grit/theme_resources.h" |
| 33 #include "grit/theme_resources_standard.h" | |
| 34 #include "ui/base/accessibility/accessible_view_state.h" | 33 #include "ui/base/accessibility/accessible_view_state.h" |
| 35 #include "ui/base/animation/animation_container.h" | 34 #include "ui/base/animation/animation_container.h" |
| 36 #include "ui/base/animation/throb_animation.h" | 35 #include "ui/base/animation/throb_animation.h" |
| 37 #include "ui/base/dragdrop/drag_drop_types.h" | 36 #include "ui/base/dragdrop/drag_drop_types.h" |
| 38 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 39 #include "ui/base/layout.h" | 38 #include "ui/base/layout.h" |
| 40 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
| 41 #include "ui/gfx/canvas.h" | 40 #include "ui/gfx/canvas.h" |
| 42 #include "ui/gfx/path.h" | 41 #include "ui/gfx/path.h" |
| 43 #include "ui/gfx/screen.h" | 42 #include "ui/gfx/screen.h" |
| (...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2335 | 2334 |
| 2336 int mini_tab_count = GetMiniTabCount(); | 2335 int mini_tab_count = GetMiniTabCount(); |
| 2337 int normal_count = tab_count() - mini_tab_count; | 2336 int normal_count = tab_count() - mini_tab_count; |
| 2338 if (normal_count == 0 || normal_count == mini_tab_count) | 2337 if (normal_count == 0 || normal_count == mini_tab_count) |
| 2339 return false; | 2338 return false; |
| 2340 int x = GetStartXForNormalTabs(); | 2339 int x = GetStartXForNormalTabs(); |
| 2341 int available_width = width() - x - new_tab_button_width(); | 2340 int available_width = width() - x - new_tab_button_width(); |
| 2342 return (Tab::GetTouchWidth() * normal_count + | 2341 return (Tab::GetTouchWidth() * normal_count + |
| 2343 tab_h_offset() * (normal_count - 1)) > available_width; | 2342 tab_h_offset() * (normal_count - 1)) > available_width; |
| 2344 } | 2343 } |
| OLD | NEW |