Home | History | Annotate | Download | only in login
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.h"
      6 
      7 #include <vector>
      8 
      9 #include "url/gurl.h"
     10 
     11 namespace chromeos {
     12 
     13 MockInputMethodManagerWithInputMethods::
     14     MockInputMethodManagerWithInputMethods() {
     15 }
     16 
     17 MockInputMethodManagerWithInputMethods::
     18     ~MockInputMethodManagerWithInputMethods() {
     19 }
     20 
     21 scoped_ptr<input_method::InputMethodDescriptors>
     22 MockInputMethodManagerWithInputMethods::GetSupportedInputMethods() const {
     23   return scoped_ptr<input_method::InputMethodDescriptors>(
     24       new input_method::InputMethodDescriptors(descriptors_));
     25 }
     26 
     27 void MockInputMethodManagerWithInputMethods::AddInputMethod(
     28     const std::string& id,
     29     const std::string& raw_layout,
     30     const std::string& language_code) {
     31   std::vector<std::string> layouts;
     32   layouts.push_back(raw_layout);
     33   std::vector<std::string> languages;
     34   languages.push_back(language_code);
     35   descriptors_.push_back(input_method::InputMethodDescriptor(
     36       id, std::string(), std::string(), layouts, languages, true,
     37       GURL(), GURL()));
     38 }
     39 
     40 }  // namespace chromeos
     41