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

Unified Diff: ui/keyboard/keyboard_controller_proxy.cc

Issue 208633002: [Code cleanup]Remove webui virtual keyboard code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/keyboard/keyboard_controller_proxy.h ('k') | ui/keyboard/keyboard_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller_proxy.cc
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index c550a3fcbf9f1fb1446eddde9b3f15a3ad389e96..94bd58f25b3d202976b0b90a08ad2f2d24c937c4 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -20,39 +20,6 @@
namespace {
-// Converts ui::TextInputType to string.
-std::string TextInputTypeToString(ui::TextInputType type) {
- switch (type) {
- case ui::TEXT_INPUT_TYPE_NONE:
- return "none";
- case ui::TEXT_INPUT_TYPE_PASSWORD:
- return "password";
- case ui::TEXT_INPUT_TYPE_EMAIL:
- return "email";
- case ui::TEXT_INPUT_TYPE_NUMBER:
- return "number";
- case ui::TEXT_INPUT_TYPE_TELEPHONE:
- return "tel";
- case ui::TEXT_INPUT_TYPE_URL:
- return "url";
- case ui::TEXT_INPUT_TYPE_DATE:
- return "date";
- case ui::TEXT_INPUT_TYPE_TEXT:
- case ui::TEXT_INPUT_TYPE_SEARCH:
- case ui::TEXT_INPUT_TYPE_DATE_TIME:
- case ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL:
- case ui::TEXT_INPUT_TYPE_MONTH:
- case ui::TEXT_INPUT_TYPE_TIME:
- case ui::TEXT_INPUT_TYPE_WEEK:
- case ui::TEXT_INPUT_TYPE_TEXT_AREA:
- case ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE:
- case ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD:
- return "text";
- }
- NOTREACHED();
- return "";
-}
-
// The WebContentsDelegate for the keyboard.
// The delegate deletes itself when the keyboard is destroyed.
class KeyboardContentsDelegate : public content::WebContentsDelegate,
@@ -112,7 +79,7 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
namespace keyboard {
KeyboardControllerProxy::KeyboardControllerProxy()
- : default_url_(kKeyboardWebUIURL), resizing_from_contents_(false) {
+ : default_url_(kKeyboardURL), resizing_from_contents_(false) {
}
KeyboardControllerProxy::~KeyboardControllerProxy() {
@@ -165,17 +132,6 @@ void KeyboardControllerProxy::HideKeyboardContainer(aura::Window* container) {
}
void KeyboardControllerProxy::SetUpdateInputType(ui::TextInputType type) {
- content::WebUI* webui = keyboard_contents_ ?
- keyboard_contents_->GetCommittedWebUI() : NULL;
-
- if (webui &&
- (0 != (webui->GetBindings() & content::BINDINGS_POLICY_WEB_UI))) {
- // Only call OnTextInputBoxFocused function if it is a web ui keyboard,
- // not an extension based keyboard.
- base::DictionaryValue input_context;
- input_context.SetString("type", TextInputTypeToString(type));
- webui->CallJavascriptFunction("OnTextInputBoxFocused", input_context);
- }
}
void KeyboardControllerProxy::EnsureCaretInWorkArea() {
« no previous file with comments | « ui/keyboard/keyboard_controller_proxy.h ('k') | ui/keyboard/keyboard_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698