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

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

Issue 10009024: Remove WAYLAND port (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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) 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/scrollbar/native_scroll_bar_views.h" 5 #include "ui/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/path.h" 10 #include "ui/gfx/path.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 bounds.set_height(thumb->GetPreferredSize().height()); 367 bounds.set_height(thumb->GetPreferredSize().height());
368 } else { 368 } else {
369 bounds.set_y(bounds.y() + size.height()); 369 bounds.set_y(bounds.y() + size.height());
370 bounds.set_height(std::max(0, bounds.height() - 2 * size.height())); 370 bounds.set_height(std::max(0, bounds.height() - 2 * size.height()));
371 bounds.set_width(thumb->GetPreferredSize().width()); 371 bounds.set_width(thumb->GetPreferredSize().width());
372 } 372 }
373 373
374 return bounds; 374 return bounds;
375 } 375 }
376 376
377 #if defined(USE_WAYLAND) || defined(USE_AURA) 377 #if defined(USE_AURA)
378 //////////////////////////////////////////////////////////////////////////////// 378 ////////////////////////////////////////////////////////////////////////////////
379 // NativewScrollBarWrapper, public: 379 // NativewScrollBarWrapper, public:
380 380
381 // static 381 // static
382 NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper( 382 NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper(
383 NativeScrollBar* scroll_bar) { 383 NativeScrollBar* scroll_bar) {
384 return new NativeScrollBarViews(scroll_bar); 384 return new NativeScrollBarViews(scroll_bar);
385 } 385 }
386 386
387 // static 387 // static
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 gfx::Size track_size = native_theme->GetPartSize( 421 gfx::Size track_size = native_theme->GetPartSize(
422 gfx::NativeTheme::kScrollbarVerticalThumb, 422 gfx::NativeTheme::kScrollbarVerticalThumb,
423 gfx::NativeTheme::kNormal, 423 gfx::NativeTheme::kNormal,
424 thumb_params); 424 thumb_params);
425 425
426 return std::max(track_size.width(), button_size.width()); 426 return std::max(track_size.width(), button_size.width());
427 } 427 }
428 #endif 428 #endif
429 429
430 } // namespace views 430 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/controls/textfield/native_textfield_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698