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

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

Issue 27058004: Use WindowActivated message instead of VisibilityChanged message to determine that Ash is the activ… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r229418 Created 7 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 | « ui/aura/remote_root_window_host_win.h ('k') | ui/metro_viewer/metro_viewer_messages.h » ('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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) { 152 bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
153 bool handled = true; 153 bool handled = true;
154 IPC_BEGIN_MESSAGE_MAP(RemoteRootWindowHostWin, message) 154 IPC_BEGIN_MESSAGE_MAP(RemoteRootWindowHostWin, message)
155 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved) 155 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved)
156 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton) 156 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton)
157 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown) 157 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown)
158 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyUp, OnKeyUp) 158 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyUp, OnKeyUp)
159 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_Character, OnChar) 159 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_Character, OnChar)
160 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_VisibilityChanged, 160 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_WindowActivated,
161 OnVisibilityChanged) 161 OnWindowActivated)
162 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchDown, 162 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchDown,
163 OnTouchDown) 163 OnTouchDown)
164 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchUp, 164 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchUp,
165 OnTouchUp) 165 OnTouchUp)
166 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchMoved, 166 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchMoved,
167 OnTouchMoved) 167 OnTouchMoved)
168 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_FileSaveAsDone, 168 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_FileSaveAsDone,
169 OnFileSaveAsDone) 169 OnFileSaveAsDone)
170 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_FileOpenDone, 170 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_FileOpenDone,
171 OnFileOpenDone) 171 OnFileOpenDone)
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 } 464 }
465 465
466 void RemoteRootWindowHostWin::OnChar(uint32 key_code, 466 void RemoteRootWindowHostWin::OnChar(uint32 key_code,
467 uint32 repeat_count, 467 uint32 repeat_count,
468 uint32 scan_code, 468 uint32 scan_code,
469 uint32 flags) { 469 uint32 flags) {
470 DispatchKeyboardMessage(ui::ET_KEY_PRESSED, key_code, repeat_count, 470 DispatchKeyboardMessage(ui::ET_KEY_PRESSED, key_code, repeat_count,
471 scan_code, flags, true); 471 scan_code, flags, true);
472 } 472 }
473 473
474 void RemoteRootWindowHostWin::OnVisibilityChanged(bool visible) { 474 void RemoteRootWindowHostWin::OnWindowActivated() {
475 if (visible) 475 delegate_->OnHostActivated();
476 delegate_->OnHostActivated();
477 } 476 }
478 477
479 void RemoteRootWindowHostWin::OnTouchDown(int32 x, 478 void RemoteRootWindowHostWin::OnTouchDown(int32 x,
480 int32 y, 479 int32 y,
481 uint64 timestamp, 480 uint64 timestamp,
482 uint32 pointer_id) { 481 uint32 pointer_id) {
483 ui::TouchEvent event(ui::ET_TOUCH_PRESSED, 482 ui::TouchEvent event(ui::ET_TOUCH_PRESSED,
484 gfx::Point(x, y), 483 gfx::Point(x, y),
485 pointer_id, 484 pointer_id,
486 base::TimeDelta::FromMicroseconds(timestamp)); 485 base::TimeDelta::FromMicroseconds(timestamp));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 } 585 }
587 586
588 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { 587 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) {
589 if (flags == event_flags_) 588 if (flags == event_flags_)
590 return; 589 return;
591 event_flags_ = flags; 590 event_flags_ = flags;
592 SetVirtualKeyStates(event_flags_); 591 SetVirtualKeyStates(event_flags_);
593 } 592 }
594 593
595 } // namespace aura 594 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/remote_root_window_host_win.h ('k') | ui/metro_viewer/metro_viewer_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698