summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-22 18:03:28 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-22 18:03:28 +0000
commitdffee0bef4842f3b0c3a0a134090a2f870beb870 (patch)
tree05655850e4976df30c395797e86ec86c912e0faf /chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
parentb1f287dcf708ce1257acc0cffa1813f7c249150b (diff)
downloadchromium_src-dffee0bef4842f3b0c3a0a134090a2f870beb870.zip
chromium_src-dffee0bef4842f3b0c3a0a134090a2f870beb870.tar.gz
chromium_src-dffee0bef4842f3b0c3a0a134090a2f870beb870.tar.bz2
Decouple input_method from BrowserThread (and content/).
BUG=164375 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173477 Review URL: https://chromiumcodereview.appspot.com/11558017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/input_method/input_method_delegate_impl.cc')
-rw-r--r--chrome/browser/chromeos/input_method/input_method_delegate_impl.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc b/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
index a69cdc4..0451277 100644
--- a/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_delegate_impl.cc
@@ -5,9 +5,11 @@
#include "chrome/browser/chromeos/input_method/input_method_delegate_impl.h"
#include "base/logging.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
+#include "content/public/browser/browser_thread.h"
namespace chromeos {
namespace input_method {
@@ -33,5 +35,19 @@ std::string InputMethodDelegateImpl::GetActiveLocale() const {
return std::string();
}
+scoped_refptr<base::SequencedTaskRunner>
+InputMethodDelegateImpl::GetDefaultTaskRunner() const {
+ return content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::UI);
+}
+
+scoped_refptr<base::SequencedTaskRunner>
+InputMethodDelegateImpl::GetWorkerTaskRunner() const {
+ scoped_refptr<base::SequencedWorkerPool> worker_pool(
+ content::BrowserThread::GetBlockingPool());
+
+ return worker_pool->GetSequencedTaskRunner(worker_pool->GetSequenceToken());
+}
+
} // namespace input_method
} // namespace chromeos