OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 was forked off the Mac port. | 5 // This file was forked off the Mac port. |
6 | 6 |
7 #include "webkit/tools/test_shell/test_webview_delegate.h" | 7 #include "webkit/tools/test_shell/test_webview_delegate.h" |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 const std::wstring& title, | 236 const std::wstring& title, |
237 WebFrame* frame) { | 237 WebFrame* frame) { |
238 if (shell_->ShouldDumpFrameLoadCallbacks()) { | 238 if (shell_->ShouldDumpFrameLoadCallbacks()) { |
239 printf("%S - didReceiveTitle\n", | 239 printf("%S - didReceiveTitle\n", |
240 GetFrameDescription(frame).c_str()); | 240 GetFrameDescription(frame).c_str()); |
241 } | 241 } |
242 | 242 |
243 if (shell_->ShouldDumpTitleChanges()) { | 243 if (shell_->ShouldDumpTitleChanges()) { |
244 printf("TITLE CHANGED: %S\n", title.c_str()); | 244 printf("TITLE CHANGED: %S\n", title.c_str()); |
245 } | 245 } |
246 NOTIMPLEMENTED(); | 246 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()), WideToUTF8(title).c_str())
; |
247 } | 247 } |
248 | 248 |
249 void TestWebViewDelegate::DidFinishLoadForFrame(WebView* webview, | 249 void TestWebViewDelegate::DidFinishLoadForFrame(WebView* webview, |
250 WebFrame* frame) { | 250 WebFrame* frame) { |
251 if (shell_->ShouldDumpFrameLoadCallbacks()) { | 251 if (shell_->ShouldDumpFrameLoadCallbacks()) { |
252 printf("%S - didFinishLoadForFrame\n", | 252 printf("%S - didFinishLoadForFrame\n", |
253 GetFrameDescription(frame).c_str()); | 253 GetFrameDescription(frame).c_str()); |
254 } | 254 } |
255 | 255 |
256 UpdateAddressBar(webview); | 256 UpdateAddressBar(webview); |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 return L"main frame \"" + name + L"\""; | 773 return L"main frame \"" + name + L"\""; |
774 else | 774 else |
775 return L"main frame"; | 775 return L"main frame"; |
776 } else { | 776 } else { |
777 if (name.length()) | 777 if (name.length()) |
778 return L"frame \"" + name + L"\""; | 778 return L"frame \"" + name + L"\""; |
779 else | 779 else |
780 return L"frame (anonymous)"; | 780 return L"frame (anonymous)"; |
781 } | 781 } |
782 } | 782 } |
OLD | NEW |