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

Side by Side Diff: ui/views/widget/native_widget_win.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/views/widget/native_widget_delegate.h ('k') | ui/views/widget/root_view.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/views/widget/native_widget_win.h" 5 #include "ui/views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 TrackMouseEvents((message == WM_NCMOUSEMOVE) ? 1643 TrackMouseEvents((message == WM_NCMOUSEMOVE) ?
1644 TME_NONCLIENT | TME_LEAVE : TME_LEAVE); 1644 TME_NONCLIENT | TME_LEAVE : TME_LEAVE);
1645 } else if (event.type() == ui::ET_MOUSE_EXITED) { 1645 } else if (event.type() == ui::ET_MOUSE_EXITED) {
1646 // Reset our tracking flags so future mouse movement over this 1646 // Reset our tracking flags so future mouse movement over this
1647 // NativeWidgetWin results in a new tracking session. Fall through for 1647 // NativeWidgetWin results in a new tracking session. Fall through for
1648 // OnMouseEvent. 1648 // OnMouseEvent.
1649 active_mouse_tracking_flags_ = 0; 1649 active_mouse_tracking_flags_ = 0;
1650 } else if (event.type() == ui::ET_MOUSEWHEEL) { 1650 } else if (event.type() == ui::ET_MOUSEWHEEL) {
1651 // Reroute the mouse wheel to the window under the pointer if applicable. 1651 // Reroute the mouse wheel to the window under the pointer if applicable.
1652 return (ui::RerouteMouseWheel(hwnd(), w_param, l_param) || 1652 return (ui::RerouteMouseWheel(hwnd(), w_param, l_param) ||
1653 delegate_->OnMouseEvent(MouseWheelEvent(msg))) ? 0 : 1; 1653 delegate_->OnMouseEvent(ui::MouseWheelEvent(msg))) ? 0 : 1;
1654 } 1654 }
1655 1655
1656 bool handled = delegate_->OnMouseEvent(event); 1656 bool handled = delegate_->OnMouseEvent(event);
1657 1657
1658 if (!handled && message == WM_NCLBUTTONDOWN && w_param != HTSYSMENU && 1658 if (!handled && message == WM_NCLBUTTONDOWN && w_param != HTSYSMENU &&
1659 !GetWidget()->ShouldUseNativeFrame()) { 1659 !GetWidget()->ShouldUseNativeFrame()) {
1660 // TODO(msw): Eliminate undesired painting, or re-evaluate this workaround. 1660 // TODO(msw): Eliminate undesired painting, or re-evaluate this workaround.
1661 // DefWindowProc for WM_NCLBUTTONDOWN does weird non-client painting, so we 1661 // DefWindowProc for WM_NCLBUTTONDOWN does weird non-client painting, so we
1662 // need to call it inside a ScopedRedrawLock. This may cause other negative 1662 // need to call it inside a ScopedRedrawLock. This may cause other negative
1663 // side-effects (ex/ stifling non-client mouse releases). 1663 // side-effects (ex/ stifling non-client mouse releases).
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2770 // static 2770 // static
2771 bool NativeWidgetPrivate::IsTouchDown() { 2771 bool NativeWidgetPrivate::IsTouchDown() {
2772 // This currently isn't necessary because we're not generating touch events on 2772 // This currently isn't necessary because we're not generating touch events on
2773 // windows. When we do, this will need to be updated. 2773 // windows. When we do, this will need to be updated.
2774 return false; 2774 return false;
2775 } 2775 }
2776 2776
2777 } // namespace internal 2777 } // namespace internal
2778 2778
2779 } // namespace views 2779 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_delegate.h ('k') | ui/views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698