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

Side by Side Diff: ui/aura/remote_root_window_host_win.cc

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 years 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/app_list/views/apps_grid_view_unittest.cc ('k') | ui/aura/root_window.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 "ui/aura/remote_root_window_host_win.h" 5 #include "ui/aura/remote_root_window_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 480 }
481 host_->Send(new MetroViewerHostMsg_ImeTextInputClientUpdated( 481 host_->Send(new MetroViewerHostMsg_ImeTextInputClientUpdated(
482 input_scopes, character_bounds)); 482 input_scopes, character_bounds));
483 } 483 }
484 484
485 void RemoteRootWindowHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) { 485 void RemoteRootWindowHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
486 if (ignore_mouse_moves_until_set_cursor_ack_) 486 if (ignore_mouse_moves_until_set_cursor_ack_)
487 return; 487 return;
488 488
489 gfx::Point location(x, y); 489 gfx::Point location(x, y);
490 ui::MouseEvent event(ui::ET_MOUSE_MOVED, location, location, flags); 490 ui::MouseEvent event(ui::ET_MOUSE_MOVED, location, location, flags, 0);
491 delegate_->OnHostMouseEvent(&event); 491 delegate_->OnHostMouseEvent(&event);
492 } 492 }
493 493
494 void RemoteRootWindowHostWin::OnMouseButton( 494 void RemoteRootWindowHostWin::OnMouseButton(
495 int32 x, 495 int32 x,
496 int32 y, 496 int32 y,
497 int32 extra, 497 int32 extra,
498 ui::EventType type, 498 ui::EventType type,
499 ui::EventFlags flags) { 499 ui::EventFlags flags) {
500 gfx::Point location(x, y); 500 gfx::Point location(x, y);
501 ui::MouseEvent mouse_event(type, location, location, flags); 501 // TODO: this needs to pass in changed flags.
502 ui::MouseEvent mouse_event(type, location, location, flags, 0);
502 503
503 SetEventFlags(flags | key_event_flags()); 504 SetEventFlags(flags | key_event_flags());
504 if (type == ui::ET_MOUSEWHEEL) { 505 if (type == ui::ET_MOUSEWHEEL) {
505 ui::MouseWheelEvent wheel_event(mouse_event, 0, extra); 506 ui::MouseWheelEvent wheel_event(mouse_event, 0, extra);
506 delegate_->OnHostMouseEvent(&wheel_event); 507 delegate_->OnHostMouseEvent(&wheel_event);
507 } else if (type == ui::ET_MOUSE_PRESSED) { 508 } else if (type == ui::ET_MOUSE_PRESSED) {
508 // TODO(shrikant): Ideally modify code in event.cc by adding automatic 509 // TODO(shrikant): Ideally modify code in event.cc by adding automatic
509 // tracking of double clicks in synthetic MouseEvent constructor code. 510 // tracking of double clicks in synthetic MouseEvent constructor code.
510 // Non-synthetic MouseEvent constructor code does automatically track 511 // Non-synthetic MouseEvent constructor code does automatically track
511 // this. Need to use some caution while modifying synthetic constructor 512 // this. Need to use some caution while modifying synthetic constructor
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 } 713 }
713 714
714 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { 715 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) {
715 if (flags == event_flags_) 716 if (flags == event_flags_)
716 return; 717 return;
717 event_flags_ = flags; 718 event_flags_ = flags;
718 SetVirtualKeyStates(event_flags_); 719 SetVirtualKeyStates(event_flags_);
719 } 720 }
720 721
721 } // namespace aura 722 } // namespace aura
OLDNEW
« no previous file with comments | « ui/app_list/views/apps_grid_view_unittest.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698