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

Side by Side Diff: views/controls/scrollbar/native_scroll_bar_views.cc

Issue 8143021: aura: Fix views_unittests on linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed textfield tests changes Created 9 years, 2 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) 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 "views/controls/scrollbar/native_scroll_bar_views.h" 5 #include "views/controls/scrollbar/native_scroll_bar_views.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/keycodes/keyboard_codes.h" 8 #include "ui/base/keycodes/keyboard_codes.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/canvas_skia.h" 10 #include "ui/gfx/canvas_skia.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 bounds.set_height(thumb->GetPreferredSize().height()); 377 bounds.set_height(thumb->GetPreferredSize().height());
378 } else { 378 } else {
379 bounds.set_y(bounds.y() + size.height()); 379 bounds.set_y(bounds.y() + size.height());
380 bounds.set_height(std::max(0, bounds.height() - 2 * size.height())); 380 bounds.set_height(std::max(0, bounds.height() - 2 * size.height()));
381 bounds.set_width(thumb->GetPreferredSize().width()); 381 bounds.set_width(thumb->GetPreferredSize().width());
382 } 382 }
383 383
384 return bounds; 384 return bounds;
385 } 385 }
386 386
387 #if !defined(TOOLKIT_USES_GTK)
388 ////////////////////////////////////////////////////////////////////////////////
389 // NativewScrollBarWrapper, public:
390
391 // static
392 NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper(
393 NativeScrollBar* scroll_bar) {
394 return new NativeScrollBarViews(scroll_bar);
395 }
396
397 // static
398 int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() {
399 return 20;
400 }
401
402 // static
403 int NativeScrollBarWrapper::GetVerticalScrollBarWidth() {
404 return 20;
405 }
406 #endif
407
387 } // namespace views 408 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/scrollbar/native_scroll_bar.cc ('k') | views/controls/scrollbar/native_scroll_bar_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698