| 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/views/tab_contents/tab_contents_view_win.h" | 5 #include "chrome/browser/views/tab_contents/tab_contents_view_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "app/gfx/canvas_paint.h" | 9 #include "app/gfx/canvas_paint.h" |
| 10 #include "app/os_exchange_data.h" | 10 #include "app/os_exchange_data.h" |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 | 623 |
| 624 void TabContentsViewWin::WasHidden() { | 624 void TabContentsViewWin::WasHidden() { |
| 625 tab_contents()->HideContents(); | 625 tab_contents()->HideContents(); |
| 626 } | 626 } |
| 627 | 627 |
| 628 void TabContentsViewWin::WasShown() { | 628 void TabContentsViewWin::WasShown() { |
| 629 tab_contents()->ShowContents(); | 629 tab_contents()->ShowContents(); |
| 630 } | 630 } |
| 631 | 631 |
| 632 void TabContentsViewWin::WasSized(const gfx::Size& size) { | 632 void TabContentsViewWin::WasSized(const gfx::Size& size) { |
| 633 UINT swp_flags = SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE; |
| 634 SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags); |
| 633 if (tab_contents()->interstitial_page()) | 635 if (tab_contents()->interstitial_page()) |
| 634 tab_contents()->interstitial_page()->SetSize(size); | 636 tab_contents()->interstitial_page()->SetSize(size); |
| 635 if (tab_contents()->render_widget_host_view()) | 637 if (tab_contents()->render_widget_host_view()) |
| 636 tab_contents()->render_widget_host_view()->SetSize(size); | 638 tab_contents()->render_widget_host_view()->SetSize(size); |
| 637 | 639 |
| 638 // TODO(brettw) this function can probably be moved to this class. | 640 // TODO(brettw) this function can probably be moved to this class. |
| 639 tab_contents()->RepositionSupressedPopupsToFit(); | 641 tab_contents()->RepositionSupressedPopupsToFit(); |
| 640 } | 642 } |
| 641 | 643 |
| 642 bool TabContentsViewWin::ScrollZoom(int scroll_type) { | 644 bool TabContentsViewWin::ScrollZoom(int scroll_type) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 669 } | 671 } |
| 670 return false; | 672 return false; |
| 671 } | 673 } |
| 672 | 674 |
| 673 void TabContentsViewWin::WheelZoom(int distance) { | 675 void TabContentsViewWin::WheelZoom(int distance) { |
| 674 if (tab_contents()->delegate()) { | 676 if (tab_contents()->delegate()) { |
| 675 bool zoom_in = distance > 0; | 677 bool zoom_in = distance > 0; |
| 676 tab_contents()->delegate()->ContentsZoomChange(zoom_in); | 678 tab_contents()->delegate()->ContentsZoomChange(zoom_in); |
| 677 } | 679 } |
| 678 } | 680 } |
| OLD | NEW |