| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 |
| 11 #include <objidl.h> | 11 #include <objidl.h> |
| 12 #include <shlobj.h> | 12 #include <shlobj.h> |
| 13 #include <shlwapi.h> | 13 #include <shlwapi.h> |
| 14 | 14 |
| 15 #include "base/debug/trace_event.h" |
| 15 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
| 16 #include "base/trace_event.h" | |
| 17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "gfx/native_widget_types.h" | 18 #include "gfx/native_widget_types.h" |
| 19 #include "gfx/gdi_util.h" | 19 #include "gfx/gdi_util.h" |
| 20 #include "gfx/point.h" | 20 #include "gfx/point.h" |
| 21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
| 22 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" |
| 23 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| 24 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" | 24 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
| 25 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 25 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
| 26 #include "webkit/glue/plugins/webplugin.h" | 26 #include "webkit/glue/plugins/webplugin.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { | 200 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { |
| 201 // The Windows test shell, pre-refactoring, ignored this. *shrug* | 201 // The Windows test shell, pre-refactoring, ignored this. *shrug* |
| 202 } | 202 } |
| 203 | 203 |
| 204 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { | 204 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { |
| 205 std::wstring url_string = UTF8ToWide(url.spec()); | 205 std::wstring url_string = UTF8ToWide(url.spec()); |
| 206 SendMessage(shell_->editWnd(), WM_SETTEXT, 0, | 206 SendMessage(shell_->editWnd(), WM_SETTEXT, 0, |
| 207 reinterpret_cast<LPARAM>(url_string.c_str())); | 207 reinterpret_cast<LPARAM>(url_string.c_str())); |
| 208 } | 208 } |
| OLD | NEW |