diff options
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webclipboard_impl.cc | 10 | ||||
-rw-r--r-- | webkit/glue/webclipboard_impl.h | 7 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.cc | 5 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.h | 3 |
4 files changed, 13 insertions, 12 deletions
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc index 21674d2..a95f7e8 100644 --- a/webkit/glue/webclipboard_impl.cc +++ b/webkit/glue/webclipboard_impl.cc @@ -7,7 +7,6 @@ #include "base/clipboard.h" #include "base/logging.h" #include "base/string_util.h" -#include "base/string16.h" #include "googleurl/src/gurl.h" #include "net/base/escape.h" #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" @@ -23,7 +22,9 @@ using WebKit::WebURL; namespace webkit_glue { -static std::string URLToMarkup(const WebURL& url, const WebString& title) { +// Static +std::string WebClipboardImpl::URLToMarkup(const WebURL& url, + const WebString& title) { std::string markup("<a href=\""); markup.append(url.spec()); markup.append("\">"); @@ -33,8 +34,9 @@ static std::string URLToMarkup(const WebURL& url, const WebString& title) { return markup; } -static std::string URLToImageMarkup(const WebURL& url, - const WebString& title) { +// Static +std::string WebClipboardImpl::URLToImageMarkup(const WebURL& url, + const WebString& title) { std::string markup("<img src=\""); markup.append(url.spec()); markup.append("\""); diff --git a/webkit/glue/webclipboard_impl.h b/webkit/glue/webclipboard_impl.h index 6640203..f5b7b50 100644 --- a/webkit/glue/webclipboard_impl.h +++ b/webkit/glue/webclipboard_impl.h @@ -7,10 +7,17 @@ #include "third_party/WebKit/WebKit/chromium/public/WebClipboard.h" +#include <string> + namespace webkit_glue { class WebClipboardImpl : public WebKit::WebClipboard { public: + static std::string URLToMarkup(const WebKit::WebURL& url, + const WebKit::WebString& title); + static std::string URLToImageMarkup(const WebKit::WebURL& url, + const WebKit::WebString& title); + // WebClipboard methods: virtual bool isFormatAvailable(WebKit::WebClipboard::Format); virtual WebKit::WebString readPlainText(); diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index d14e2ba..b9ef492 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -11,7 +11,6 @@ #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebClipboard; using WebKit::WebCString; using WebKit::WebThemeEngine; @@ -22,10 +21,6 @@ WebKitClientImpl::WebKitClientImpl() shared_timer_func_(NULL) { } -WebClipboard* WebKitClientImpl::clipboard() { - return &clipboard_; -} - WebThemeEngine* WebKitClientImpl::themeEngine() { #if defined(OS_WIN) return &theme_engine_; diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h index e53605d..9fc95fa 100644 --- a/webkit/glue/webkitclient_impl.h +++ b/webkit/glue/webkitclient_impl.h @@ -7,7 +7,6 @@ #include "base/timer.h" #include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" -#include "webkit/glue/webclipboard_impl.h" #if defined(OS_WIN) #include "webkit/glue/webthemeengine_impl_win.h" #endif @@ -21,7 +20,6 @@ class WebKitClientImpl : public WebKit::WebKitClient { WebKitClientImpl(); // WebKitClient methods (partial implementation): - virtual WebKit::WebClipboard* clipboard(); virtual WebKit::WebThemeEngine* themeEngine(); virtual void decrementStatsCounter(const char* name); virtual void incrementStatsCounter(const char* name); @@ -40,7 +38,6 @@ class WebKitClientImpl : public WebKit::WebKitClient { shared_timer_func_(); } - WebClipboardImpl clipboard_; MessageLoop* main_loop_; base::OneShotTimer<WebKitClientImpl> shared_timer_; void (*shared_timer_func_)(); |