OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/extension_input_method_api.h" | 5 #include "chrome/browser/extensions/extension_input_method_api.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 8 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
9 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" | 9 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 if (!chromeos::ExtensionInputMethodEventRouter:: | 24 if (!chromeos::ExtensionInputMethodEventRouter:: |
25 IsExtensionWhitelisted(extension_id())) { | 25 IsExtensionWhitelisted(extension_id())) { |
26 error_ = kErrorInputMethodPrivateApi; | 26 error_ = kErrorInputMethodPrivateApi; |
27 return false; | 27 return false; |
28 } | 28 } |
29 chromeos::input_method::InputMethodManager* manager = | 29 chromeos::input_method::InputMethodManager* manager = |
30 chromeos::input_method::InputMethodManager::GetInstance(); | 30 chromeos::input_method::InputMethodManager::GetInstance(); |
31 std::string input_method = | 31 std::string input_method = |
32 chromeos::ExtensionInputMethodEventRouter::GetInputMethodForXkb( | 32 chromeos::ExtensionInputMethodEventRouter::GetInputMethodForXkb( |
33 manager->current_input_method().id()); | 33 manager->current_input_method().id()); |
34 result_.reset(Value::CreateStringValue(input_method)); | 34 result_.reset(base::StringValue::New(input_method)); |
35 return true; | 35 return true; |
36 } | 36 } |
OLD | NEW |