OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/views/controls/single_split_view.h" | 5 #include "ui/views/controls/single_split_view.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include "skia/ext/skia_utils_win.h" | 11 #include "skia/ext/skia_utils_win.h" |
12 #include "ui/base/accessibility/accessible_view_state.h" | 12 #include "ui/base/accessibility/accessible_view_state.h" |
13 #include "ui/gfx/canvas.h" | 13 #include "ui/gfx/canvas.h" |
| 14 #include "ui/views/background.h" |
14 #include "ui/views/controls/single_split_view_listener.h" | 15 #include "ui/views/controls/single_split_view_listener.h" |
15 #include "views/background.h" | |
16 | 16 |
17 #if defined(TOOLKIT_USES_GTK) | 17 #if defined(TOOLKIT_USES_GTK) |
18 #include "ui/gfx/gtk_util.h" | 18 #include "ui/gfx/gtk_util.h" |
19 #endif | 19 #endif |
20 | 20 |
21 #if defined(USE_AURA) | 21 #if defined(USE_AURA) |
22 #include "ui/aura/cursor.h" | 22 #include "ui/aura/cursor.h" |
23 #endif | 23 #endif |
24 | 24 |
25 namespace views { | 25 namespace views { |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 const gfx::Rect& bounds) const { | 254 const gfx::Rect& bounds) const { |
255 int primary_axis_size = GetPrimaryAxisSize(bounds.width(), bounds.height()); | 255 int primary_axis_size = GetPrimaryAxisSize(bounds.width(), bounds.height()); |
256 if (divider_offset < 0) | 256 if (divider_offset < 0) |
257 // primary_axis_size may < kDividerSize during initial layout. | 257 // primary_axis_size may < kDividerSize during initial layout. |
258 return std::max(0, (primary_axis_size - kDividerSize) / 2); | 258 return std::max(0, (primary_axis_size - kDividerSize) / 2); |
259 return std::min(divider_offset, | 259 return std::min(divider_offset, |
260 std::max(primary_axis_size - kDividerSize, 0)); | 260 std::max(primary_axis_size - kDividerSize, 0)); |
261 } | 261 } |
262 | 262 |
263 } // namespace views | 263 } // namespace views |
OLD | NEW |