Remove GCMDriver::IsGCMClientReady
[chromium-blink-merge.git] / chromeos / ime / input_method_descriptor.cc
blob49b03605eb71b839e577848ada49bd64dd862712
1 // Copyright 2013 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.
5 #include "chromeos/ime/input_method_descriptor.h"
7 #include <sstream>
9 #include "base/logging.h"
10 #include "base/strings/string_split.h"
11 #include "url/gurl.h"
13 namespace chromeos {
14 namespace input_method {
16 InputMethodDescriptor::InputMethodDescriptor(
17 const std::string& id,
18 const std::string& name,
19 const std::string& indicator,
20 const std::vector<std::string>& keyboard_layouts,
21 const std::vector<std::string>& language_codes,
22 bool is_login_keyboard,
23 const GURL& options_page_url,
24 const GURL& input_view_url)
25 : id_(id),
26 name_(name),
27 keyboard_layouts_(keyboard_layouts),
28 language_codes_(language_codes),
29 indicator_(indicator),
30 is_login_keyboard_(is_login_keyboard),
31 options_page_url_(options_page_url),
32 input_view_url_(input_view_url) {
35 std::string InputMethodDescriptor::GetPreferredKeyboardLayout() const {
36 // TODO(nona): Investigate better way to guess the preferred layout
37 // http://crbug.com/170601.
38 return keyboard_layouts_.empty() ? "us" : keyboard_layouts_[0];
41 InputMethodDescriptor::InputMethodDescriptor() {
44 InputMethodDescriptor::~InputMethodDescriptor() {
47 } // namespace input_method
48 } // namespace chromeos