| OLD | NEW | 
|   1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |   1 // Copyright (c) 2011 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 "aura/desktop_host_win.h" |   5 #include "aura/desktop_host_win.h" | 
|   6  |   6  | 
|   7 #include "aura/desktop.h" |   7 #include "aura/desktop.h" | 
|   8 #include "aura/event.h" |   8 #include "aura/event.h" | 
|   9 #include "base/message_loop.h" |   9 #include "base/message_loop.h" | 
|  10  |  10  | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  50 void DesktopHostWin::OnClose() { |  50 void DesktopHostWin::OnClose() { | 
|  51   // TODO: this obviously shouldn't be here. |  51   // TODO: this obviously shouldn't be here. | 
|  52   MessageLoopForUI::current()->Quit(); |  52   MessageLoopForUI::current()->Quit(); | 
|  53 } |  53 } | 
|  54  |  54  | 
|  55 LRESULT DesktopHostWin::OnMouseRange(UINT message, |  55 LRESULT DesktopHostWin::OnMouseRange(UINT message, | 
|  56                                      WPARAM w_param, |  56                                      WPARAM w_param, | 
|  57                                      LPARAM l_param) { |  57                                      LPARAM l_param) { | 
|  58   MSG msg = { hwnd(), message, w_param, l_param, 0, |  58   MSG msg = { hwnd(), message, w_param, l_param, 0, | 
|  59               { GET_X_LPARAM(l_param), GET_Y_LPARAM(l_param) } }; |  59               { GET_X_LPARAM(l_param), GET_Y_LPARAM(l_param) } }; | 
|  60   SetMsgHandled(desktop_->OnMouseEvent(MouseEvent(msg))); |  60   MouseEvent event(msg); | 
 |  61   bool handled = false; | 
 |  62   if (!(event.flags() & ui::EF_IS_NON_CLIENT)) | 
 |  63     handled = desktop_->OnMouseEvent(event); | 
 |  64   SetMsgHandled(handled); | 
|  61   return 0; |  65   return 0; | 
|  62 } |  66 } | 
|  63  |  67  | 
|  64 void DesktopHostWin::OnPaint(HDC dc) { |  68 void DesktopHostWin::OnPaint(HDC dc) { | 
|  65   if (desktop_) |  69   if (desktop_) | 
|  66     desktop_->Draw(); |  70     desktop_->Draw(); | 
|  67   ValidateRect(hwnd(), NULL); |  71   ValidateRect(hwnd(), NULL); | 
|  68 } |  72 } | 
|  69  |  73  | 
|  70 }  // namespace aura |  74 }  // namespace aura | 
| OLD | NEW |