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

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

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/event_unittest.cc ('k') | ui/events/event_utils.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 #ifndef UI_EVENTS_EVENT_UTILS_H_ 5 #ifndef UI_EVENTS_EVENT_UTILS_H_
6 #define UI_EVENTS_EVENT_UTILS_H_ 6 #define UI_EVENTS_EVENT_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/event_types.h" 12 #include "base/event_types.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "ui/events/event.h" 15 #include "ui/events/event.h"
15 #include "ui/events/event_constants.h" 16 #include "ui/events/event_constants.h"
16 #include "ui/events/events_export.h" 17 #include "ui/events/events_export.h"
17 #include "ui/events/keycodes/keyboard_codes.h" 18 #include "ui/events/keycodes/keyboard_codes.h"
18 #include "ui/gfx/display.h" 19 #include "ui/gfx/display.h"
19 #include "ui/gfx/native_widget_types.h" 20 #include "ui/gfx/native_widget_types.h"
20 21
21 #if defined(OS_WIN) 22 #if defined(OS_WIN)
(...skipping 14 matching lines...) Expand all
36 37
37 class Event; 38 class Event;
38 class MouseEvent; 39 class MouseEvent;
39 enum class DomCode; 40 enum class DomCode;
40 41
41 // Updates the list of devices for cached properties. 42 // Updates the list of devices for cached properties.
42 EVENTS_EXPORT void UpdateDeviceList(); 43 EVENTS_EXPORT void UpdateDeviceList();
43 44
44 // Returns a ui::Event wrapping a native event. Ownership of the returned value 45 // Returns a ui::Event wrapping a native event. Ownership of the returned value
45 // is transferred to the caller. 46 // is transferred to the caller.
46 EVENTS_EXPORT scoped_ptr<Event> EventFromNative( 47 EVENTS_EXPORT std::unique_ptr<Event> EventFromNative(
47 const base::NativeEvent& native_event); 48 const base::NativeEvent& native_event);
48 49
49 // Get the EventType from a native event. 50 // Get the EventType from a native event.
50 EVENTS_EXPORT EventType EventTypeFromNative( 51 EVENTS_EXPORT EventType EventTypeFromNative(
51 const base::NativeEvent& native_event); 52 const base::NativeEvent& native_event);
52 53
53 // Get the EventFlags from a native event. 54 // Get the EventFlags from a native event.
54 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event); 55 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
55 56
56 // Get the timestamp from a native event. 57 // Get the timestamp from a native event.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Update the native X11 event to correspond to the new button flags. 174 // Update the native X11 event to correspond to the new button flags.
174 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); 175 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event);
175 #endif 176 #endif
176 177
177 // Registers a custom event type. 178 // Registers a custom event type.
178 EVENTS_EXPORT int RegisterCustomEventType(); 179 EVENTS_EXPORT int RegisterCustomEventType();
179 180
180 } // namespace ui 181 } // namespace ui
181 182
182 #endif // UI_EVENTS_EVENT_UTILS_H_ 183 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/event_unittest.cc ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698