summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 04:14:11 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 04:14:11 +0000
commit1b8d02f181d089ee670f2ba72089c3722f679d5f (patch)
tree42ca83bfe4ffe27afa3e67179749826bb40869e2 /chrome/browser/renderer_host
parent80720414325af11e0dccedaf8c8f65998f91ec76 (diff)
downloadchromium_src-1b8d02f181d089ee670f2ba72089c3722f679d5f.zip
chromium_src-1b8d02f181d089ee670f2ba72089c3722f679d5f.tar.gz
chromium_src-1b8d02f181d089ee670f2ba72089c3722f679d5f.tar.bz2
Get rid of the ClipboardService class and header... it is nothing but a shell around base::Clipboard now.
http://crbug.com/11387 Review URL: http://codereview.chromium.org/105011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc17
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h11
-rw-r--r--chrome/browser/renderer_host/resource_message_filter_gtk.cc9
3 files changed, 17 insertions, 20 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 180b37a..6a51ee7 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -23,7 +23,6 @@
#include "chrome/common/app_cache/app_cache_dispatcher_host.h"
#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/chrome_plugin_util.h"
-#include "chrome/common/clipboard_service.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
@@ -98,7 +97,7 @@ class WriteClipboardTask : public Task {
~WriteClipboardTask() {}
void Run() {
- g_browser_process->clipboard_service()->WriteObjects(*objects_.get());
+ g_browser_process->clipboard()->WriteObjects(*objects_.get());
}
private:
@@ -570,21 +569,21 @@ void ResourceMessageFilter::OnClipboardWriteObjects(
void ResourceMessageFilter::OnClipboardIsFormatAvailable(
Clipboard::FormatType format, IPC::Message* reply) {
- const bool result = GetClipboardService()->IsFormatAvailable(format);
+ const bool result = GetClipboard()->IsFormatAvailable(format);
ViewHostMsg_ClipboardIsFormatAvailable::WriteReplyParams(reply, result);
Send(reply);
}
void ResourceMessageFilter::OnClipboardReadText(IPC::Message* reply) {
string16 result;
- GetClipboardService()->ReadText(&result);
+ GetClipboard()->ReadText(&result);
ViewHostMsg_ClipboardReadText::WriteReplyParams(reply, result);
Send(reply);
}
void ResourceMessageFilter::OnClipboardReadAsciiText(IPC::Message* reply) {
std::string result;
- GetClipboardService()->ReadAsciiText(&result);
+ GetClipboard()->ReadAsciiText(&result);
ViewHostMsg_ClipboardReadAsciiText::WriteReplyParams(reply, result);
Send(reply);
}
@@ -592,7 +591,7 @@ void ResourceMessageFilter::OnClipboardReadAsciiText(IPC::Message* reply) {
void ResourceMessageFilter::OnClipboardReadHTML(IPC::Message* reply) {
std::string src_url_str;
string16 markup;
- GetClipboardService()->ReadHTML(&markup, &src_url_str);
+ GetClipboard()->ReadHTML(&markup, &src_url_str);
const GURL src_url = GURL(src_url_str);
ViewHostMsg_ClipboardReadHTML::WriteReplyParams(reply, markup, src_url);
@@ -758,12 +757,12 @@ void ResourceMessageFilter::OnScriptedPrintReply(
#endif // OS_WIN
// static
-ClipboardService* ResourceMessageFilter::GetClipboardService() {
+Clipboard* ResourceMessageFilter::GetClipboard() {
// We have a static instance of the clipboard service for use by all message
// filters. This instance lives for the life of the browser processes.
- static ClipboardService* clipboard_service = new ClipboardService();
+ static Clipboard* clipboard = new Clipboard;
- return clipboard_service;
+ return clipboard;
}
// Notes about SpellCheck.
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index e16ac8d..f394745 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -31,7 +31,7 @@
class AppCacheDispatcherHost;
class AudioRendererHost;
-class ClipboardService;
+class Clipboard;
class Profile;
class RenderWidgetHelper;
class SpellChecker;
@@ -217,12 +217,11 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
void DoOnClipboardReadHTML(IPC::Message* reply_msg);
#endif
- // We have our own clipboard service because we want to access the clipboard
- // on the IO thread instead of forwarding (possibly synchronous) messages to
- // the UI thread.
- // This instance of the clipboard service should be accessed only on the IO
+ // We have our own clipboard because we want to access the clipboard on the
+ // IO thread instead of forwarding (possibly synchronous) messages to the UI
+ // thread. This instance of the clipboard should be accessed only on the IO
// thread.
- static ClipboardService* GetClipboardService();
+ static Clipboard* GetClipboard();
// The channel associated with the renderer connection. This pointer is not
// owned by this class.
diff --git a/chrome/browser/renderer_host/resource_message_filter_gtk.cc b/chrome/browser/renderer_host/resource_message_filter_gtk.cc
index dc00486..8328a90 100644
--- a/chrome/browser/renderer_host/resource_message_filter_gtk.cc
+++ b/chrome/browser/renderer_host/resource_message_filter_gtk.cc
@@ -7,7 +7,6 @@
#include "base/clipboard.h"
#include "base/gfx/gtk_native_view_id_manager.h"
#include "chrome/browser/chrome_thread.h"
-#include "chrome/common/clipboard_service.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/x11_util.h"
@@ -104,7 +103,7 @@ void ResourceMessageFilter::DoOnGetRootWindowRect(gfx::NativeViewId view,
// Called on the UI thread.
void ResourceMessageFilter::DoOnClipboardIsFormatAvailable(
Clipboard::FormatType format, IPC::Message* reply_msg) {
- const bool result = GetClipboardService()->IsFormatAvailable(format);
+ const bool result = GetClipboard()->IsFormatAvailable(format);
ViewHostMsg_ClipboardIsFormatAvailable::WriteReplyParams(reply_msg, result);
@@ -116,7 +115,7 @@ void ResourceMessageFilter::DoOnClipboardIsFormatAvailable(
// Called on the UI thread.
void ResourceMessageFilter::DoOnClipboardReadText(IPC::Message* reply_msg) {
string16 result;
- GetClipboardService()->ReadText(&result);
+ GetClipboard()->ReadText(&result);
ViewHostMsg_ClipboardReadText::WriteReplyParams(reply_msg, result);
@@ -129,7 +128,7 @@ void ResourceMessageFilter::DoOnClipboardReadText(IPC::Message* reply_msg) {
void ResourceMessageFilter::DoOnClipboardReadAsciiText(
IPC::Message* reply_msg) {
std::string result;
- GetClipboardService()->ReadAsciiText(&result);
+ GetClipboard()->ReadAsciiText(&result);
ViewHostMsg_ClipboardReadAsciiText::WriteReplyParams(reply_msg, result);
@@ -142,7 +141,7 @@ void ResourceMessageFilter::DoOnClipboardReadAsciiText(
void ResourceMessageFilter::DoOnClipboardReadHTML(IPC::Message* reply_msg) {
std::string src_url_str;
string16 markup;
- GetClipboardService()->ReadHTML(&markup, &src_url_str);
+ GetClipboard()->ReadHTML(&markup, &src_url_str);
const GURL src_url = GURL(src_url_str);
ViewHostMsg_ClipboardReadHTML::WriteReplyParams(reply_msg, markup, src_url);