OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/tabs/tab_strip.h" | 5 #include "chrome/browser/views/tabs/tab_strip.h" |
6 | 6 |
7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
8 #include "app/gfx/canvas.h" | 8 #include "app/gfx/canvas.h" |
9 #include "app/gfx/path.h" | 9 #include "app/gfx/path.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
11 #include "app/os_exchange_data.h" | 11 #include "app/os_exchange_data.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "app/slide_animation.h" | 13 #include "app/slide_animation.h" |
14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
15 #include "app/win_util.h" | 15 #include "app/win_util.h" |
16 #endif | 16 #endif |
17 #include "base/gfx/size.h" | 17 #include "base/gfx/size.h" |
18 #include "base/stl_util-inl.h" | 18 #include "base/stl_util-inl.h" |
19 #include "chrome/browser/browser_theme_provider.h" | 19 #include "chrome/browser/browser_theme_provider.h" |
20 #include "chrome/browser/metrics/user_metrics.h" | 20 #include "chrome/browser/metrics/user_metrics.h" |
21 #include "chrome/browser/profile.h" | 21 #include "chrome/browser/profile.h" |
22 #include "chrome/browser/tab_contents/tab_contents.h" | 22 #include "chrome/browser/tab_contents/tab_contents.h" |
23 #include "chrome/browser/tabs/tab_strip_model.h" | 23 #include "chrome/browser/tabs/tab_strip_model.h" |
24 #include "chrome/browser/view_ids.h" | 24 #include "chrome/browser/view_ids.h" |
25 #include "chrome/browser/views/tabs/dragged_tab_controller.h" | 25 #include "chrome/browser/views/tabs/dragged_tab_controller.h" |
26 #include "chrome/browser/views/tabs/tab.h" | 26 #include "chrome/browser/views/tabs/tab.h" |
27 #include "chrome/browser/tab_contents/tab_contents.h" | |
28 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
29 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
30 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
31 #include "views/controls/image_view.h" | 30 #include "views/controls/image_view.h" |
32 #include "views/painter.h" | 31 #include "views/painter.h" |
33 #include "views/widget/default_theme_provider.h" | 32 #include "views/widget/default_theme_provider.h" |
34 #include "views/window/non_client_view.h" | 33 #include "views/window/non_client_view.h" |
35 #include "views/window/window.h" | 34 #include "views/window/window.h" |
36 | 35 |
37 #undef min | 36 #undef min |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 url, GURL(), PageTransition::GENERATED); | 668 url, GURL(), PageTransition::GENERATED); |
670 model_->SelectTabContentsAt(drop_index, true); | 669 model_->SelectTabContentsAt(drop_index, true); |
671 } | 670 } |
672 | 671 |
673 return GetDropEffect(event); | 672 return GetDropEffect(event); |
674 } | 673 } |
675 | 674 |
676 bool TabStrip::GetAccessibleRole(AccessibilityTypes::Role* role) { | 675 bool TabStrip::GetAccessibleRole(AccessibilityTypes::Role* role) { |
677 DCHECK(role); | 676 DCHECK(role); |
678 | 677 |
679 *role = AccessibilityTypes::ROLE_GROUPING; | 678 *role = AccessibilityTypes::ROLE_PAGETABLIST; |
680 return true; | 679 return true; |
681 } | 680 } |
682 | 681 |
683 bool TabStrip::GetAccessibleName(std::wstring* name) { | 682 bool TabStrip::GetAccessibleName(std::wstring* name) { |
684 if (!accessible_name_.empty()) { | 683 if (!accessible_name_.empty()) { |
685 (*name).assign(accessible_name_); | 684 (*name).assign(accessible_name_); |
686 return true; | 685 return true; |
687 } | 686 } |
688 return false; | 687 return false; |
689 } | 688 } |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 &TabStrip::ResizeLayoutTabs), | 1631 &TabStrip::ResizeLayoutTabs), |
1633 kResizeTabsTimeMs); | 1632 kResizeTabsTimeMs); |
1634 } | 1633 } |
1635 } else { | 1634 } else { |
1636 // Mouse moved quickly out of the tab strip and then into it again, so | 1635 // Mouse moved quickly out of the tab strip and then into it again, so |
1637 // cancel the timer so that the strip doesn't move when the mouse moves | 1636 // cancel the timer so that the strip doesn't move when the mouse moves |
1638 // back over it. | 1637 // back over it. |
1639 resize_layout_factory_.RevokeAll(); | 1638 resize_layout_factory_.RevokeAll(); |
1640 } | 1639 } |
1641 } | 1640 } |
OLD | NEW |