Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 7915008: wstring: convert all SetPageTitle APIs to use string16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 WebFrame* frame, bool is_new_navigation) { 828 WebFrame* frame, bool is_new_navigation) {
829 UpdateForCommittedLoad(frame, is_new_navigation); 829 UpdateForCommittedLoad(frame, is_new_navigation);
830 } 830 }
831 831
832 void TestWebViewDelegate::didClearWindowObject(WebFrame* frame) { 832 void TestWebViewDelegate::didClearWindowObject(WebFrame* frame) {
833 shell_->BindJSObjectsToWindow(frame); 833 shell_->BindJSObjectsToWindow(frame);
834 } 834 }
835 835
836 void TestWebViewDelegate::didReceiveTitle( 836 void TestWebViewDelegate::didReceiveTitle(
837 WebFrame* frame, const WebString& title, WebTextDirection direction) { 837 WebFrame* frame, const WebString& title, WebTextDirection direction) {
838 std::wstring wtitle = UTF16ToWideHack(title); 838 SetPageTitle(title);
839
840 SetPageTitle(wtitle);
841 } 839 }
842 840
843 void TestWebViewDelegate::didFinishDocumentLoad(WebFrame* frame) { 841 void TestWebViewDelegate::didFinishDocumentLoad(WebFrame* frame) {
844 unsigned pending_unload_events = frame->unloadListenerCount(); 842 unsigned pending_unload_events = frame->unloadListenerCount();
845 if (pending_unload_events) { 843 if (pending_unload_events) {
846 printf("%S - has %u onunload handler(s)\n", 844 printf("%S - has %u onunload handler(s)\n",
847 GetFrameDescription(frame).c_str(), pending_unload_events); 845 GetFrameDescription(frame).c_str(), pending_unload_events);
848 } 846 }
849 } 847 }
850 848
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 } 1156 }
1159 1157
1160 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1158 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1161 fake_rect_ = rect; 1159 fake_rect_ = rect;
1162 using_fake_rect_ = true; 1160 using_fake_rect_ = true;
1163 } 1161 }
1164 1162
1165 WebRect TestWebViewDelegate::fake_window_rect() { 1163 WebRect TestWebViewDelegate::fake_window_rect() {
1166 return fake_rect_; 1164 return fake_rect_;
1167 } 1165 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698