Chromium Code Reviews

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

Issue 2871023: Revert 50726 "DevTools: Migrate to new WebView initialization (pass devtools client directly)." (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <commdlg.h> 8 #include <commdlg.h>
9 #include <objbase.h> 9 #include <objbase.h>
10 #include <process.h> 10 #include <process.h>
(...skipping 16 matching lines...)
27 #include "net/base/net_module.h" 27 #include "net/base/net_module.h"
28 #include "net/url_request/url_request_file_job.h" 28 #include "net/url_request/url_request_file_job.h"
29 #include "skia/ext/bitmap_platform_device.h" 29 #include "skia/ext/bitmap_platform_device.h"
30 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" 30 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
31 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 31 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
32 #include "webkit/glue/webkit_glue.h" 32 #include "webkit/glue/webkit_glue.h"
33 #include "webkit/glue/webpreferences.h" 33 #include "webkit/glue/webpreferences.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_devtools_agent.h"
38 #include "webkit/tools/test_shell/test_shell_switches.h" 37 #include "webkit/tools/test_shell/test_shell_switches.h"
39 #include "webkit/tools/test_shell/test_webview_delegate.h" 38 #include "webkit/tools/test_shell/test_webview_delegate.h"
40 39
41 using WebKit::WebWidget; 40 using WebKit::WebWidget;
42 41
43 #define MAX_LOADSTRING 100 42 #define MAX_LOADSTRING 100
44 43
45 #define BUTTON_WIDTH 72 44 #define BUTTON_WIDTH 72
46 #define URLBAR_HEIGHT 24 45 #define URLBAR_HEIGHT 24
47 46
(...skipping 338 matching lines...)
386 // this control is positioned by ResizeSubViews 385 // this control is positioned by ResizeSubViews
387 m_editWnd = CreateWindow(L"EDIT", 0, 386 m_editWnd = CreateWindow(L"EDIT", 0,
388 WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | 387 WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT |
389 ES_AUTOVSCROLL | ES_AUTOHSCROLL, 388 ES_AUTOVSCROLL | ES_AUTOHSCROLL,
390 x, 0, 0, 0, m_mainWnd, 0, instance_handle_, 0); 389 x, 0, 0, 0, m_mainWnd, 0, instance_handle_, 0);
391 390
392 default_edit_wnd_proc_ = 391 default_edit_wnd_proc_ =
393 win_util::SetWindowProc(m_editWnd, TestShell::EditWndProc); 392 win_util::SetWindowProc(m_editWnd, TestShell::EditWndProc);
394 win_util::SetWindowUserData(m_editWnd, this); 393 win_util::SetWindowUserData(m_editWnd, this);
395 394
396 dev_tools_agent_.reset(new TestShellDevToolsAgent());
397
398 // create webview 395 // create webview
399 m_webViewHost.reset( 396 m_webViewHost.reset(
400 WebViewHost::Create(m_mainWnd, 397 WebViewHost::Create(m_mainWnd, delegate_.get(), *TestShell::web_prefs_));
401 delegate_.get(),
402 dev_tools_agent_.get(),
403 *TestShell::web_prefs_));
404 dev_tools_agent_->SetWebView(m_webViewHost->webview());
405 delegate_->RegisterDragDrop(); 398 delegate_->RegisterDragDrop();
406 399
400 InitializeDevToolsAgent(webView());
401
407 // Load our initial content. 402 // Load our initial content.
408 if (starting_url.is_valid()) 403 if (starting_url.is_valid())
409 LoadURL(starting_url); 404 LoadURL(starting_url);
410 405
411 ShowWindow(webViewWnd(), SW_SHOW); 406 ShowWindow(webViewWnd(), SW_SHOW);
412 407
413 if (IsSVGTestURL(starting_url)) { 408 if (IsSVGTestURL(starting_url)) {
414 SizeToSVG(); 409 SizeToSVG();
415 } else { 410 } else {
416 SizeToDefault(); 411 SizeToDefault();
(...skipping 392 matching lines...)
809 804
810 bool EnsureFontLoaded(HFONT font) { 805 bool EnsureFontLoaded(HFONT font) {
811 return true; 806 return true;
812 } 807 }
813 808
814 bool DownloadUrl(const std::string& url, HWND caller_window) { 809 bool DownloadUrl(const std::string& url, HWND caller_window) {
815 return false; 810 return false;
816 } 811 }
817 812
818 } // namespace webkit_glue 813 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_devtools_agent.cc ('k') | webkit/tools/test_shell/webview_host.h » ('j') | no next file with comments »

Powered by Google App Engine