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

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

Issue 133053004: Ensure that trackpad and trackpoint scrolling works on Windows desktop Aura with legacy trackpad dr… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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_win.h ('k') | ui/views/win/hwnd_message_handler.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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 1/gfx::win::GetDeviceScaleFactor(), 0.0, 762 1/gfx::win::GetDeviceScaleFactor(), 0.0,
763 0.0, 1/gfx::win::GetDeviceScaleFactor(), 763 0.0, 1/gfx::win::GetDeviceScaleFactor(),
764 0.0, 0.0); 764 0.0, 0.0);
765 if (event.IsMouseWheelEvent()) { 765 if (event.IsMouseWheelEvent()) {
766 ui::MouseWheelEvent dpi_event( 766 ui::MouseWheelEvent dpi_event(
767 static_cast<const ui::MouseWheelEvent&>(event)); 767 static_cast<const ui::MouseWheelEvent&>(event));
768 dpi_event.UpdateForRootTransform(scale_transform); 768 dpi_event.UpdateForRootTransform(scale_transform);
769 delegate_->OnMouseEvent(&dpi_event); 769 delegate_->OnMouseEvent(&dpi_event);
770 return dpi_event.handled(); 770 return dpi_event.handled();
771 } else if (event.IsMouseEvent()) { 771 } else if (event.IsMouseEvent()) {
772 CHECK(!event.IsScrollEvent()); // Scroll events don't happen in Windows.
773 ui::MouseEvent dpi_event(event); 772 ui::MouseEvent dpi_event(event);
774 if (!(dpi_event.flags() & ui::EF_IS_NON_CLIENT)) 773 if (!(dpi_event.flags() & ui::EF_IS_NON_CLIENT))
775 dpi_event.UpdateForRootTransform(scale_transform); 774 dpi_event.UpdateForRootTransform(scale_transform);
776 delegate_->OnMouseEvent(&dpi_event); 775 delegate_->OnMouseEvent(&dpi_event);
777 return dpi_event.handled(); 776 return dpi_event.handled();
778 } 777 }
779 NOTREACHED(); 778 NOTREACHED();
780 return false; 779 return false;
781 } 780 }
782 781
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 LPARAM l_param, 859 LPARAM l_param,
861 LRESULT* result) { 860 LRESULT* result) {
862 return false; 861 return false;
863 } 862 }
864 863
865 void NativeWidgetWin::PostHandleMSG(UINT message, 864 void NativeWidgetWin::PostHandleMSG(UINT message,
866 WPARAM w_param, 865 WPARAM w_param,
867 LPARAM l_param) { 866 LPARAM l_param) {
868 } 867 }
869 868
869 bool NativeWidgetWin::HandleScrollEvent(const ui::ScrollEvent& event) {
870 delegate_->OnScrollEvent(const_cast<ui::ScrollEvent*>(&event));
871 return event.handled();
872 }
873
870 //////////////////////////////////////////////////////////////////////////////// 874 ////////////////////////////////////////////////////////////////////////////////
871 // NativeWidgetWin, private: 875 // NativeWidgetWin, private:
872 876
873 void NativeWidgetWin::SetInitParams(const Widget::InitParams& params) { 877 void NativeWidgetWin::SetInitParams(const Widget::InitParams& params) {
874 // Set non-style attributes. 878 // Set non-style attributes.
875 ownership_ = params.ownership; 879 ownership_ = params.ownership;
876 880
877 ConfigureWindowStyles(message_handler_.get(), params, 881 ConfigureWindowStyles(message_handler_.get(), params,
878 GetWidget()->widget_delegate(), delegate_); 882 GetWidget()->widget_delegate(), delegate_);
879 883
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 // static 1057 // static
1054 bool NativeWidgetPrivate::IsTouchDown() { 1058 bool NativeWidgetPrivate::IsTouchDown() {
1055 // This currently isn't necessary because we're not generating touch events on 1059 // This currently isn't necessary because we're not generating touch events on
1056 // windows. When we do, this will need to be updated. 1060 // windows. When we do, this will need to be updated.
1057 return false; 1061 return false;
1058 } 1062 }
1059 1063
1060 } // namespace internal 1064 } // namespace internal
1061 1065
1062 } // namespace views 1066 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.h ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698