| OLD | NEW |
| 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 #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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 GetClientRect(m_mainWnd, &rc); | 468 GetClientRect(m_mainWnd, &rc); |
| 469 | 469 |
| 470 int x = BUTTON_WIDTH * 4; | 470 int x = BUTTON_WIDTH * 4; |
| 471 MoveWindow(m_editWnd, x, 0, rc.right - x, URLBAR_HEIGHT, TRUE); | 471 MoveWindow(m_editWnd, x, 0, rc.right - x, URLBAR_HEIGHT, TRUE); |
| 472 | 472 |
| 473 MoveWindow(webViewWnd(), 0, URLBAR_HEIGHT, rc.right, | 473 MoveWindow(webViewWnd(), 0, URLBAR_HEIGHT, rc.right, |
| 474 rc.bottom - URLBAR_HEIGHT, TRUE); | 474 rc.bottom - URLBAR_HEIGHT, TRUE); |
| 475 } | 475 } |
| 476 | 476 |
| 477 void TestShell::LoadURLForFrame(const GURL& url, | 477 void TestShell::LoadURLForFrame(const GURL& url, |
| 478 const std::wstring& frame_name) { | 478 const string16& frame_name) { |
| 479 if (!url.is_valid()) | 479 if (!url.is_valid()) |
| 480 return; | 480 return; |
| 481 | 481 |
| 482 TRACE_EVENT_BEGIN_ETW("url.load", this, url.spec()); | 482 TRACE_EVENT_BEGIN_ETW("url.load", this, url.spec()); |
| 483 | 483 |
| 484 if (IsSVGTestURL(url)) { | 484 if (IsSVGTestURL(url)) { |
| 485 SizeToSVG(); | 485 SizeToSVG(); |
| 486 } else { | 486 } else { |
| 487 // only resize back to the default when running tests | 487 // only resize back to the default when running tests |
| 488 if (layout_test_mode()) | 488 if (layout_test_mode()) |
| 489 SizeToDefault(); | 489 SizeToDefault(); |
| 490 } | 490 } |
| 491 | 491 |
| 492 navigation_controller_->LoadEntry( | 492 navigation_controller_->LoadEntry( |
| 493 new TestNavigationEntry(-1, url, std::wstring(), frame_name)); | 493 new TestNavigationEntry(-1, url, frame_name)); |
| 494 } | 494 } |
| 495 | 495 |
| 496 LRESULT CALLBACK TestShell::WndProc(HWND hwnd, UINT message, WPARAM wParam, | 496 LRESULT CALLBACK TestShell::WndProc(HWND hwnd, UINT message, WPARAM wParam, |
| 497 LPARAM lParam) { | 497 LPARAM lParam) { |
| 498 TestShell* shell = static_cast<TestShell*>(ui::GetWindowUserData(hwnd)); | 498 TestShell* shell = static_cast<TestShell*>(ui::GetWindowUserData(hwnd)); |
| 499 | 499 |
| 500 switch (message) { | 500 switch (message) { |
| 501 case WM_COMMAND: | 501 case WM_COMMAND: |
| 502 { | 502 { |
| 503 int wmId = LOWORD(wParam); | 503 int wmId = LOWORD(wParam); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 730 |
| 731 bool EnsureFontLoaded(HFONT font) { | 731 bool EnsureFontLoaded(HFONT font) { |
| 732 return true; | 732 return true; |
| 733 } | 733 } |
| 734 | 734 |
| 735 bool DownloadUrl(const std::string& url, HWND caller_window) { | 735 bool DownloadUrl(const std::string& url, HWND caller_window) { |
| 736 return false; | 736 return false; |
| 737 } | 737 } |
| 738 | 738 |
| 739 } // namespace webkit_glue | 739 } // namespace webkit_glue |
| OLD | NEW |