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

Side by Side Diff: ui/events/event_utils.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/events/event_utils.h" 5 #include "ui/events/event_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ui/gfx/display.h" 9 #include "ui/gfx/display.h"
10 #include "ui/gfx/screen.h" 10 #include "ui/gfx/screen.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 case ET_TOUCH_RELEASED: 46 case ET_TOUCH_RELEASED:
47 case ET_TOUCH_PRESSED: 47 case ET_TOUCH_PRESSED:
48 case ET_TOUCH_MOVED: 48 case ET_TOUCH_MOVED:
49 case ET_TOUCH_CANCELLED: 49 case ET_TOUCH_CANCELLED:
50 event.reset(new TouchEvent(native_event)); 50 event.reset(new TouchEvent(native_event));
51 break; 51 break;
52 52
53 default: 53 default:
54 break; 54 break;
55 } 55 }
56 return event.Pass(); 56 return event;
57 } 57 }
58 58
59 int RegisterCustomEventType() { 59 int RegisterCustomEventType() {
60 return ++g_custom_event_types; 60 return ++g_custom_event_types;
61 } 61 }
62 62
63 base::TimeDelta EventTimeForNow() { 63 base::TimeDelta EventTimeForNow() {
64 return base::TimeDelta::FromInternalValue( 64 return base::TimeDelta::FromInternalValue(
65 base::TimeTicks::Now().ToInternalValue()); 65 base::TimeTicks::Now().ToInternalValue());
66 } 66 }
(...skipping 11 matching lines...) Expand all
78 const std::vector<gfx::Display>& displays = screen->GetAllDisplays(); 78 const std::vector<gfx::Display>& displays = screen->GetAllDisplays();
79 for (std::vector<gfx::Display>::const_iterator it = displays.begin(); 79 for (std::vector<gfx::Display>::const_iterator it = displays.begin();
80 it != displays.end(); ++it) { 80 it != displays.end(); ++it) {
81 if (it->IsInternal()) 81 if (it->IsInternal())
82 return it->touch_support(); 82 return it->touch_support();
83 } 83 }
84 return gfx::Display::TOUCH_SUPPORT_UNAVAILABLE; 84 return gfx::Display::TOUCH_SUPPORT_UNAVAILABLE;
85 } 85 }
86 86
87 } // namespace ui 87 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/event_processor_unittest.cc ('k') | ui/events/gesture_detection/motion_event_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698