Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: views/controls/single_split_view.cc

Issue 6312156: Change includes of gfx/* to ui/gfx/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/controls/single_split_view.h" 5 #include "views/controls/single_split_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #endif 9 #endif
10 10
11 #include "gfx/canvas.h"
12 #include "skia/ext/skia_utils_win.h" 11 #include "skia/ext/skia_utils_win.h"
12 #include "ui/gfx/canvas.h"
13 #include "views/background.h" 13 #include "views/background.h"
14 14
15 #if defined(OS_LINUX) 15 #if defined(OS_LINUX)
16 #include "gfx/gtk_util.h" 16 #include "ui/gfx/gtk_util.h"
17 #endif 17 #endif
18 18
19 namespace views { 19 namespace views {
20 20
21 // Size of the divider in pixels. 21 // Size of the divider in pixels.
22 static const int kDividerSize = 4; 22 static const int kDividerSize = 4;
23 23
24 SingleSplitView::SingleSplitView(View* leading, 24 SingleSplitView::SingleSplitView(View* leading,
25 View* trailing, 25 View* trailing,
26 Orientation orientation, 26 Orientation orientation,
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 int SingleSplitView::NormalizeDividerOffset(int divider_offset, 238 int SingleSplitView::NormalizeDividerOffset(int divider_offset,
239 const gfx::Rect& bounds) const { 239 const gfx::Rect& bounds) const {
240 int primary_axis_size = GetPrimaryAxisSize(bounds.width(), bounds.height()); 240 int primary_axis_size = GetPrimaryAxisSize(bounds.width(), bounds.height());
241 if (divider_offset < 0) 241 if (divider_offset < 0)
242 return (primary_axis_size - kDividerSize) / 2; 242 return (primary_axis_size - kDividerSize) / 2;
243 return std::min(divider_offset, 243 return std::min(divider_offset,
244 std::max(primary_axis_size - kDividerSize, 0)); 244 std::max(primary_axis_size - kDividerSize, 0));
245 } 245 }
246 246
247 } // namespace views 247 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/scrollbar/bitmap_scroll_bar.cc ('k') | views/controls/slider/native_slider_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698