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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return static_cast<int>(floor(x + 0.5)); | 89 return static_cast<int>(floor(x + 0.5)); |
90 } | 90 } |
91 | 91 |
92 // Max number of stacked tabs. | 92 // Max number of stacked tabs. |
93 static const int kMaxStackedCount = 4; | 93 static const int kMaxStackedCount = 4; |
94 | 94 |
95 // Padding between stacked tabs. | 95 // Padding between stacked tabs. |
96 static const int kStackedPadding = 6; | 96 static const int kStackedPadding = 6; |
97 | 97 |
98 // See UpdateLayoutTypeFromMouseEvent() for a description of these. | 98 // See UpdateLayoutTypeFromMouseEvent() for a description of these. |
| 99 #if !defined(USE_ASH) |
99 const int kMouseMoveTimeMS = 200; | 100 const int kMouseMoveTimeMS = 200; |
100 const int kMouseMoveCountBeforeConsiderReal = 3; | 101 const int kMouseMoveCountBeforeConsiderReal = 3; |
| 102 #endif |
101 | 103 |
102 // Amount of time we delay before resizing after a close from a touch. | 104 // Amount of time we delay before resizing after a close from a touch. |
103 const int kTouchResizeLayoutTimeMS = 2000; | 105 const int kTouchResizeLayoutTimeMS = 2000; |
104 | 106 |
105 // Horizontal offset for the new tab button to bring it closer to the | 107 // Horizontal offset for the new tab button to bring it closer to the |
106 // rightmost tab. | 108 // rightmost tab. |
107 int newtab_button_h_offset() { | 109 int newtab_button_h_offset() { |
108 static int value = -1; | 110 static int value = -1; |
109 if (value == -1) { | 111 if (value == -1) { |
110 switch (ui::GetDisplayLayout()) { | 112 switch (ui::GetDisplayLayout()) { |
(...skipping 2602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 if (!adjust_layout_) | 2715 if (!adjust_layout_) |
2714 return false; | 2716 return false; |
2715 | 2717 |
2716 #if !defined(OS_CHROMEOS) | 2718 #if !defined(OS_CHROMEOS) |
2717 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) | 2719 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) |
2718 return false; | 2720 return false; |
2719 #endif | 2721 #endif |
2720 | 2722 |
2721 return true; | 2723 return true; |
2722 } | 2724 } |
OLD | NEW |