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

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

Issue 1467403002: Move Windows DC-initialization to skia_utils_win.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-metafile-from-device
Patch Set: Rebase again Created 5 years 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
« no previous file with comments | « ui/views/background.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/views/controls/single_split_view.h" 5 #include "ui/views/controls/single_split_view.h"
6 6
7 #include "skia/ext/skia_utils_win.h"
8 #include "ui/accessibility/ax_view_state.h" 7 #include "ui/accessibility/ax_view_state.h"
9 #include "ui/base/cursor/cursor.h" 8 #include "ui/base/cursor/cursor.h"
10 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
11 #include "ui/views/background.h" 10 #include "ui/views/background.h"
12 #include "ui/views/controls/single_split_view_listener.h" 11 #include "ui/views/controls/single_split_view_listener.h"
13 #include "ui/views/native_cursor.h" 12 #include "ui/views/native_cursor.h"
14 13
14 #if defined(OS_WIN)
15 #include "skia/ext/skia_utils_win.h"
16 #endif
17
15 namespace views { 18 namespace views {
16 19
17 // static 20 // static
18 const char SingleSplitView::kViewClassName[] = "SingleSplitView"; 21 const char SingleSplitView::kViewClassName[] = "SingleSplitView";
19 22
20 // Size of the divider in pixels. 23 // Size of the divider in pixels.
21 static const int kDividerSize = 4; 24 static const int kDividerSize = 4;
22 25
23 SingleSplitView::SingleSplitView(View* leading, 26 SingleSplitView::SingleSplitView(View* leading,
24 View* trailing, 27 View* trailing,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 const gfx::Rect& bounds) const { 247 const gfx::Rect& bounds) const {
245 int primary_axis_size = GetPrimaryAxisSize(bounds.width(), bounds.height()); 248 int primary_axis_size = GetPrimaryAxisSize(bounds.width(), bounds.height());
246 if (divider_offset < 0) 249 if (divider_offset < 0)
247 // primary_axis_size may < GetDividerSize during initial layout. 250 // primary_axis_size may < GetDividerSize during initial layout.
248 return std::max(0, (primary_axis_size - GetDividerSize()) / 2); 251 return std::max(0, (primary_axis_size - GetDividerSize()) / 2);
249 return std::min(divider_offset, 252 return std::min(divider_offset,
250 std::max(primary_axis_size - GetDividerSize(), 0)); 253 std::max(primary_axis_size - GetDividerSize(), 0));
251 } 254 }
252 255
253 } // namespace views 256 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/background.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698