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

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

Issue 11639042: views: Convert scoped_arrays to the new scoped_ptr style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/painter.cc ('k') | no next file » | 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 <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 } 1963 }
1964 1964
1965 void HWNDMessageHandler::OnThemeChanged() { 1965 void HWNDMessageHandler::OnThemeChanged() {
1966 ui::NativeThemeWin::instance()->CloseHandles(); 1966 ui::NativeThemeWin::instance()->CloseHandles();
1967 } 1967 }
1968 1968
1969 LRESULT HWNDMessageHandler::OnTouchEvent(UINT message, 1969 LRESULT HWNDMessageHandler::OnTouchEvent(UINT message,
1970 WPARAM w_param, 1970 WPARAM w_param,
1971 LPARAM l_param) { 1971 LPARAM l_param) {
1972 int num_points = LOWORD(w_param); 1972 int num_points = LOWORD(w_param);
1973 scoped_array<TOUCHINPUT> input(new TOUCHINPUT[num_points]); 1973 scoped_ptr<TOUCHINPUT[]> input(new TOUCHINPUT[num_points]);
1974 if (GetTouchInputInfo(reinterpret_cast<HTOUCHINPUT>(l_param), 1974 if (GetTouchInputInfo(reinterpret_cast<HTOUCHINPUT>(l_param),
1975 num_points, input.get(), sizeof(TOUCHINPUT))) { 1975 num_points, input.get(), sizeof(TOUCHINPUT))) {
1976 for (int i = 0; i < num_points; ++i) { 1976 for (int i = 0; i < num_points; ++i) {
1977 if (input[i].dwFlags & TOUCHEVENTF_DOWN) 1977 if (input[i].dwFlags & TOUCHEVENTF_DOWN)
1978 touch_ids_.insert(input[i].dwID); 1978 touch_ids_.insert(input[i].dwID);
1979 if (input[i].dwFlags & TOUCHEVENTF_UP) 1979 if (input[i].dwFlags & TOUCHEVENTF_UP)
1980 touch_ids_.erase(input[i].dwID); 1980 touch_ids_.erase(input[i].dwID);
1981 } 1981 }
1982 } 1982 }
1983 CloseTouchInputHandle(reinterpret_cast<HTOUCHINPUT>(l_param)); 1983 CloseTouchInputHandle(reinterpret_cast<HTOUCHINPUT>(l_param));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 DwmExtendFrameIntoClientArea(hwnd(), &m); 2070 DwmExtendFrameIntoClientArea(hwnd(), &m);
2071 } 2071 }
2072 if (window_pos->flags & SWP_SHOWWINDOW) 2072 if (window_pos->flags & SWP_SHOWWINDOW)
2073 delegate_->HandleVisibilityChanged(true); 2073 delegate_->HandleVisibilityChanged(true);
2074 else if (window_pos->flags & SWP_HIDEWINDOW) 2074 else if (window_pos->flags & SWP_HIDEWINDOW)
2075 delegate_->HandleVisibilityChanged(false); 2075 delegate_->HandleVisibilityChanged(false);
2076 SetMsgHandled(FALSE); 2076 SetMsgHandled(FALSE);
2077 } 2077 }
2078 2078
2079 } // namespace views 2079 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/painter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698