OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/tabs/tab_strip_gtk.h" | 5 #include "chrome/browser/gtk/tabs/tab_strip_gtk.h" |
6 | 6 |
| 7 #include "app/l10n_util.h" |
7 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
8 #include "app/slide_animation.h" | 9 #include "app/slide_animation.h" |
9 #include "base/gfx/gtk_util.h" | 10 #include "base/gfx/gtk_util.h" |
10 #include "base/gfx/point.h" | 11 #include "base/gfx/point.h" |
11 #include "chrome/browser/browser.h" | 12 #include "chrome/browser/browser.h" |
12 #include "chrome/browser/gtk/tabs/tab_button_gtk.h" | 13 #include "chrome/browser/gtk/tabs/tab_button_gtk.h" |
13 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
14 #include "chrome/common/gfx/chrome_canvas.h" | 15 #include "chrome/common/gfx/chrome_canvas.h" |
15 #include "chrome/common/l10n_util.h" | |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 const int kDefaultAnimationDurationMs = 100; | 21 const int kDefaultAnimationDurationMs = 100; |
22 const int kResizeLayoutAnimationDurationMs = 166; | 22 const int kResizeLayoutAnimationDurationMs = 166; |
23 const int kReorderAnimationDurationMs = 166; | 23 const int kReorderAnimationDurationMs = 166; |
24 const int kAnimateToBoundsDurationMs = 150; | 24 const int kAnimateToBoundsDurationMs = 150; |
25 | 25 |
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 return TabStripModel::kNoTab; | 1471 return TabStripModel::kNoTab; |
1472 } | 1472 } |
1473 | 1473 |
1474 int TabStripGtk::NormalizeIndexToAttachedTabStrip(int index) { | 1474 int TabStripGtk::NormalizeIndexToAttachedTabStrip(int index) { |
1475 if (index >= model_->count()) | 1475 if (index >= model_->count()) |
1476 return model_->count() - 1; | 1476 return model_->count() - 1; |
1477 if (index == TabStripModel::kNoTab) | 1477 if (index == TabStripModel::kNoTab) |
1478 return 0; | 1478 return 0; |
1479 return index; | 1479 return index; |
1480 } | 1480 } |
OLD | NEW |