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 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 185 } |
186 | 186 |
187 // Public methods ------------------------------------------------------------- | 187 // Public methods ------------------------------------------------------------- |
188 | 188 |
189 void TestWebViewDelegate::UpdateSelectionClipboard(bool is_empty_selection) { | 189 void TestWebViewDelegate::UpdateSelectionClipboard(bool is_empty_selection) { |
190 // No selection clipboard on windows, do nothing. | 190 // No selection clipboard on windows, do nothing. |
191 } | 191 } |
192 | 192 |
193 // Private methods ------------------------------------------------------------ | 193 // Private methods ------------------------------------------------------------ |
194 | 194 |
195 void TestWebViewDelegate::ShowJavaScriptAlert(const string16& message) { | 195 void TestWebViewDelegate::ShowJavaScriptAlert(const base::string16& message) { |
196 MessageBox(NULL, message.c_str(), L"JavaScript Alert", MB_OK); | 196 MessageBox(NULL, message.c_str(), L"JavaScript Alert", MB_OK); |
197 } | 197 } |
198 | 198 |
199 void TestWebViewDelegate::SetPageTitle(const string16& title) { | 199 void TestWebViewDelegate::SetPageTitle(const base::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 base::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 |