Home | History | Annotate | Download | only in ime
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef UI_BASE_IME_TEXT_INPUT_TYPE_H_
      6 #define UI_BASE_IME_TEXT_INPUT_TYPE_H_
      7 
      8 namespace ui {
      9 
     10 // Intentionally keep sync with blink::WebTextInputType defined in:
     11 // third_party/WebKit/public/web/WebTextInputType.h
     12 enum TextInputType {
     13   // Input caret is not in an editable node, no input method shall be used.
     14   TEXT_INPUT_TYPE_NONE,
     15 
     16   // Input caret is in a normal editable node, any input method can be used.
     17   TEXT_INPUT_TYPE_TEXT,
     18 
     19   // Input caret is in a password box, an input method may be used only if
     20   // it's suitable for password input.
     21   TEXT_INPUT_TYPE_PASSWORD,
     22 
     23   TEXT_INPUT_TYPE_SEARCH,
     24   TEXT_INPUT_TYPE_EMAIL,
     25   TEXT_INPUT_TYPE_NUMBER,
     26   TEXT_INPUT_TYPE_TELEPHONE,
     27   TEXT_INPUT_TYPE_URL,
     28   TEXT_INPUT_TYPE_DATE,
     29   TEXT_INPUT_TYPE_DATE_TIME,
     30   TEXT_INPUT_TYPE_DATE_TIME_LOCAL,
     31   TEXT_INPUT_TYPE_MONTH,
     32   TEXT_INPUT_TYPE_TIME,
     33   TEXT_INPUT_TYPE_WEEK,
     34   TEXT_INPUT_TYPE_TEXT_AREA,
     35 
     36   // Input caret is in a contenteditable node (not an INPUT field).
     37   TEXT_INPUT_TYPE_CONTENT_EDITABLE,
     38 
     39   // The focused node is date time field. The date time field does not have
     40   // input caret but it is necessary to distinguish from TEXT_INPUT_TYPE_NONE
     41   // for on-screen keyboard.
     42   TEXT_INPUT_TYPE_DATE_TIME_FIELD,
     43 
     44   TEXT_INPUT_TYPE_MAX = TEXT_INPUT_TYPE_DATE_TIME_FIELD,
     45 };
     46 
     47 }  // namespace ui
     48 
     49 #endif  // UI_BASE_IME_TEXT_INPUT_TYPE_H_
     50