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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/views/win/hwnd_message_handler.h ('k') | ui/views/win/windows_session_change_observer.cc » ('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/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 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2137 2137
2138 void HWNDMessageHandler::OnThemeChanged() { 2138 void HWNDMessageHandler::OnThemeChanged() {
2139 ui::NativeThemeWin::instance()->CloseHandles(); 2139 ui::NativeThemeWin::instance()->CloseHandles();
2140 } 2140 }
2141 2141
2142 LRESULT HWNDMessageHandler::OnTouchEvent(UINT message, 2142 LRESULT HWNDMessageHandler::OnTouchEvent(UINT message,
2143 WPARAM w_param, 2143 WPARAM w_param,
2144 LPARAM l_param) { 2144 LPARAM l_param) {
2145 // Handle touch events only on Aura for now. 2145 // Handle touch events only on Aura for now.
2146 int num_points = LOWORD(w_param); 2146 int num_points = LOWORD(w_param);
2147 scoped_ptr<TOUCHINPUT[]> input(new TOUCHINPUT[num_points]); 2147 std::unique_ptr<TOUCHINPUT[]> input(new TOUCHINPUT[num_points]);
2148 if (ui::GetTouchInputInfoWrapper(reinterpret_cast<HTOUCHINPUT>(l_param), 2148 if (ui::GetTouchInputInfoWrapper(reinterpret_cast<HTOUCHINPUT>(l_param),
2149 num_points, input.get(), 2149 num_points, input.get(),
2150 sizeof(TOUCHINPUT))) { 2150 sizeof(TOUCHINPUT))) {
2151 // input[i].dwTime doesn't necessarily relate to the system time at all, 2151 // input[i].dwTime doesn't necessarily relate to the system time at all,
2152 // so use base::TimeTicks::Now(). 2152 // so use base::TimeTicks::Now().
2153 const base::TimeTicks event_time = base::TimeTicks::Now(); 2153 const base::TimeTicks event_time = base::TimeTicks::Now();
2154 TouchEvents touch_events; 2154 TouchEvents touch_events;
2155 for (int i = 0; i < num_points; ++i) { 2155 for (int i = 0; i < num_points; ++i) {
2156 POINT point; 2156 POINT point;
2157 point.x = TOUCH_COORD_TO_PIXEL(input[i].x); 2157 point.x = TOUCH_COORD_TO_PIXEL(input[i].x);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size()); 2669 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size());
2670 ResetWindowRegion(false, true); 2670 ResetWindowRegion(false, true);
2671 } 2671 }
2672 2672
2673 if (direct_manipulation_helper_) 2673 if (direct_manipulation_helper_)
2674 direct_manipulation_helper_->SetBounds(bounds_in_pixels); 2674 direct_manipulation_helper_->SetBounds(bounds_in_pixels);
2675 } 2675 }
2676 2676
2677 2677
2678 } // namespace views 2678 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/win/hwnd_message_handler.h ('k') | ui/views/win/windows_session_change_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698