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

Side by Side Diff: views/events/event.cc

Issue 8113028: Consolidate ui::NativeEvent and base::NativeEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync/resolve Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « views/events/event.h ('k') | views/events/event_x.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/events/event.h" 5 #include "views/events/event.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "views/view.h" 8 #include "views/view.h"
9 #include "views/widget/root_view.h" 9 #include "views/widget/root_view.h"
10 10
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 button = ui::EF_RIGHT_BUTTON_DOWN; 236 button = ui::EF_RIGHT_BUTTON_DOWN;
237 else if (touch.identity() == 2) 237 else if (touch.identity() == 2)
238 button = ui::EF_MIDDLE_BUTTON_DOWN; 238 button = ui::EF_MIDDLE_BUTTON_DOWN;
239 set_flags(new_flags | button); 239 set_flags(new_flags | button);
240 } 240 }
241 241
242 //////////////////////////////////////////////////////////////////////////////// 242 ////////////////////////////////////////////////////////////////////////////////
243 // MouseWheelEvent, public: 243 // MouseWheelEvent, public:
244 244
245 #if !defined(USE_AURA) 245 #if !defined(USE_AURA)
246 MouseWheelEvent::MouseWheelEvent(const ui::NativeEvent& native_event) 246 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event)
247 : MouseEvent(native_event), 247 : MouseEvent(native_event),
248 offset_(ui::GetMouseWheelOffset(native_event)) { 248 offset_(ui::GetMouseWheelOffset(native_event)) {
249 } 249 }
250 #endif 250 #endif
251 251
252 //////////////////////////////////////////////////////////////////////////////// 252 ////////////////////////////////////////////////////////////////////////////////
253 // TouchEvent, public: 253 // TouchEvent, public:
254 254
255 TouchEvent::TouchEvent(ui::EventType type, 255 TouchEvent::TouchEvent(ui::EventType type,
256 int x, 256 int x,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 292
293 //////////////////////////////////////////////////////////////////////////////// 293 ////////////////////////////////////////////////////////////////////////////////
294 // MouseWheelEvent, public: 294 // MouseWheelEvent, public:
295 295
296 // This value matches windows WHEEL_DELTA. 296 // This value matches windows WHEEL_DELTA.
297 // static 297 // static
298 const int MouseWheelEvent::kWheelDelta = 120; 298 const int MouseWheelEvent::kWheelDelta = 120;
299 299
300 } // namespace views 300 } // namespace views
OLDNEW
« no previous file with comments | « views/events/event.h ('k') | views/events/event_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698