summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkitclient_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 16:32:23 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 16:32:23 +0000
commit2ec901008f1e38e1c12aa8a955a722adde8d4fc0 (patch)
tree4848de7dff9de5d8d8f35ee79db5860cbd958870 /webkit/glue/webkitclient_impl.cc
parent43f91a4f2a51cb808d4ba8c5975b83aba3b55c7e (diff)
downloadchromium_src-2ec901008f1e38e1c12aa8a955a722adde8d4fc0.zip
chromium_src-2ec901008f1e38e1c12aa8a955a722adde8d4fc0.tar.gz
chromium_src-2ec901008f1e38e1c12aa8a955a722adde8d4fc0.tar.bz2
More WebKit API action (chromium side)
R=dglazkov Review URL: http://codereview.chromium.org/39240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkitclient_impl.cc')
-rw-r--r--webkit/glue/webkitclient_impl.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index e726a6c..61efece 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -4,7 +4,11 @@
#include "webkit/glue/webkitclient_impl.h"
+#include "WebCString.h"
+
#include "base/message_loop.h"
+#include "grit/webkit_resources.h"
+#include "webkit/glue/webkit_glue.h"
namespace webkit_glue {
@@ -17,6 +21,30 @@ WebKit::WebClipboard* WebKitClientImpl::clipboard() {
return &clipboard_;
}
+WebKit::WebCString WebKitClientImpl::loadResource(const char* name) {
+ struct {
+ const char* name;
+ int id;
+ } resources[] = {
+ { "textAreaResizeCorner", IDR_TEXTAREA_RESIZER },
+ { "missingImage", IDR_BROKENIMAGE },
+ { "tickmarkDash", IDR_TICKMARK_DASH },
+ { "panIcon", IDR_PAN_SCROLL_ICON },
+#if defined(OS_LINUX)
+ { "linuxCheckboxOff", IDR_LINUX_CHECKBOX_OFF },
+ { "linuxCheckboxOn", IDR_LINUX_CHECKBOX_ON },
+ { "linuxRadioOff", IDR_LINUX_RADIO_OFF },
+ { "linuxRadioOn", IDR_LINUX_RADIO_ON },
+#endif
+ };
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) {
+ if (!strcmp(name, resources[i].name))
+ return webkit_glue::GetDataResource(resources[i].id);
+ }
+ NOTREACHED() << "Unknown image resource " << name;
+ return WebKit::WebCString();
+}
+
double WebKitClientImpl::currentTime() {
return base::Time::Now().ToDoubleT();
}