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

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

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #include "webkit/tools/test_shell/test_shell.h" 5 #include "webkit/tools/test_shell/test_shell.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 #include <objbase.h> 10 #include <objbase.h>
(...skipping 18 matching lines...) Expand all
29 #include "skia/ext/bitmap_platform_device.h" 29 #include "skia/ext/bitmap_platform_device.h"
30 #include "webkit/glue/webframe.h" 30 #include "webkit/glue/webframe.h"
31 #include "webkit/glue/webkit_glue.h" 31 #include "webkit/glue/webkit_glue.h"
32 #include "webkit/glue/webpreferences.h" 32 #include "webkit/glue/webpreferences.h"
33 #include "webkit/glue/webview.h" 33 #include "webkit/glue/webview.h"
34 #include "webkit/glue/plugins/plugin_list.h" 34 #include "webkit/glue/plugins/plugin_list.h"
35 #include "webkit/tools/test_shell/resource.h" 35 #include "webkit/tools/test_shell/resource.h"
36 #include "webkit/tools/test_shell/test_navigation_controller.h" 36 #include "webkit/tools/test_shell/test_navigation_controller.h"
37 #include "webkit/tools/test_shell/test_shell_switches.h" 37 #include "webkit/tools/test_shell/test_shell_switches.h"
38 38
39 using WebKit::WebWidget;
40
39 #define MAX_LOADSTRING 100 41 #define MAX_LOADSTRING 100
40 42
41 #define BUTTON_WIDTH 72 43 #define BUTTON_WIDTH 72
42 #define URLBAR_HEIGHT 24 44 #define URLBAR_HEIGHT 24
43 45
44 // Global Variables: 46 // Global Variables:
45 static TCHAR g_windowTitle[MAX_LOADSTRING]; // The title bar text 47 static TCHAR g_windowTitle[MAX_LOADSTRING]; // The title bar text
46 static TCHAR g_windowClass[MAX_LOADSTRING]; // The main window class name 48 static TCHAR g_windowClass[MAX_LOADSTRING]; // The main window class name
47 49
48 // This is only set for layout tests. It is used to determine the name of a 50 // This is only set for layout tests. It is used to determine the name of a
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 WaitForSingleObject(thread_handle, 1000); 452 WaitForSingleObject(thread_handle, 1000);
451 } 453 }
452 454
453 void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) { 455 void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) {
454 if (!enable && ::GetFocus() == host->view_handle()) 456 if (!enable && ::GetFocus() == host->view_handle())
455 ::SetFocus(NULL); 457 ::SetFocus(NULL);
456 } 458 }
457 459
458 WebWidget* TestShell::CreatePopupWidget(WebView* webview) { 460 WebWidget* TestShell::CreatePopupWidget(WebView* webview) {
459 DCHECK(!m_popupHost); 461 DCHECK(!m_popupHost);
460 m_popupHost = WebWidgetHost::Create(NULL, delegate_.get()); 462 m_popupHost = WebWidgetHost::Create(NULL, popup_delegate_.get());
461 ShowWindow(popupWnd(), SW_SHOW); 463 ShowWindow(popupWnd(), SW_SHOW);
462 464
463 return m_popupHost->webwidget(); 465 return m_popupHost->webwidget();
464 } 466 }
465 467
466 void TestShell::ClosePopup() { 468 void TestShell::ClosePopup() {
467 PostMessage(popupWnd(), WM_CLOSE, 0, 0); 469 PostMessage(popupWnd(), WM_CLOSE, 0, 0);
468 m_popupHost = NULL; 470 m_popupHost = NULL;
469 } 471 }
470 472
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 761
760 bool EnsureFontLoaded(HFONT font) { 762 bool EnsureFontLoaded(HFONT font) {
761 return true; 763 return true;
762 } 764 }
763 765
764 bool DownloadUrl(const std::string& url, HWND caller_window) { 766 bool DownloadUrl(const std::string& url, HWND caller_window) {
765 return false; 767 return false;
766 } 768 }
767 769
768 } // namespace webkit_glue 770 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_test.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698