| 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 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/common/os_exchange_data.h" | 26 #include "chrome/common/os_exchange_data.h" |
| 27 #include "net/base/net_util.h" | 27 #include "net/base/net_util.h" |
| 28 #include "webkit/glue/plugins/webplugin_delegate_impl.h" | 28 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
| 29 #include "webkit/glue/webdropdata.h" | 29 #include "webkit/glue/webdropdata.h" |
| 30 #include "webkit/glue/webinputevent.h" | 30 #include "webkit/glue/webinputevent.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // Windows callback for OnDestroy to detach the plugin windows. | 34 // Windows callback for OnDestroy to detach the plugin windows. |
| 35 BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) { | 35 BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) { |
| 36 if (WebPluginDelegateImpl::IsPluginDelegateWindow(window)) { | 36 if (WebPluginDelegateImpl::IsPluginDelegateWindow(window) && |
| 37 !IsHungAppWindow(window)) { |
| 37 ::ShowWindow(window, SW_HIDE); | 38 ::ShowWindow(window, SW_HIDE); |
| 38 SetParent(window, NULL); | 39 SetParent(window, NULL); |
| 39 } | 40 } |
| 40 return TRUE; | 41 return TRUE; |
| 41 } | 42 } |
| 42 | 43 |
| 43 } // namespace | 44 } // namespace |
| 44 | 45 |
| 45 // static | 46 // static |
| 46 WebContentsView* WebContentsView::Create(WebContents* web_contents) { | 47 WebContentsView* WebContentsView::Create(WebContents* web_contents) { |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 } | 672 } |
| 672 return false; | 673 return false; |
| 673 } | 674 } |
| 674 | 675 |
| 675 void WebContentsViewWin::WheelZoom(int distance) { | 676 void WebContentsViewWin::WheelZoom(int distance) { |
| 676 if (web_contents_->delegate()) { | 677 if (web_contents_->delegate()) { |
| 677 bool zoom_in = distance > 0; | 678 bool zoom_in = distance > 0; |
| 678 web_contents_->delegate()->ContentsZoomChange(zoom_in); | 679 web_contents_->delegate()->ContentsZoomChange(zoom_in); |
| 679 } | 680 } |
| 680 } | 681 } |
| OLD | NEW |