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

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

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Rebased Created 4 years, 7 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
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/slider.h" 5 #include "ui/views/controls/slider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 orientation_(orientation), 60 orientation_(orientation),
61 value_(0.f), 61 value_(0.f),
62 keyboard_increment_(0.1f), 62 keyboard_increment_(0.1f),
63 animating_value_(0.f), 63 animating_value_(0.f),
64 value_is_valid_(false), 64 value_is_valid_(false),
65 accessibility_events_enabled_(true), 65 accessibility_events_enabled_(true),
66 focus_border_color_(0), 66 focus_border_color_(0),
67 bar_active_images_(kBarImagesActive), 67 bar_active_images_(kBarImagesActive),
68 bar_disabled_images_(kBarImagesDisabled) { 68 bar_disabled_images_(kBarImagesDisabled) {
69 EnableCanvasFlippingForRTLUI(true); 69 EnableCanvasFlippingForRTLUI(true);
70 #if defined(OS_MACOSX)
71 SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
72 #else
70 SetFocusBehavior(FocusBehavior::ALWAYS); 73 SetFocusBehavior(FocusBehavior::ALWAYS);
74 #endif
75
71 UpdateState(true); 76 UpdateState(true);
72 } 77 }
73 78
74 Slider::~Slider() { 79 Slider::~Slider() {
75 } 80 }
76 81
77 void Slider::SetValue(float value) { 82 void Slider::SetValue(float value) {
78 SetValueInternal(value, VALUE_CHANGED_BY_API); 83 SetValueInternal(value, VALUE_CHANGED_BY_API);
79 } 84 }
80 85
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (listener_) 368 if (listener_)
364 listener_->SliderDragStarted(this); 369 listener_->SliderDragStarted(this);
365 } 370 }
366 371
367 void Slider::OnSliderDragEnded() { 372 void Slider::OnSliderDragEnded() {
368 if (listener_) 373 if (listener_)
369 listener_->SliderDragEnded(this); 374 listener_->SliderDragEnded(this);
370 } 375 }
371 376
372 } // namespace views 377 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698