| 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/tab_contents/tab_contents_view_win.h" | 5 #include "chrome/browser/tab_contents/tab_contents_view_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "app/gfx/canvas.h" | 9 #include "app/gfx/canvas.h" |
| 10 #include "app/os_exchange_data.h" | 10 #include "app/os_exchange_data.h" |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 | 408 |
| 409 LRESULT TabContentsViewWin::OnMouseRange(UINT msg, | 409 LRESULT TabContentsViewWin::OnMouseRange(UINT msg, |
| 410 WPARAM w_param, LPARAM l_param) { | 410 WPARAM w_param, LPARAM l_param) { |
| 411 switch (msg) { | 411 switch (msg) { |
| 412 case WM_LBUTTONDOWN: | 412 case WM_LBUTTONDOWN: |
| 413 case WM_MBUTTONDOWN: | 413 case WM_MBUTTONDOWN: |
| 414 case WM_RBUTTONDOWN: { | 414 case WM_RBUTTONDOWN: { |
| 415 // Make sure this TabContents is activated when it is clicked on. | 415 // Make sure this TabContents is activated when it is clicked on. |
| 416 if (tab_contents()->delegate()) | 416 if (tab_contents()->delegate()) |
| 417 tab_contents()->delegate()->ActivateContents(tab_contents()); | 417 tab_contents()->delegate()->ActivateContents(tab_contents()); |
| 418 DownloadRequestManager* drm = | |
| 419 g_browser_process->download_request_manager(); | |
| 420 if (drm) | |
| 421 drm->OnUserGesture(tab_contents()); | |
| 422 break; | 418 break; |
| 423 } | 419 } |
| 424 case WM_MOUSEMOVE: | 420 case WM_MOUSEMOVE: |
| 425 // Let our delegate know that the mouse moved (useful for resetting status | 421 // Let our delegate know that the mouse moved (useful for resetting status |
| 426 // bubble state). | 422 // bubble state). |
| 427 if (tab_contents()->delegate()) { | 423 if (tab_contents()->delegate()) { |
| 428 tab_contents()->delegate()->ContentsMouseEvent(tab_contents(), true); | 424 tab_contents()->delegate()->ContentsMouseEvent(tab_contents(), true); |
| 429 } | 425 } |
| 430 break; | 426 break; |
| 431 default: | 427 default: |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 } | 603 } |
| 608 return false; | 604 return false; |
| 609 } | 605 } |
| 610 | 606 |
| 611 void TabContentsViewWin::WheelZoom(int distance) { | 607 void TabContentsViewWin::WheelZoom(int distance) { |
| 612 if (tab_contents()->delegate()) { | 608 if (tab_contents()->delegate()) { |
| 613 bool zoom_in = distance > 0; | 609 bool zoom_in = distance > 0; |
| 614 tab_contents()->delegate()->ContentsZoomChange(zoom_in); | 610 tab_contents()->delegate()->ContentsZoomChange(zoom_in); |
| 615 } | 611 } |
| 616 } | 612 } |
| OLD | NEW |