| 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/ui/webui/options/chromeos/virtual_keyboard_manager_hand
ler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_hand
ler.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 }; | 52 }; |
| 53 RegisterStrings(localized_strings, resources, arraysize(resources)); | 53 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 54 | 54 |
| 55 RegisterTitle(localized_strings, "virtualKeyboardPage", | 55 RegisterTitle(localized_strings, "virtualKeyboardPage", |
| 56 IDS_OPTIONS_SETTINGS_LANGUAGES_VIRTUAL_KEYBOARD_SETTINGS_TITLE); | 56 IDS_OPTIONS_SETTINGS_LANGUAGES_VIRTUAL_KEYBOARD_SETTINGS_TITLE); |
| 57 | 57 |
| 58 // Do not call GetVirtualKeyboardList() here since |web_ui()| is not ready | 58 // Do not call GetVirtualKeyboardList() here since |web_ui()| is not ready |
| 59 // yet. | 59 // yet. |
| 60 } | 60 } |
| 61 | 61 |
| 62 void VirtualKeyboardManagerHandler::Initialize() { | |
| 63 } | |
| 64 | |
| 65 void VirtualKeyboardManagerHandler::RegisterMessages() { | 62 void VirtualKeyboardManagerHandler::RegisterMessages() { |
| 66 // Register handler functions for chrome.send(). | 63 // Register handler functions for chrome.send(). |
| 67 web_ui()->RegisterMessageCallback("updateVirtualKeyboardList", | 64 web_ui()->RegisterMessageCallback("updateVirtualKeyboardList", |
| 68 base::Bind(&VirtualKeyboardManagerHandler::UpdateVirtualKeyboardList, | 65 base::Bind(&VirtualKeyboardManagerHandler::UpdateVirtualKeyboardList, |
| 69 base::Unretained(this))); | 66 base::Unretained(this))); |
| 70 web_ui()->RegisterMessageCallback("setVirtualKeyboardPreference", | 67 web_ui()->RegisterMessageCallback("setVirtualKeyboardPreference", |
| 71 base::Bind(&VirtualKeyboardManagerHandler::SetVirtualKeyboardPreference, | 68 base::Bind(&VirtualKeyboardManagerHandler::SetVirtualKeyboardPreference, |
| 72 base::Unretained(this))); | 69 base::Unretained(this))); |
| 73 web_ui()->RegisterMessageCallback("clearVirtualKeyboardPreference", | 70 web_ui()->RegisterMessageCallback("clearVirtualKeyboardPreference", |
| 74 base::Bind(&VirtualKeyboardManagerHandler::ClearVirtualKeyboardPreference, | 71 base::Bind(&VirtualKeyboardManagerHandler::ClearVirtualKeyboardPreference, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 virtual_keyboard->SetString("name", i->second->name()); | 223 virtual_keyboard->SetString("name", i->second->name()); |
| 227 virtual_keyboard->SetBoolean("isSystem", i->second->is_system()); | 224 virtual_keyboard->SetBoolean("isSystem", i->second->is_system()); |
| 228 virtual_keyboard->SetString("url", i->second->url().spec()); | 225 virtual_keyboard->SetString("url", i->second->url().spec()); |
| 229 supported_keyboards->Append(virtual_keyboard); | 226 supported_keyboards->Append(virtual_keyboard); |
| 230 } | 227 } |
| 231 | 228 |
| 232 return layout_list; | 229 return layout_list; |
| 233 } | 230 } |
| 234 | 231 |
| 235 } // namespace chromeos | 232 } // namespace chromeos |
| OLD | NEW |