| 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 22 matching lines...) Expand all Loading... |
| 33 BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) { | 33 BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) { |
| 34 if (WebPluginDelegateImpl::IsPluginDelegateWindow(window)) { | 34 if (WebPluginDelegateImpl::IsPluginDelegateWindow(window)) { |
| 35 ::ShowWindow(window, SW_HIDE); | 35 ::ShowWindow(window, SW_HIDE); |
| 36 SetParent(window, NULL); | 36 SetParent(window, NULL); |
| 37 } | 37 } |
| 38 return TRUE; | 38 return TRUE; |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace | 41 } // namespace |
| 42 | 42 |
| 43 // static |
| 44 WebContentsView* WebContentsView::Create(WebContents* web_contents) { |
| 45 return new WebContentsViewWin(web_contents); |
| 46 } |
| 47 |
| 43 WebContentsViewWin::WebContentsViewWin(WebContents* web_contents) | 48 WebContentsViewWin::WebContentsViewWin(WebContents* web_contents) |
| 44 : web_contents_(web_contents), | 49 : web_contents_(web_contents), |
| 45 ignore_next_char_event_(false) { | 50 ignore_next_char_event_(false) { |
| 46 } | 51 } |
| 47 | 52 |
| 48 WebContentsViewWin::~WebContentsViewWin() { | 53 WebContentsViewWin::~WebContentsViewWin() { |
| 49 } | 54 } |
| 50 | 55 |
| 51 WebContents* WebContentsViewWin::GetWebContents() { | 56 WebContents* WebContentsViewWin::GetWebContents() { |
| 52 return web_contents_; | 57 return web_contents_; |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 } | 670 } |
| 666 return false; | 671 return false; |
| 667 } | 672 } |
| 668 | 673 |
| 669 void WebContentsViewWin::WheelZoom(int distance) { | 674 void WebContentsViewWin::WheelZoom(int distance) { |
| 670 if (web_contents_->delegate()) { | 675 if (web_contents_->delegate()) { |
| 671 bool zoom_in = distance > 0; | 676 bool zoom_in = distance > 0; |
| 672 web_contents_->delegate()->ContentsZoomChange(zoom_in); | 677 web_contents_->delegate()->ContentsZoomChange(zoom_in); |
| 673 } | 678 } |
| 674 } | 679 } |
| OLD | NEW |