OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |