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

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

Issue 2864020: DevTools: Migrate to new WebView initialization (pass devtools client directly). (Closed)
Patch Set: deps roll Created 10 years, 6 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
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...) Expand all
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"
37 #include "webkit/tools/test_shell/test_shell_switches.h" 38 #include "webkit/tools/test_shell/test_shell_switches.h"
38 #include "webkit/tools/test_shell/test_webview_delegate.h" 39 #include "webkit/tools/test_shell/test_webview_delegate.h"
39 40
40 using WebKit::WebWidget; 41 using WebKit::WebWidget;
41 42
42 #define MAX_LOADSTRING 100 43 #define MAX_LOADSTRING 100
43 44
44 #define BUTTON_WIDTH 72 45 #define BUTTON_WIDTH 72
45 #define URLBAR_HEIGHT 24 46 #define URLBAR_HEIGHT 24
46 47
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // this control is positioned by ResizeSubViews 386 // this control is positioned by ResizeSubViews
386 m_editWnd = CreateWindow(L"EDIT", 0, 387 m_editWnd = CreateWindow(L"EDIT", 0,
387 WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | 388 WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT |
388 ES_AUTOVSCROLL | ES_AUTOHSCROLL, 389 ES_AUTOVSCROLL | ES_AUTOHSCROLL,
389 x, 0, 0, 0, m_mainWnd, 0, instance_handle_, 0); 390 x, 0, 0, 0, m_mainWnd, 0, instance_handle_, 0);
390 391
391 default_edit_wnd_proc_ = 392 default_edit_wnd_proc_ =
392 win_util::SetWindowProc(m_editWnd, TestShell::EditWndProc); 393 win_util::SetWindowProc(m_editWnd, TestShell::EditWndProc);
393 win_util::SetWindowUserData(m_editWnd, this); 394 win_util::SetWindowUserData(m_editWnd, this);
394 395
396 dev_tools_agent_.reset(new TestShellDevToolsAgent());
397
395 // create webview 398 // create webview
396 m_webViewHost.reset( 399 m_webViewHost.reset(
397 WebViewHost::Create(m_mainWnd, delegate_.get(), *TestShell::web_prefs_)); 400 WebViewHost::Create(m_mainWnd,
401 delegate_.get(),
402 dev_tools_agent_.get(),
403 *TestShell::web_prefs_));
404 dev_tools_agent_->SetWebView(m_webViewHost->webview());
398 delegate_->RegisterDragDrop(); 405 delegate_->RegisterDragDrop();
399 406
400 InitializeDevToolsAgent(webView());
401
402 // Load our initial content. 407 // Load our initial content.
403 if (starting_url.is_valid()) 408 if (starting_url.is_valid())
404 LoadURL(starting_url); 409 LoadURL(starting_url);
405 410
406 ShowWindow(webViewWnd(), SW_SHOW); 411 ShowWindow(webViewWnd(), SW_SHOW);
407 412
408 if (IsSVGTestURL(starting_url)) { 413 if (IsSVGTestURL(starting_url)) {
409 SizeToSVG(); 414 SizeToSVG();
410 } else { 415 } else {
411 SizeToDefault(); 416 SizeToDefault();
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 809
805 bool EnsureFontLoaded(HFONT font) { 810 bool EnsureFontLoaded(HFONT font) {
806 return true; 811 return true;
807 } 812 }
808 813
809 bool DownloadUrl(const std::string& url, HWND caller_window) { 814 bool DownloadUrl(const std::string& url, HWND caller_window) {
810 return false; 815 return false;
811 } 816 }
812 817
813 } // namespace webkit_glue 818 } // 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
This is Rietveld 408576698