| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/web_contents_view_win.h" | 5 #include "chrome/browser/web_contents_view_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "chrome/browser/bookmarks/bookmark_drag_data.h" | 9 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 587 |
| 588 // Hack for thinkpad touchpad driver. | 588 // Hack for thinkpad touchpad driver. |
| 589 // Set fake scrollbars so that we can get scroll messages, | 589 // Set fake scrollbars so that we can get scroll messages, |
| 590 SCROLLINFO si = {0}; | 590 SCROLLINFO si = {0}; |
| 591 si.cbSize = sizeof(si); | 591 si.cbSize = sizeof(si); |
| 592 si.fMask = SIF_ALL; | 592 si.fMask = SIF_ALL; |
| 593 | 593 |
| 594 si.nMin = 1; | 594 si.nMin = 1; |
| 595 si.nMax = 100; | 595 si.nMax = 100; |
| 596 si.nPage = 10; | 596 si.nPage = 10; |
| 597 si.nTrackPos = 50; | 597 si.nPos = 50; |
| 598 | 598 |
| 599 ::SetScrollInfo(GetHWND(), SB_HORZ, &si, FALSE); | 599 ::SetScrollInfo(GetHWND(), SB_HORZ, &si, FALSE); |
| 600 ::SetScrollInfo(GetHWND(), SB_VERT, &si, FALSE); | 600 ::SetScrollInfo(GetHWND(), SB_VERT, &si, FALSE); |
| 601 } | 601 } |
| 602 | 602 |
| 603 LRESULT WebContentsViewWin::OnNCCalcSize(BOOL w_param, LPARAM l_param) { | 603 LRESULT WebContentsViewWin::OnNCCalcSize(BOOL w_param, LPARAM l_param) { |
| 604 // Hack for thinkpad mouse wheel driver. We have set the fake scroll bars | 604 // Hack for thinkpad mouse wheel driver. We have set the fake scroll bars |
| 605 // to receive scroll messages from thinkpad touchpad driver. Suppress | 605 // to receive scroll messages from thinkpad touchpad driver. Suppress |
| 606 // painting of scrollbars by returning 0 size for them. | 606 // painting of scrollbars by returning 0 size for them. |
| 607 return 0; | 607 return 0; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 } | 676 } |
| 677 return false; | 677 return false; |
| 678 } | 678 } |
| 679 | 679 |
| 680 void WebContentsViewWin::WheelZoom(int distance) { | 680 void WebContentsViewWin::WheelZoom(int distance) { |
| 681 if (web_contents_->delegate()) { | 681 if (web_contents_->delegate()) { |
| 682 bool zoom_in = distance > 0; | 682 bool zoom_in = distance > 0; |
| 683 web_contents_->delegate()->ContentsZoomChange(zoom_in); | 683 web_contents_->delegate()->ContentsZoomChange(zoom_in); |
| 684 } | 684 } |
| 685 } | 685 } |
| OLD | NEW |