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

Side by Side Diff: ui/events/test/test_event_processor.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
« no previous file with comments | « ui/events/test/test_event_processor.h ('k') | ui/events/test/test_event_target.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/events/test/test_event_processor.h" 5 #include "ui/events/test/test_event_processor.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ui/events/event_target.h" 9 #include "ui/events/event_target.h"
10 10
11 namespace ui { 11 namespace ui {
12 namespace test { 12 namespace test {
13 13
14 TestEventProcessor::TestEventProcessor() 14 TestEventProcessor::TestEventProcessor()
15 : should_processing_occur_(true), 15 : should_processing_occur_(true),
16 num_times_processing_started_(0), 16 num_times_processing_started_(0),
17 num_times_processing_finished_(0) { 17 num_times_processing_finished_(0) {
18 } 18 }
19 19
20 TestEventProcessor::~TestEventProcessor() {} 20 TestEventProcessor::~TestEventProcessor() {}
21 21
22 void TestEventProcessor::SetRoot(scoped_ptr<EventTarget> root) { 22 void TestEventProcessor::SetRoot(std::unique_ptr<EventTarget> root) {
23 root_ = std::move(root); 23 root_ = std::move(root);
24 } 24 }
25 25
26 void TestEventProcessor::Reset() { 26 void TestEventProcessor::Reset() {
27 should_processing_occur_ = true; 27 should_processing_occur_ = true;
28 num_times_processing_started_ = 0; 28 num_times_processing_started_ = 0;
29 num_times_processing_finished_ = 0; 29 num_times_processing_finished_ = 0;
30 } 30 }
31 31
32 bool TestEventProcessor::CanDispatchToTarget(EventTarget* target) { 32 bool TestEventProcessor::CanDispatchToTarget(EventTarget* target) {
(...skipping 13 matching lines...) Expand all
46 if (!should_processing_occur_) 46 if (!should_processing_occur_)
47 event->SetHandled(); 47 event->SetHandled();
48 } 48 }
49 49
50 void TestEventProcessor::OnEventProcessingFinished(Event* event) { 50 void TestEventProcessor::OnEventProcessingFinished(Event* event) {
51 num_times_processing_finished_++; 51 num_times_processing_finished_++;
52 } 52 }
53 53
54 } // namespace test 54 } // namespace test
55 } // namespace ui 55 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/test/test_event_processor.h ('k') | ui/events/test/test_event_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698