| 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/image/image_skia.h" | 41 #include "ui/gfx/image/image_skia.h" |
| 43 #include "ui/gfx/image/image_skia_operations.h" | 42 #include "ui/gfx/image/image_skia_operations.h" |
| (...skipping 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2342 | 2341 |
| 2343 int mini_tab_count = GetMiniTabCount(); | 2342 int mini_tab_count = GetMiniTabCount(); |
| 2344 int normal_count = tab_count() - mini_tab_count; | 2343 int normal_count = tab_count() - mini_tab_count; |
| 2345 if (normal_count == 0 || normal_count == mini_tab_count) | 2344 if (normal_count == 0 || normal_count == mini_tab_count) |
| 2346 return false; | 2345 return false; |
| 2347 int x = GetStartXForNormalTabs(); | 2346 int x = GetStartXForNormalTabs(); |
| 2348 int available_width = width() - x - new_tab_button_width(); | 2347 int available_width = width() - x - new_tab_button_width(); |
| 2349 return (Tab::GetTouchWidth() * normal_count + | 2348 return (Tab::GetTouchWidth() * normal_count + |
| 2350 tab_h_offset() * (normal_count - 1)) > available_width; | 2349 tab_h_offset() * (normal_count - 1)) > available_width; |
| 2351 } | 2350 } |
| OLD | NEW |