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

Side by Side Diff: ui/events/ozone/events_ozone.h

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_OZONE_EVENTS_OZONE_H_
6 #define UI_EVENTS_OZONE_EVENTS_OZONE_H_
7
8 #include "base/callback.h"
9 #include "base/event_types.h"
10 #include "ui/events/events_export.h"
11
12 namespace ui {
13
14 class Event;
15
16 // Wrap a "native" ui::Event in another ui::Event & dispatch it.
17 //
18 // This is really unfortunate, but exists for two reasons:
19 //
20 // 1. Some of the ui::Event constructors depend on global state that
21 // is only used when building from a "native" event. For example:
22 // last_click_event_ is used when constructing MouseEvent from
23 // NativeEvent to determine click count.
24 //
25 // 2. Events contain a reference to a "native event", which some code
26 // depends on. The ui::Event might get mutated during dispatch, but
27 // the native event won't. Some code depends on the fact that the
28 // "native" version of the event is unmodified.
29 //
30 // We are trying to fix both of these issues, but in the meantime we
31 // define NativeEvent == ui::Event.
32 //
33 EVENTS_EXPORT void DispatchEventFromNativeUiEvent(
34 const base::NativeEvent& native_event,
35 base::Callback<void(ui::Event*)> callback);
36
37 } // namespace ui
38
39 #endif // UI_EVENTS_OZONE_EVENTS_OZONE_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/touch_noise/touch_noise_finder_unittest.cc ('k') | ui/events/ozone/events_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698