Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/virtual_keyboard_manager_handler2.cc

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright bumps Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/options2/chromeos/virtual_keyboard_manager_han dler2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/virtual_keyboard_manager_han dler2.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 }; 53 };
54 RegisterStrings(localized_strings, resources, arraysize(resources)); 54 RegisterStrings(localized_strings, resources, arraysize(resources));
55 55
56 RegisterTitle(localized_strings, "virtualKeyboardPage", 56 RegisterTitle(localized_strings, "virtualKeyboardPage",
57 IDS_OPTIONS_SETTINGS_LANGUAGES_VIRTUAL_KEYBOARD_SETTINGS_TITLE); 57 IDS_OPTIONS_SETTINGS_LANGUAGES_VIRTUAL_KEYBOARD_SETTINGS_TITLE);
58 58
59 // Do not call GetVirtualKeyboardList() here since |web_ui()| is not ready 59 // Do not call GetVirtualKeyboardList() here since |web_ui()| is not ready
60 // yet. 60 // yet.
61 } 61 }
62 62
63 void VirtualKeyboardManagerHandler::Initialize() {
64 }
65
66 void VirtualKeyboardManagerHandler::RegisterMessages() { 63 void VirtualKeyboardManagerHandler::RegisterMessages() {
67 // Register handler functions for chrome.send(). 64 // Register handler functions for chrome.send().
68 web_ui()->RegisterMessageCallback("updateVirtualKeyboardList", 65 web_ui()->RegisterMessageCallback("updateVirtualKeyboardList",
69 base::Bind(&VirtualKeyboardManagerHandler::UpdateVirtualKeyboardList, 66 base::Bind(&VirtualKeyboardManagerHandler::UpdateVirtualKeyboardList,
70 base::Unretained(this))); 67 base::Unretained(this)));
71 web_ui()->RegisterMessageCallback("setVirtualKeyboardPreference", 68 web_ui()->RegisterMessageCallback("setVirtualKeyboardPreference",
72 base::Bind(&VirtualKeyboardManagerHandler::SetVirtualKeyboardPreference, 69 base::Bind(&VirtualKeyboardManagerHandler::SetVirtualKeyboardPreference,
73 base::Unretained(this))); 70 base::Unretained(this)));
74 web_ui()->RegisterMessageCallback("clearVirtualKeyboardPreference", 71 web_ui()->RegisterMessageCallback("clearVirtualKeyboardPreference",
75 base::Bind(&VirtualKeyboardManagerHandler::ClearVirtualKeyboardPreference, 72 base::Bind(&VirtualKeyboardManagerHandler::ClearVirtualKeyboardPreference,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 virtual_keyboard->SetBoolean("isSystem", i->second->is_system()); 225 virtual_keyboard->SetBoolean("isSystem", i->second->is_system());
229 virtual_keyboard->SetString("url", i->second->url().spec()); 226 virtual_keyboard->SetString("url", i->second->url().spec());
230 supported_keyboards->Append(virtual_keyboard); 227 supported_keyboards->Append(virtual_keyboard);
231 } 228 }
232 229
233 return layout_list; 230 return layout_list;
234 } 231 }
235 232
236 } // namespace options2 233 } // namespace options2
237 } // namespace chromeos 234 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698