| 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 // This file contains the implementation of TestWebViewDelegate, which serves | 5 // This file contains the implementation of TestWebViewDelegate, which serves |
| 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to | 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to |
| 7 // have initialized a MessageLoop before these methods are called. | 7 // have initialized a MessageLoop before these methods are called. |
| 8 | 8 |
| 9 #include "webkit/tools/test_shell/test_webview_delegate.h" | 9 #include "webkit/tools/test_shell/test_webview_delegate.h" |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 DestroyIcon(custom_cursor_); | 40 DestroyIcon(custom_cursor_); |
| 41 RevokeDragDrop(shell_->webViewWnd()); | 41 RevokeDragDrop(shell_->webViewWnd()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate( | 44 WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate( |
| 45 WebView* webview, | 45 WebView* webview, |
| 46 const GURL& url, | 46 const GURL& url, |
| 47 const std::string& mime_type, | 47 const std::string& mime_type, |
| 48 const std::string& clsid, | 48 const std::string& clsid, |
| 49 std::string* actual_mime_type) { | 49 std::string* actual_mime_type) { |
| 50 HWND hwnd = GetContainingWindow(webview); | 50 HWND hwnd = GetContainingView(webview); |
| 51 if (!hwnd) | 51 if (!hwnd) |
| 52 return NULL; | 52 return NULL; |
| 53 | 53 |
| 54 bool allow_wildcard = true; | 54 bool allow_wildcard = true; |
| 55 WebPluginInfo info; | 55 WebPluginInfo info; |
| 56 if (!NPAPI::PluginList::Singleton()->GetPluginInfo(url, mime_type, clsid, | 56 if (!NPAPI::PluginList::Singleton()->GetPluginInfo(url, mime_type, clsid, |
| 57 allow_wildcard, &info, | 57 allow_wildcard, &info, |
| 58 actual_mime_type)) | 58 actual_mime_type)) |
| 59 return NULL; | 59 return NULL; |
| 60 | 60 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { | 163 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { |
| 164 // The Windows test shell, pre-refactoring, ignored this. *shrug* | 164 // The Windows test shell, pre-refactoring, ignored this. *shrug* |
| 165 } | 165 } |
| 166 | 166 |
| 167 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { | 167 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { |
| 168 std::wstring url_string = UTF8ToWide(url.spec()); | 168 std::wstring url_string = UTF8ToWide(url.spec()); |
| 169 SendMessage(shell_->editWnd(), WM_SETTEXT, 0, | 169 SendMessage(shell_->editWnd(), WM_SETTEXT, 0, |
| 170 reinterpret_cast<LPARAM>(url_string.c_str())); | 170 reinterpret_cast<LPARAM>(url_string.c_str())); |
| 171 } | 171 } |
| 172 | 172 |
| OLD | NEW |