summaryrefslogtreecommitdiff
path: root/chromium/ui/events/android
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/events/android')
-rw-r--r--chromium/ui/events/android/drag_event_android.cc9
-rw-r--r--chromium/ui/events/android/event_handler_android.cc2
-rw-r--r--chromium/ui/events/android/event_handler_android.h4
-rw-r--r--chromium/ui/events/android/gesture_event_android.cc6
-rw-r--r--chromium/ui/events/android/gesture_event_type.h6
-rw-r--r--chromium/ui/events/android/key_event_utils.h2
-rw-r--r--chromium/ui/events/android/keyboard_hook_android.cc4
7 files changed, 19 insertions, 14 deletions
diff --git a/chromium/ui/events/android/drag_event_android.cc b/chromium/ui/events/android/drag_event_android.cc
index f7343f01ebe..ebcc699713a 100644
--- a/chromium/ui/events/android/drag_event_android.cc
+++ b/chromium/ui/events/android/drag_event_android.cc
@@ -3,6 +3,9 @@
// found in the LICENSE file.
#include "ui/events/android/drag_event_android.h"
+
+#include <memory>
+
#include "base/android/jni_android.h"
using base::android::ScopedJavaLocalRef;
@@ -43,9 +46,9 @@ std::unique_ptr<DragEventAndroid> DragEventAndroid::CreateFor(
gfx::PointF new_screen_location =
new_location + (screen_location_f() - location_f());
JNIEnv* env = AttachCurrentThread();
- return std::unique_ptr<DragEventAndroid>(
- new DragEventAndroid(env, action_, new_location, new_screen_location,
- mime_types_, content_.obj()));
+ return std::make_unique<DragEventAndroid>(env, action_, new_location,
+ new_screen_location, mime_types_,
+ content_.obj());
}
} // namespace ui
diff --git a/chromium/ui/events/android/event_handler_android.cc b/chromium/ui/events/android/event_handler_android.cc
index e74e3e15211..ea6f2572b0b 100644
--- a/chromium/ui/events/android/event_handler_android.cc
+++ b/chromium/ui/events/android/event_handler_android.cc
@@ -52,7 +52,7 @@ bool EventHandlerAndroid::ScrollTo(float x, float y) {
void EventHandlerAndroid::OnSizeChanged() {}
void EventHandlerAndroid::OnPhysicalBackingSizeChanged(
- base::Optional<base::TimeDelta> deadline_override) {}
+ absl::optional<base::TimeDelta> deadline_override) {}
void EventHandlerAndroid::OnBrowserControlsHeightChanged() {}
diff --git a/chromium/ui/events/android/event_handler_android.h b/chromium/ui/events/android/event_handler_android.h
index 99bb3959897..8ac2e143aee 100644
--- a/chromium/ui/events/android/event_handler_android.h
+++ b/chromium/ui/events/android/event_handler_android.h
@@ -5,8 +5,8 @@
#ifndef UI_EVENTS_ANDROID_EVENT_HANDLER_ANDROID_H_
#define UI_EVENTS_ANDROID_EVENT_HANDLER_ANDROID_H_
-#include "base/optional.h"
#include "base/time/time.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/events/events_export.h"
namespace gfx {
@@ -35,7 +35,7 @@ class EVENTS_EXPORT EventHandlerAndroid {
virtual bool OnGestureEvent(const GestureEventAndroid& event);
virtual void OnSizeChanged();
virtual void OnPhysicalBackingSizeChanged(
- base::Optional<base::TimeDelta> deadline_override);
+ absl::optional<base::TimeDelta> deadline_override);
virtual void OnBrowserControlsHeightChanged();
virtual void OnControlsResizeViewChanged();
diff --git a/chromium/ui/events/android/gesture_event_android.cc b/chromium/ui/events/android/gesture_event_android.cc
index fcd298da3bf..64b18324642 100644
--- a/chromium/ui/events/android/gesture_event_android.cc
+++ b/chromium/ui/events/android/gesture_event_android.cc
@@ -4,6 +4,8 @@
#include "ui/events/android/gesture_event_android.h"
+#include <memory>
+
#include "ui/gfx/geometry/point_f.h"
namespace ui {
@@ -39,10 +41,10 @@ std::unique_ptr<GestureEventAndroid> GestureEventAndroid::CreateFor(
const gfx::PointF& new_location) const {
auto offset = new_location - location_;
gfx::PointF new_screen_location = screen_location_ + offset;
- return std::unique_ptr<GestureEventAndroid>(new GestureEventAndroid(
+ return std::make_unique<GestureEventAndroid>(
type_, new_location, new_screen_location, time_ms_, scale_, delta_x_,
delta_y_, velocity_x_, velocity_y_, target_viewport_, synthetic_scroll_,
- prevent_boosting_));
+ prevent_boosting_);
}
} // namespace ui
diff --git a/chromium/ui/events/android/gesture_event_type.h b/chromium/ui/events/android/gesture_event_type.h
index f92af979dc1..e4d3550be5e 100644
--- a/chromium/ui/events/android/gesture_event_type.h
+++ b/chromium/ui/events/android/gesture_event_type.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_ANDROID_GESTURE_EVENT_TYPE_H_
-#define UI_ANDROID_GESTURE_EVENT_TYPE_H_
+#ifndef UI_EVENTS_ANDROID_GESTURE_EVENT_TYPE_H_
+#define UI_EVENTS_ANDROID_GESTURE_EVENT_TYPE_H_
namespace ui {
@@ -36,4 +36,4 @@ enum GestureEventType {
} // namespace ui
-#endif // UI_ANDROID_GESTURE_EVENT_TYPE_H_
+#endif // UI_EVENTS_ANDROID_GESTURE_EVENT_TYPE_H_
diff --git a/chromium/ui/events/android/key_event_utils.h b/chromium/ui/events/android/key_event_utils.h
index a47ee8eb7e8..3e4705b329e 100644
--- a/chromium/ui/events/android/key_event_utils.h
+++ b/chromium/ui/events/android/key_event_utils.h
@@ -26,4 +26,4 @@ EVENTS_EXPORT int GetKeyEventUnicodeChar(
} // namespace events
} // namespace ui
-#endif // UI_EVENTS_ANDROID_KEY_EVENT_UTISL_H_
+#endif // UI_EVENTS_ANDROID_KEY_EVENT_UTILS_H_
diff --git a/chromium/ui/events/android/keyboard_hook_android.cc b/chromium/ui/events/android/keyboard_hook_android.cc
index 31937535ffc..6ee96cf1e3a 100644
--- a/chromium/ui/events/android/keyboard_hook_android.cc
+++ b/chromium/ui/events/android/keyboard_hook_android.cc
@@ -7,7 +7,7 @@
#include <memory>
#include "base/callback.h"
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/gfx/native_widget_types.h"
@@ -15,7 +15,7 @@ namespace ui {
// static
std::unique_ptr<KeyboardHook> KeyboardHook::CreateModifierKeyboardHook(
- base::Optional<base::flat_set<DomCode>> dom_codes,
+ absl::optional<base::flat_set<DomCode>> dom_codes,
gfx::AcceleratedWidget accelerated_widget,
KeyboardHook::KeyEventCallback callback) {
return nullptr;