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

Side by Side Diff: ui/base/win/events_win.cc

Issue 10830293: Fixes bug where Env/RootWindow would cache the wrong button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/events.h ('k') | ui/base/x/events_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) 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 #include <windowsx.h> 5 #include <windowsx.h>
6 6
7 #include "ui/base/events.h" 7 #include "ui/base/events.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) { 218 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
219 return KeyboardCodeForWindowsKeyCode(native_event.wParam); 219 return KeyboardCodeForWindowsKeyCode(native_event.wParam);
220 } 220 }
221 221
222 bool IsMouseEvent(const base::NativeEvent& native_event) { 222 bool IsMouseEvent(const base::NativeEvent& native_event) {
223 return IsClientMouseEvent(native_event) || 223 return IsClientMouseEvent(native_event) ||
224 IsNonClientMouseEvent(native_event); 224 IsNonClientMouseEvent(native_event);
225 } 225 }
226 226
227 int GetChangedMouseButtonFlagsFromNative(
228 const base::NativeEvent& native_event) {
229 // TODO(sky): implement me.
230 return 0;
231 }
232
227 int GetMouseWheelOffset(const base::NativeEvent& native_event) { 233 int GetMouseWheelOffset(const base::NativeEvent& native_event) {
228 DCHECK(native_event.message == WM_MOUSEWHEEL); 234 DCHECK(native_event.message == WM_MOUSEWHEEL);
229 return GET_WHEEL_DELTA_WPARAM(native_event.wParam); 235 return GET_WHEEL_DELTA_WPARAM(native_event.wParam);
230 } 236 }
231 237
232 int GetTouchId(const base::NativeEvent& xev) { 238 int GetTouchId(const base::NativeEvent& xev) {
233 NOTIMPLEMENTED(); 239 NOTIMPLEMENTED();
234 return 0; 240 return 0;
235 } 241 }
236 242
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // Windows emulates mouse messages for touch events. 324 // Windows emulates mouse messages for touch events.
319 bool IsMouseEventFromTouch(UINT message) { 325 bool IsMouseEventFromTouch(UINT message) {
320 return (message == WM_MOUSEMOVE || 326 return (message == WM_MOUSEMOVE ||
321 message == WM_LBUTTONDOWN || message == WM_LBUTTONUP || 327 message == WM_LBUTTONDOWN || message == WM_LBUTTONUP ||
322 message == WM_RBUTTONDOWN || message == WM_RBUTTONUP) && 328 message == WM_RBUTTONDOWN || message == WM_RBUTTONUP) &&
323 (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == 329 (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) ==
324 MOUSEEVENTF_FROMTOUCH; 330 MOUSEEVENTF_FROMTOUCH;
325 } 331 }
326 332
327 } // namespace ui 333 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/events.h ('k') | ui/base/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698