OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/debug/trace_event.h" |
16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 23 #include "ui/base/window_open_disposition.h" |
23 #include "ui/gfx/gdi_util.h" | 24 #include "ui/gfx/gdi_util.h" |
24 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
25 #include "ui/gfx/point.h" | 26 #include "ui/gfx/point.h" |
26 #include "webkit/glue/webdropdata.h" | 27 #include "webkit/glue/webdropdata.h" |
| 28 #include "webkit/glue/webkit_glue.h" |
27 #include "webkit/glue/webpreferences.h" | 29 #include "webkit/glue/webpreferences.h" |
28 #include "webkit/glue/webkit_glue.h" | 30 #include "webkit/plugins/npapi/plugin_list.h" |
29 #include "webkit/glue/window_open_disposition.h" | |
30 #include "webkit/plugins/npapi/webplugin.h" | 31 #include "webkit/plugins/npapi/webplugin.h" |
31 #include "webkit/plugins/npapi/plugin_list.h" | |
32 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 32 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
33 #include "webkit/tools/test_shell/drop_delegate.h" | 33 #include "webkit/tools/test_shell/drop_delegate.h" |
34 #include "webkit/tools/test_shell/test_navigation_controller.h" | 34 #include "webkit/tools/test_shell/test_navigation_controller.h" |
35 #include "webkit/tools/test_shell/test_shell.h" | 35 #include "webkit/tools/test_shell/test_shell.h" |
36 | 36 |
37 using WebKit::WebCursorInfo; | 37 using WebKit::WebCursorInfo; |
38 using WebKit::WebNavigationPolicy; | 38 using WebKit::WebNavigationPolicy; |
39 using WebKit::WebPopupMenuInfo; | 39 using WebKit::WebPopupMenuInfo; |
40 using WebKit::WebRect; | 40 using WebKit::WebRect; |
41 using WebKit::WebWidget; | 41 using WebKit::WebWidget; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 void TestWebViewDelegate::SetPageTitle(const string16& title) { | 199 void TestWebViewDelegate::SetPageTitle(const string16& title) { |
200 // The Windows test shell, pre-refactoring, ignored this. *shrug* | 200 // The Windows test shell, pre-refactoring, ignored this. *shrug* |
201 } | 201 } |
202 | 202 |
203 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { | 203 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { |
204 string16 url_string = UTF8ToUTF16(url.spec()); | 204 string16 url_string = UTF8ToUTF16(url.spec()); |
205 SendMessage(shell_->editWnd(), WM_SETTEXT, 0, | 205 SendMessage(shell_->editWnd(), WM_SETTEXT, 0, |
206 reinterpret_cast<LPARAM>(url_string.c_str())); | 206 reinterpret_cast<LPARAM>(url_string.c_str())); |
207 } | 207 } |
OLD | NEW |