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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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
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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 break; 372 break;
373 } 373 }
374 } 374 }
375 375
376 void CustomButton::VisibilityChanged(View* starting_from, bool visible) { 376 void CustomButton::VisibilityChanged(View* starting_from, bool visible) {
377 if (state_ == STATE_DISABLED) 377 if (state_ == STATE_DISABLED)
378 return; 378 return;
379 SetState(visible && ShouldEnterHoveredState() ? STATE_HOVERED : STATE_NORMAL); 379 SetState(visible && ShouldEnterHoveredState() ? STATE_HOVERED : STATE_NORMAL);
380 } 380 }
381 381
382 scoped_ptr<InkDropHover> CustomButton::CreateInkDropHover() const { 382 std::unique_ptr<InkDropHover> CustomButton::CreateInkDropHover() const {
383 return ShouldShowInkDropHover() ? Button::CreateInkDropHover() : nullptr; 383 return ShouldShowInkDropHover() ? Button::CreateInkDropHover() : nullptr;
384 } 384 }
385 385
386 SkColor CustomButton::GetInkDropBaseColor() const { 386 SkColor CustomButton::GetInkDropBaseColor() const {
387 return ink_drop_base_color_; 387 return ink_drop_base_color_;
388 } 388 }
389 389
390 //////////////////////////////////////////////////////////////////////////////// 390 ////////////////////////////////////////////////////////////////////////////////
391 // CustomButton, gfx::AnimationDelegate implementation: 391 // CustomButton, gfx::AnimationDelegate implementation:
392 392
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 Button::NotifyClick(event); 504 Button::NotifyClick(event);
505 } 505 }
506 506
507 void CustomButton::OnClickCanceled(const ui::Event& event) { 507 void CustomButton::OnClickCanceled(const ui::Event& event) {
508 if (ink_drop_delegate()) 508 if (ink_drop_delegate())
509 ink_drop_delegate()->OnAction(views::InkDropState::HIDDEN); 509 ink_drop_delegate()->OnAction(views::InkDropState::HIDDEN);
510 Button::OnClickCanceled(event); 510 Button::OnClickCanceled(event);
511 } 511 }
512 512
513 } // namespace views 513 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/controls/button/custom_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698