summaryrefslogtreecommitdiffstats
path: root/chrome/test/base/testing_browser_process.cc
diff options
context:
space:
mode:
authordharani@google.com <dharani@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-09 03:07:45 +0000
committerdharani@google.com <dharani@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-09 03:07:45 +0000
commitb3520c076d552f69efafff85dbc96bfde14de091 (patch)
treed81c7a0b70fa8e29ee9cf9b5afed669c0ef6045f /chrome/test/base/testing_browser_process.cc
parent124aff4eaf05a3ad67758982e7e41d5f9a7b4c43 (diff)
downloadchromium_src-b3520c076d552f69efafff85dbc96bfde14de091.zip
chromium_src-b3520c076d552f69efafff85dbc96bfde14de091.tar.gz
chromium_src-b3520c076d552f69efafff85dbc96bfde14de091.tar.bz2
Revert 155468 - Change how ui::Clipboard is accessed so there's only one per thread.
Currently, there can be any number of Clipboard objects, which can be massively simplified. This removes interfaces for fetching the Clipboard and makes everyone go through a single static ui::Clipboard::GetForCurrentThread() access point. BUG=130805 TBR=tc (change in webkit/ is trivial) Review URL: https://chromiumcodereview.appspot.com/10911074 TBR=erg@chromium.org Review URL: https://chromiumcodereview.appspot.com/10919180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/base/testing_browser_process.cc')
-rw-r--r--chrome/test/base/testing_browser_process.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc
index e1fc242..d8d7a80 100644
--- a/chrome/test/base/testing_browser_process.cc
+++ b/chrome/test/base/testing_browser_process.cc
@@ -17,6 +17,7 @@
#include "content/public/browser/notification_service.h"
#include "net/url_request/url_request_context_getter.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/clipboard/clipboard.h"
#if !defined(ENABLE_CONFIGURATION_POLICY)
#include "chrome/browser/policy/policy_service_stub.h"
@@ -124,6 +125,14 @@ chromeos::OomPriorityManager* TestingBrowserProcess::oom_priority_manager() {
}
#endif // defined(OS_CHROMEOS)
+ui::Clipboard* TestingBrowserProcess::clipboard() {
+ if (!clipboard_.get()) {
+ // Note that we need a MessageLoop for the next call to work.
+ clipboard_.reset(new ui::Clipboard);
+ }
+ return clipboard_.get();
+}
+
extensions::EventRouterForwarder*
TestingBrowserProcess::extension_event_router_forwarder() {
return NULL;