From 026abdef028e0871a092da790a984fdd8df37e55 Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Mon, 21 Nov 2011 22:53:17 +0000 Subject: Move a bunch of ChromeOS APIs out of chrome/browser/extensions. BUG=101244 Review URL: http://codereview.chromium.org/8609008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111022 0039d316-1c4b-4281-b951-d872f2087c98 --- .../extensions/extension_input_method_api.cc | 43 ---------------------- 1 file changed, 43 deletions(-) delete mode 100644 chrome/browser/extensions/extension_input_method_api.cc (limited to 'chrome/browser/extensions/extension_input_method_api.cc') diff --git a/chrome/browser/extensions/extension_input_method_api.cc b/chrome/browser/extensions/extension_input_method_api.cc deleted file mode 100644 index cf2bbd2..0000000 --- a/chrome/browser/extensions/extension_input_method_api.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/extensions/extension_input_method_api.h" - -#include "base/values.h" -#include "chrome/browser/chromeos/input_method/input_method_manager.h" -#include "chrome/browser/chromeos/extensions/input_method_event_router.h" -#include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/profiles/profile.h" - -namespace { - -const char kErrorInputMethodPrivateApi[] = "Input method API is private"; - -} // namespace - -GetInputMethodFunction::GetInputMethodFunction() { -} - -GetInputMethodFunction::~GetInputMethodFunction() { -} - -bool GetInputMethodFunction::RunImpl() { -#if !defined(OS_CHROMEOS) - error_ = kErrorInputMethodPrivateApi; - return false; -#else - chromeos::ExtensionInputMethodEventRouter* router = - profile_->GetExtensionService()->input_method_event_router(); - if (!router->IsExtensionWhitelisted(extension_id())) { - error_ = kErrorInputMethodPrivateApi; - return false; - } - chromeos::input_method::InputMethodManager* manager = - chromeos::input_method::InputMethodManager::GetInstance(); - const std::string input_method = - router->GetInputMethodForXkb(manager->current_input_method().id()); - result_.reset(Value::CreateStringValue(input_method)); - return true; -#endif -} -- cgit v1.1