| 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/web_contents_view_win.h" | 5 #include "chrome/browser/tab_contents/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" // TODO(beng): this dependency is awful. | 10 #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful. |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 | 545 |
| 546 void WebContentsViewWin::WasHidden() { | 546 void WebContentsViewWin::WasHidden() { |
| 547 web_contents()->HideContents(); | 547 web_contents()->HideContents(); |
| 548 } | 548 } |
| 549 | 549 |
| 550 void WebContentsViewWin::WasShown() { | 550 void WebContentsViewWin::WasShown() { |
| 551 web_contents()->ShowContents(); | 551 web_contents()->ShowContents(); |
| 552 } | 552 } |
| 553 | 553 |
| 554 void WebContentsViewWin::WasSized(const gfx::Size& size) { | 554 void WebContentsViewWin::WasSized(const gfx::Size& size) { |
| 555 UINT swp_flags = SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE; |
| 556 SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags); |
| 555 if (web_contents()->interstitial_page()) | 557 if (web_contents()->interstitial_page()) |
| 556 web_contents()->interstitial_page()->SetSize(size); | 558 web_contents()->interstitial_page()->SetSize(size); |
| 557 if (web_contents()->render_widget_host_view()) | 559 if (web_contents()->render_widget_host_view()) |
| 558 web_contents()->render_widget_host_view()->SetSize(size); | 560 web_contents()->render_widget_host_view()->SetSize(size); |
| 559 | 561 |
| 560 // TODO(brettw) this function can probably be moved to this class. | 562 // TODO(brettw) this function can probably be moved to this class. |
| 561 web_contents()->RepositionSupressedPopupsToFit(size); | 563 web_contents()->RepositionSupressedPopupsToFit(size); |
| 562 } | 564 } |
| 563 | 565 |
| 564 bool WebContentsViewWin::ScrollZoom(int scroll_type) { | 566 bool WebContentsViewWin::ScrollZoom(int scroll_type) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 591 } | 593 } |
| 592 return false; | 594 return false; |
| 593 } | 595 } |
| 594 | 596 |
| 595 void WebContentsViewWin::WheelZoom(int distance) { | 597 void WebContentsViewWin::WheelZoom(int distance) { |
| 596 if (web_contents()->delegate()) { | 598 if (web_contents()->delegate()) { |
| 597 bool zoom_in = distance > 0; | 599 bool zoom_in = distance > 0; |
| 598 web_contents()->delegate()->ContentsZoomChange(zoom_in); | 600 web_contents()->delegate()->ContentsZoomChange(zoom_in); |
| 599 } | 601 } |
| 600 } | 602 } |
| OLD | NEW |