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

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

Issue 8602002: Move some webkit_glue embedder functions into WebKitPlatformSupport virtual methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correct review items Created 9 years, 1 month 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) 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 <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 13 matching lines...) Expand all
24 #include "net/base/net_util.h" 24 #include "net/base/net_util.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
28 #include "ui/base/resource/resource_bundle.h" 28 #include "ui/base/resource/resource_bundle.h"
29 #include "webkit/glue/resource_loader_bridge.h" 29 #include "webkit/glue/resource_loader_bridge.h"
30 #include "webkit/glue/webkit_glue.h" 30 #include "webkit/glue/webkit_glue.h"
31 #include "webkit/glue/webpreferences.h" 31 #include "webkit/glue/webpreferences.h"
32 #include "webkit/plugins/npapi/plugin_list.h" 32 #include "webkit/plugins/npapi/plugin_list.h"
33 #include "webkit/tools/test_shell/test_navigation_controller.h" 33 #include "webkit/tools/test_shell/test_navigation_controller.h"
34 #include "webkit/tools/test_shell/test_shell_webkit_init.h"
34 #include "webkit/tools/test_shell/test_webview_delegate.h" 35 #include "webkit/tools/test_shell/test_webview_delegate.h"
35 36
36 using WebKit::WebPoint; 37 using WebKit::WebPoint;
37 using WebKit::WebWidget; 38 using WebKit::WebWidget;
38 39
39 namespace { 40 namespace {
40 41
41 // Convert a FilePath into an FcChar* (used by fontconfig). 42 // Convert a FilePath into an FcChar* (used by fontconfig).
42 // The pointer only lives for the duration for the expression. 43 // The pointer only lives for the duration for the expression.
43 const FcChar8* FilePathAsFcChar(const FilePath& path) { 44 const FcChar8* FilePathAsFcChar(const FilePath& path) {
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 gtk_widget_destroy(dialog); 555 gtk_widget_destroy(dialog);
555 } 556 }
556 557
557 // static 558 // static
558 base::StringPiece TestShell::ResourceProvider(int key) { 559 base::StringPiece TestShell::ResourceProvider(int key) {
559 return ResourceBundle::GetSharedInstance().GetRawDataResource(key); 560 return ResourceBundle::GetSharedInstance().GetRawDataResource(key);
560 } 561 }
561 562
562 //----------------------------------------------------------------------------- 563 //-----------------------------------------------------------------------------
563 564
564 namespace webkit_glue { 565 string16 TestShellWebKitInit::GetLocalizedString(int message_id) {
565
566 string16 GetLocalizedString(int message_id) {
567 return ResourceBundle::GetSharedInstance().GetLocalizedString(message_id); 566 return ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
568 } 567 }
569 568
570 base::StringPiece GetDataResource(int resource_id) { 569 base::StringPiece TestShellWebKitInit::GetDataResource(int resource_id) {
571 switch (resource_id) { 570 switch (resource_id) {
572 case IDR_BROKENIMAGE: 571 case IDR_BROKENIMAGE:
573 resource_id = IDR_BROKENIMAGE_TESTSHELL; 572 resource_id = IDR_BROKENIMAGE_TESTSHELL;
574 break; 573 break;
575 case IDR_TEXTAREA_RESIZER: 574 case IDR_TEXTAREA_RESIZER:
576 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; 575 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL;
577 break; 576 break;
578 } 577 }
579 return TestShell::ResourceProvider(resource_id); 578 return TestShell::ResourceProvider(resource_id);
580 } 579 }
581
582 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698