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

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

Issue 549213: Add UI to TestShell to enable/disable images, plugins, and scripts.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 shell->webView()->mainFrame()->stopLoading(); 577 shell->webView()->mainFrame()->stopLoading();
578 } 578 }
579 } 579 }
580 break; 580 break;
581 case IDM_DUMP_BODY_TEXT: 581 case IDM_DUMP_BODY_TEXT:
582 shell->DumpDocumentText(); 582 shell->DumpDocumentText();
583 break; 583 break;
584 case IDM_DUMP_RENDER_TREE: 584 case IDM_DUMP_RENDER_TREE:
585 shell->DumpRenderTree(); 585 shell->DumpRenderTree();
586 break; 586 break;
587 case IDM_ENABLE_IMAGES:
588 case IDM_ENABLE_PLUGINS:
589 case IDM_ENABLE_SCRIPTS: {
590 HMENU menu = GetSubMenu(GetMenu(hwnd), 1);
591 bool was_checked =
592 (GetMenuState(menu, wmId, MF_BYCOMMAND) & MF_CHECKED) != 0;
593 CheckMenuItem(menu, wmId,
594 MF_BYCOMMAND | (was_checked ? MF_UNCHECKED : MF_CHECKED));
595 switch (wmId) {
596 case IDM_ENABLE_IMAGES:
597 shell->set_allow_images(!was_checked);
598 break;
599 case IDM_ENABLE_PLUGINS:
600 shell->set_allow_plugins(!was_checked);
601 break;
602 case IDM_ENABLE_SCRIPTS:
603 shell->set_allow_scripts(!was_checked);
604 break;
605 }
606 break;
607 }
587 case IDM_SHOW_DEV_TOOLS: 608 case IDM_SHOW_DEV_TOOLS:
588 shell->ShowDevTools(); 609 shell->ShowDevTools();
589 break; 610 break;
590 } 611 }
591 } 612 }
592 break; 613 break;
593 614
594 case WM_DESTROY: 615 case WM_DESTROY:
595 { 616 {
596 617
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 799
779 bool EnsureFontLoaded(HFONT font) { 800 bool EnsureFontLoaded(HFONT font) {
780 return true; 801 return true;
781 } 802 }
782 803
783 bool DownloadUrl(const std::string& url, HWND caller_window) { 804 bool DownloadUrl(const std::string& url, HWND caller_window) {
784 return false; 805 return false;
785 } 806 }
786 807
787 } // namespace webkit_glue 808 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.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