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 131853005: Merge 244295 "Ensure that trackpad and trackpoint scrolling work..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700_72/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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 LPARAM l_param, 856 LPARAM l_param,
858 LRESULT* result) { 857 LRESULT* result) {
859 return false; 858 return false;
860 } 859 }
861 860
862 void NativeWidgetWin::PostHandleMSG(UINT message, 861 void NativeWidgetWin::PostHandleMSG(UINT message,
863 WPARAM w_param, 862 WPARAM w_param,
864 LPARAM l_param) { 863 LPARAM l_param) {
865 } 864 }
866 865
866 bool NativeWidgetWin::HandleScrollEvent(const ui::ScrollEvent& event) {
867 delegate_->OnScrollEvent(const_cast<ui::ScrollEvent*>(&event));
868 return event.handled();
869 }
870
867 //////////////////////////////////////////////////////////////////////////////// 871 ////////////////////////////////////////////////////////////////////////////////
868 // NativeWidgetWin, private: 872 // NativeWidgetWin, private:
869 873
870 void NativeWidgetWin::SetInitParams(const Widget::InitParams& params) { 874 void NativeWidgetWin::SetInitParams(const Widget::InitParams& params) {
871 // Set non-style attributes. 875 // Set non-style attributes.
872 ownership_ = params.ownership; 876 ownership_ = params.ownership;
873 877
874 ConfigureWindowStyles(message_handler_.get(), params, 878 ConfigureWindowStyles(message_handler_.get(), params,
875 GetWidget()->widget_delegate(), delegate_); 879 GetWidget()->widget_delegate(), delegate_);
876 880
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 // static 1059 // static
1056 bool NativeWidgetPrivate::IsTouchDown() { 1060 bool NativeWidgetPrivate::IsTouchDown() {
1057 // This currently isn't necessary because we're not generating touch events on 1061 // This currently isn't necessary because we're not generating touch events on
1058 // windows. When we do, this will need to be updated. 1062 // windows. When we do, this will need to be updated.
1059 return false; 1063 return false;
1060 } 1064 }
1061 1065
1062 } // namespace internal 1066 } // namespace internal
1063 1067
1064 } // namespace views 1068 } // 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