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

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

Issue 10383006: Add scale factor and 2x resources from webkit and plumb through to ContentClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more test class GetImageResource methods. Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <fontconfig/fontconfig.h> 9 #include <fontconfig/fontconfig.h>
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 return ResourceBundle::GetSharedInstance().GetRawDataResource(key); 562 return ResourceBundle::GetSharedInstance().GetRawDataResource(key);
563 } 563 }
564 564
565 //----------------------------------------------------------------------------- 565 //-----------------------------------------------------------------------------
566 566
567 string16 TestShellWebKitInit::GetLocalizedString(int message_id) { 567 string16 TestShellWebKitInit::GetLocalizedString(int message_id) {
568 return ResourceBundle::GetSharedInstance().GetLocalizedString(message_id); 568 return ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
569 } 569 }
570 570
571 base::StringPiece TestShellWebKitInit::GetDataResource(int resource_id) { 571 base::StringPiece TestShellWebKitInit::GetDataResource(int resource_id) {
572 return TestShell::ResourceProvider(resource_id);
573 }
574
575 base::StringPiece TestShellWebKitInit::GetImageResource(int resource_id,
576 float scale_factor) {
572 switch (resource_id) { 577 switch (resource_id) {
573 case IDR_BROKENIMAGE: 578 case IDR_BROKENIMAGE:
574 resource_id = IDR_BROKENIMAGE_TESTSHELL; 579 resource_id = IDR_BROKENIMAGE_TESTSHELL;
575 break; 580 break;
576 case IDR_TEXTAREA_RESIZER: 581 case IDR_TEXTAREA_RESIZER:
577 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; 582 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL;
578 break; 583 break;
579 } 584 }
585 // TODO(flackr): Pass scale_factor.
580 return TestShell::ResourceProvider(resource_id); 586 return TestShell::ResourceProvider(resource_id);
581 } 587 }
OLDNEW
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | webkit/tools/test_shell/test_shell_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698