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

Side by Side Diff: ui/touch_selection/touch_selection_controller.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/touch_selection/touch_selection_controller.h" 5 #include "ui/touch_selection/touch_selection_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 10
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 void TouchSelectionController::OnHandleTapped(const TouchHandle& handle) { 424 void TouchSelectionController::OnHandleTapped(const TouchHandle& handle) {
425 if (insertion_handle_ && &handle == insertion_handle_.get()) 425 if (insertion_handle_ && &handle == insertion_handle_.get())
426 client_->OnSelectionEvent(INSERTION_HANDLE_TAPPED); 426 client_->OnSelectionEvent(INSERTION_HANDLE_TAPPED);
427 } 427 }
428 428
429 void TouchSelectionController::SetNeedsAnimate() { 429 void TouchSelectionController::SetNeedsAnimate() {
430 client_->SetNeedsAnimate(); 430 client_->SetNeedsAnimate();
431 } 431 }
432 432
433 scoped_ptr<TouchHandleDrawable> TouchSelectionController::CreateDrawable() { 433 std::unique_ptr<TouchHandleDrawable>
434 TouchSelectionController::CreateDrawable() {
434 return client_->CreateDrawable(); 435 return client_->CreateDrawable();
435 } 436 }
436 437
437 base::TimeDelta TouchSelectionController::GetMaxTapDuration() const { 438 base::TimeDelta TouchSelectionController::GetMaxTapDuration() const {
438 return config_.max_tap_duration; 439 return config_.max_tap_duration;
439 } 440 }
440 441
441 bool TouchSelectionController::IsAdaptiveHandleOrientationEnabled() const { 442 bool TouchSelectionController::IsAdaptiveHandleOrientationEnabled() const {
442 return config_.enable_adaptive_handle_orientation; 443 return config_.enable_adaptive_handle_orientation;
443 } 444 }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 base::TimeDelta duration = base::TimeTicks::Now() - selection_start_time_; 690 base::TimeDelta duration = base::TimeTicks::Now() - selection_start_time_;
690 UMA_HISTOGRAM_CUSTOM_TIMES("Event.TouchSelection.WasDraggedDuration", 691 UMA_HISTOGRAM_CUSTOM_TIMES("Event.TouchSelection.WasDraggedDuration",
691 duration, 692 duration,
692 base::TimeDelta::FromMilliseconds(500), 693 base::TimeDelta::FromMilliseconds(500),
693 base::TimeDelta::FromSeconds(60), 694 base::TimeDelta::FromSeconds(60),
694 60); 695 60);
695 } 696 }
696 } 697 }
697 698
698 } // namespace ui 699 } // namespace ui
OLDNEW
« no previous file with comments | « ui/touch_selection/touch_selection_controller.h ('k') | ui/touch_selection/touch_selection_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698