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

Side by Side Diff: ui/views/controls/scrollbar/native_scroll_bar_win.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/controls/scrollbar/native_scroll_bar_win.h ('k') | ui/views/controls/slider.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/controls/scrollbar/native_scroll_bar_win.h" 5 #include "ui/views/controls/scrollbar/native_scroll_bar_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 if (code != -1) { 264 if (code != -1) {
265 SendMessage(sb_container_->hwnd(), 265 SendMessage(sb_container_->hwnd(),
266 native_scroll_bar_->IsHorizontal() ? WM_HSCROLL : WM_VSCROLL, 266 native_scroll_bar_->IsHorizontal() ? WM_HSCROLL : WM_VSCROLL,
267 MAKELONG(static_cast<WORD>(code), 0), 0L); 267 MAKELONG(static_cast<WORD>(code), 0), 0L);
268 return true; 268 return true;
269 } 269 }
270 return false; 270 return false;
271 } 271 }
272 272
273 bool NativeScrollBarWin::OnMouseWheel(const MouseWheelEvent& e) { 273 bool NativeScrollBarWin::OnMouseWheel(const ui::MouseWheelEvent& e) {
274 if (!sb_container_.get()) 274 if (!sb_container_.get())
275 return false; 275 return false;
276 sb_container_->ScrollWithOffset(e.offset()); 276 sb_container_->ScrollWithOffset(e.offset());
277 return true; 277 return true;
278 } 278 }
279 279
280 //////////////////////////////////////////////////////////////////////////////// 280 ////////////////////////////////////////////////////////////////////////////////
281 // NativeScrollBarWin, NativeControlWin overrides: 281 // NativeScrollBarWin, NativeControlWin overrides:
282 282
283 void NativeScrollBarWin::CreateNativeControl() { 283 void NativeScrollBarWin::CreateNativeControl() {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() { 341 int NativeScrollBarWrapper::GetHorizontalScrollBarHeight() {
342 return GetSystemMetrics(SM_CYHSCROLL); 342 return GetSystemMetrics(SM_CYHSCROLL);
343 } 343 }
344 344
345 // static 345 // static
346 int NativeScrollBarWrapper::GetVerticalScrollBarWidth() { 346 int NativeScrollBarWrapper::GetVerticalScrollBarWidth() {
347 return GetSystemMetrics(SM_CXVSCROLL); 347 return GetSystemMetrics(SM_CXVSCROLL);
348 } 348 }
349 349
350 } // namespace views 350 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/native_scroll_bar_win.h ('k') | ui/views/controls/slider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698