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

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 2914023002: Remove LatencyInfo::sequence_number. (May break metrics).
Patch Set: Rebase Created 3 years, 5 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
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/win/hwnd_message_handler.h" 5 #include "ui/views/win/hwnd_message_handler.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <oleacc.h> 8 #include <oleacc.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <tchar.h> 10 #include <tchar.h>
(...skipping 2669 matching lines...) Expand 10 before | Expand all | Expand 10 after
2680 rotation_angle += 180; 2680 rotation_angle += 180;
2681 2681
2682 ui::TouchEvent event( 2682 ui::TouchEvent event(
2683 event_type, touch_point, event_time, 2683 event_type, touch_point, event_time,
2684 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, pointer_id, 2684 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, pointer_id,
2685 radius_x, radius_y, pressure, 0.0f, 0.0f, 0.0f, 2685 radius_x, radius_y, pressure, 0.0f, 0.0f, 0.0f,
2686 pointer_touch_info.orientation), 2686 pointer_touch_info.orientation),
2687 ui::GetModifiersFromKeyState(), rotation_angle); 2687 ui::GetModifiersFromKeyState(), rotation_angle);
2688 2688
2689 event.latency()->AddLatencyNumberWithTimestamp( 2689 event.latency()->AddLatencyNumberWithTimestamp(
2690 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0, event_time, 1); 2690 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, event_time, 1);
2691 2691
2692 // There are cases where the code handling the message destroys the 2692 // There are cases where the code handling the message destroys the
2693 // window, so use the weak ptr to check if destruction occured or not. 2693 // window, so use the weak ptr to check if destruction occured or not.
2694 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr()); 2694 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr());
2695 delegate_->HandleTouchEvent(event); 2695 delegate_->HandleTouchEvent(event);
2696 2696
2697 if (ref) 2697 if (ref)
2698 SetMsgHandled(TRUE); 2698 SetMsgHandled(TRUE);
2699 return 0; 2699 return 0;
2700 } 2700 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 TouchEvents* touch_events) { 2849 TouchEvents* touch_events) {
2850 ui::TouchEvent event( 2850 ui::TouchEvent event(
2851 event_type, point, time_stamp, 2851 event_type, point, time_stamp,
2852 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, id)); 2852 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, id));
2853 2853
2854 event.set_flags(ui::GetModifiersFromKeyState()); 2854 event.set_flags(ui::GetModifiersFromKeyState());
2855 2855
2856 event.latency()->AddLatencyNumberWithTimestamp( 2856 event.latency()->AddLatencyNumberWithTimestamp(
2857 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 2857 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
2858 0, 2858 0,
2859 0,
2860 time_stamp, 2859 time_stamp,
2861 1); 2860 1);
2862 2861
2863 touch_events->push_back(event); 2862 touch_events->push_back(event);
2864 } 2863 }
2865 2864
2866 bool HWNDMessageHandler::HandleMouseInputForCaption(unsigned int message, 2865 bool HWNDMessageHandler::HandleMouseInputForCaption(unsigned int message,
2867 WPARAM w_param, 2866 WPARAM w_param,
2868 LPARAM l_param) { 2867 LPARAM l_param) {
2869 // If we are receive a WM_NCLBUTTONDOWN messsage for the caption, the 2868 // If we are receive a WM_NCLBUTTONDOWN messsage for the caption, the
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 MONITORINFO monitor_info = {sizeof(monitor_info)}; 2995 MONITORINFO monitor_info = {sizeof(monitor_info)};
2997 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), 2996 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY),
2998 &monitor_info); 2997 &monitor_info);
2999 gfx::Rect shrunk_rect(monitor_info.rcMonitor); 2998 gfx::Rect shrunk_rect(monitor_info.rcMonitor);
3000 shrunk_rect.set_height(shrunk_rect.height() - 1); 2999 shrunk_rect.set_height(shrunk_rect.height() - 1);
3001 background_fullscreen_hack_ = true; 3000 background_fullscreen_hack_ = true;
3002 SetBoundsInternal(shrunk_rect, false); 3001 SetBoundsInternal(shrunk_rect, false);
3003 } 3002 }
3004 3003
3005 } // namespace views 3004 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698