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

Unified Diff: ui/events/event.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/devices/x11/device_list_cache_x11.h ('k') | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index 49be333ba8e6ecd9d91419c5dd4204ef67457d0f..5c1b108f1220b4adca2fdeb8abf79b42ff1ebbd7 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -6,12 +6,14 @@
#define UI_EVENTS_EVENT_H_
#include <stdint.h>
+
+#include <memory>
+
#include "base/compiler_specific.h"
#include "base/event_types.h"
#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "ui/events/event_constants.h"
#include "ui/events/gesture_event_details.h"
@@ -42,11 +44,11 @@ enum class DomCode;
class Event;
class MouseWheelEvent;
-using ScopedEvent = scoped_ptr<Event>;
+using ScopedEvent = std::unique_ptr<Event>;
class EVENTS_EXPORT Event {
public:
- static scoped_ptr<Event> Clone(const Event& event);
+ static std::unique_ptr<Event> Clone(const Event& event);
virtual ~Event();
@@ -859,7 +861,7 @@ class EVENTS_EXPORT KeyEvent : public Event {
// native HWNDs or XEvents. And we can't reliably send those native data
// types across mojo types in a cross-platform way. So instead, we set the
// resulting data when read across IPC boundaries.
- void SetExtendedKeyEventData(scoped_ptr<ExtendedKeyEventData> data);
+ void SetExtendedKeyEventData(std::unique_ptr<ExtendedKeyEventData> data);
const ExtendedKeyEventData* extended_key_event_data() const {
return extended_key_event_data_.get();
}
@@ -972,7 +974,7 @@ class EVENTS_EXPORT KeyEvent : public Event {
// windows and linux implementations of web_input_event in content/). Because
// mojo instead serializes and deserializes events in potentially different
// processes, we need to have a mechanism to keep track of this data.
- scoped_ptr<ExtendedKeyEventData> extended_key_event_data_;
+ std::unique_ptr<ExtendedKeyEventData> extended_key_event_data_;
static bool IsRepeated(const KeyEvent& event);
« no previous file with comments | « ui/events/devices/x11/device_list_cache_x11.h ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698