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

Side by Side Diff: ui/aura/test/event_generator.cc

Issue 23477022: Two changes to desktop aura for tooltips: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2013 Created 7 years, 3 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/aura/test/event_generator.h ('k') | ui/views/corewm/tooltip_controller.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/test/event_generator.h" 5 #include "ui/aura/test/event_generator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 void EventGenerator::PressRightButton() { 140 void EventGenerator::PressRightButton() {
141 PressButton(ui::EF_RIGHT_MOUSE_BUTTON); 141 PressButton(ui::EF_RIGHT_MOUSE_BUTTON);
142 } 142 }
143 143
144 void EventGenerator::ReleaseRightButton() { 144 void EventGenerator::ReleaseRightButton() {
145 ReleaseButton(ui::EF_RIGHT_MOUSE_BUTTON); 145 ReleaseButton(ui::EF_RIGHT_MOUSE_BUTTON);
146 } 146 }
147 147
148 void EventGenerator::SendMouseExit() {
149 gfx::Point exit_location(current_location_);
150 ConvertPointToTarget(current_root_window_, &exit_location);
151 ui::MouseEvent mouseev(ui::ET_MOUSE_EXITED, exit_location, exit_location,
152 flags_);
153 Dispatch(&mouseev);
154 }
155
148 void EventGenerator::MoveMouseToInHost(const gfx::Point& point_in_host) { 156 void EventGenerator::MoveMouseToInHost(const gfx::Point& point_in_host) {
149 const ui::EventType event_type = (flags_ & ui::EF_LEFT_MOUSE_BUTTON) ? 157 const ui::EventType event_type = (flags_ & ui::EF_LEFT_MOUSE_BUTTON) ?
150 ui::ET_MOUSE_DRAGGED : ui::ET_MOUSE_MOVED; 158 ui::ET_MOUSE_DRAGGED : ui::ET_MOUSE_MOVED;
151 ui::MouseEvent mouseev(event_type, point_in_host, point_in_host, flags_); 159 ui::MouseEvent mouseev(event_type, point_in_host, point_in_host, flags_);
152 Dispatch(&mouseev); 160 Dispatch(&mouseev);
153 161
154 current_location_ = point_in_host; 162 current_location_ = point_in_host;
155 current_root_window_->ConvertPointFromHost(&current_location_); 163 current_root_window_->ConvertPointFromHost(&current_location_);
156 } 164 }
157 165
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 base::MessageLoopProxy::current()->PostTask( 572 base::MessageLoopProxy::current()->PostTask(
565 FROM_HERE, 573 FROM_HERE,
566 base::Bind(&EventGenerator::DispatchNextPendingEvent, 574 base::Bind(&EventGenerator::DispatchNextPendingEvent,
567 base::Unretained(this))); 575 base::Unretained(this)));
568 } 576 }
569 } 577 }
570 578
571 579
572 } // namespace test 580 } // namespace test
573 } // namespace aura 581 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/event_generator.h ('k') | ui/views/corewm/tooltip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698