summaryrefslogtreecommitdiffstats
path: root/win8/metro_driver
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-18 09:51:48 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-18 09:51:48 +0000
commit1a5e3901ef561f89f84b8e0eaac3f4d239223674 (patch)
treeafe291aca2d30ab1bb5afa59d9062af89e9ea4c8 /win8/metro_driver
parentde0e3b33be5a951fd6852d3ae02236f15a908d6b (diff)
downloadchromium_src-1a5e3901ef561f89f84b8e0eaac3f4d239223674.zip
chromium_src-1a5e3901ef561f89f84b8e0eaac3f4d239223674.tar.gz
chromium_src-1a5e3901ef561f89f84b8e0eaac3f4d239223674.tar.bz2
Makes metro-ash set windows key state when dispatching events.
By doing this we ensure any where in chrome (such as tooltips) that query for keyboard state using windows api get consistent results for metro-ash. BUG=306048 TEST=none R=ananta@chromium.org Review URL: https://codereview.chromium.org/26990004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8/metro_driver')
-rw-r--r--win8/metro_driver/chrome_app_view_ash.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc
index e39118b..cffb043 100644
--- a/win8/metro_driver/chrome_app_view_ash.cc
+++ b/win8/metro_driver/chrome_app_view_ash.cc
@@ -80,7 +80,8 @@ void MetroExit() {
class ChromeChannelListener : public IPC::Listener {
public:
ChromeChannelListener(base::MessageLoop* ui_loop, ChromeAppViewAsh* app_view)
- : ui_proxy_(ui_loop->message_loop_proxy()), app_view_(app_view) {}
+ : ui_proxy_(ui_loop->message_loop_proxy()),
+ app_view_(app_view) {}
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
IPC_BEGIN_MESSAGE_MAP(ChromeChannelListener, message)
@@ -177,13 +178,13 @@ bool WaitForChromeIPCConnection(const std::string& channel_name) {
// This class helps decoding the pointer properties of an event.
class PointerInfoHandler {
public:
- PointerInfoHandler() :
- x_(0),
- y_(0),
- wheel_delta_(0),
- update_kind_(winui::Input::PointerUpdateKind_Other),
- timestamp_(0),
- pointer_id_(0) {}
+ PointerInfoHandler()
+ : x_(0),
+ y_(0),
+ wheel_delta_(0),
+ update_kind_(winui::Input::PointerUpdateKind_Other),
+ timestamp_(0),
+ pointer_id_(0) {}
HRESULT Init(winui::Core::IPointerEventArgs* args) {
HRESULT hr = args->get_CurrentPoint(&pointer_point_);
@@ -712,6 +713,7 @@ HRESULT ChromeAppViewAsh::OnPointerPressed(
return hr;
if (pointer.IsMouse()) {
+ // TODO: this is wrong, more than one pointer may be down at a time.
mouse_down_flags_ = pointer.flags();
ui_channel_->Send(new MetroViewerHostMsg_MouseButton(
pointer.x(),
@@ -739,6 +741,7 @@ HRESULT ChromeAppViewAsh::OnPointerReleased(
return hr;
if (pointer.IsMouse()) {
+ // TODO: this is wrong, more than one pointer may be down at a time.
mouse_down_flags_ = ui::EF_NONE;
ui_channel_->Send(new MetroViewerHostMsg_MouseButton(
pointer.x(),