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

Side by Side Diff: ui/views/controls/button/custom_button.cc

Issue 1963563002: Views: Flip default value of CustomButton::request_focus_on_press_ to false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/controls/button/label_button.cc » ('j') | 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/button/custom_button.h" 5 #include "ui/views/controls/button/custom_button.h"
6 6
7 #include "ui/accessibility/ax_view_state.h" 7 #include "ui/accessibility/ax_view_state.h"
8 #include "ui/base/material_design/material_design_controller.h" 8 #include "ui/base/material_design/material_design_controller.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/event_utils.h" 10 #include "ui/events/event_utils.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 //////////////////////////////////////////////////////////////////////////////// 431 ////////////////////////////////////////////////////////////////////////////////
432 // CustomButton, protected: 432 // CustomButton, protected:
433 433
434 CustomButton::CustomButton(ButtonListener* listener) 434 CustomButton::CustomButton(ButtonListener* listener)
435 : Button(listener), 435 : Button(listener),
436 state_(STATE_NORMAL), 436 state_(STATE_NORMAL),
437 hover_animation_(this), 437 hover_animation_(this),
438 animate_on_state_change_(true), 438 animate_on_state_change_(true),
439 is_throbbing_(false), 439 is_throbbing_(false),
440 triggerable_event_flags_(ui::EF_LEFT_MOUSE_BUTTON), 440 triggerable_event_flags_(ui::EF_LEFT_MOUSE_BUTTON),
441 request_focus_on_press_(true), 441 request_focus_on_press_(false),
442 ink_drop_delegate_(nullptr), 442 ink_drop_delegate_(nullptr),
443 notify_action_(NOTIFY_ON_RELEASE), 443 notify_action_(NOTIFY_ON_RELEASE),
444 has_ink_drop_action_on_click_(false), 444 has_ink_drop_action_on_click_(false),
445 ink_drop_action_on_click_(InkDropState::ACTION_TRIGGERED), 445 ink_drop_action_on_click_(InkDropState::ACTION_TRIGGERED),
446 hide_ink_drop_when_showing_context_menu_(true), 446 hide_ink_drop_when_showing_context_menu_(true),
447 ink_drop_base_color_(gfx::kPlaceholderColor), 447 ink_drop_base_color_(gfx::kPlaceholderColor),
448 md_focus_ring_(nullptr) { 448 md_focus_ring_(nullptr) {
449 hover_animation_.SetSlideDuration(kHoverFadeDurationMs); 449 hover_animation_.SetSlideDuration(kHoverFadeDurationMs);
450 } 450 }
451 451
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 Button::NotifyClick(event); 508 Button::NotifyClick(event);
509 } 509 }
510 510
511 void CustomButton::OnClickCanceled(const ui::Event& event) { 511 void CustomButton::OnClickCanceled(const ui::Event& event) {
512 if (ink_drop_delegate()) 512 if (ink_drop_delegate())
513 ink_drop_delegate()->OnAction(views::InkDropState::HIDDEN); 513 ink_drop_delegate()->OnAction(views::InkDropState::HIDDEN);
514 Button::OnClickCanceled(event); 514 Button::OnClickCanceled(event);
515 } 515 }
516 516
517 } // namespace views 517 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698