Remove tw_input_type.h
authorArnaud Renevier <a.renevier@samsung.com>
Sat, 28 Feb 2015 05:32:48 +0000 (21:32 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
This patch remove tw_input_type.h. We can easily use ui::TextInputType
instead.
Reviewed by: Antonio Gomes, Piotr Tworek

Change-Id: I2072200f74cbada0618674f43da31445f1708d68
Signed-off-by: Arnaud Renevier <a.renevier@samsung.com>
tizen_src/impl/browser/inputpicker/InputPicker.cc
tizen_src/impl/browser/inputpicker/InputPicker.h
tizen_src/impl/eweb_view.cc
tizen_src/impl/eweb_view.h
tizen_src/impl/tizen_webview/public/tw_input_type.h [deleted file]
tizen_src/impl/web_contents_delegate_efl.cc

index f5c1c58..053701d 100755 (executable)
@@ -320,21 +320,34 @@ void InputPicker::endEditingCallback(
 #endif
 
 void InputPicker::showDatePicker(
-    tizen_webview::Input_Type input_type, double input_date) {
+    ui::TextInputType input_type, double input_date) {
+
   web_view_.ExecuteEditCommand("Unselect", 0);
 
-  if (input_type == TW_INPUT_TYPE_DATE)
-    showDatePopup(input_date);
-  else if (input_type == TW_INPUT_TYPE_TIME)
-    showTimePopup(input_date);
-  else if (input_type == TW_INPUT_TYPE_DATETIME)
-    showDatetimePopup(input_date, false);
-  else if (input_type == TW_INPUT_TYPE_DATETIMELOCAL)
-    showDatetimePopup(input_date, true);
-  else if (input_type == TW_INPUT_TYPE_MONTH)
-    showMonthPopup(input_date);
-  else if (input_type == TW_INPUT_TYPE_WEEK)
-    showWeekPopup(input_date);
+  switch (input_type) {
+    case ui::TEXT_INPUT_TYPE_DATE:
+      showDatePopup(input_date);
+      break;
+    case ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD:
+    case ui::TEXT_INPUT_TYPE_DATE_TIME:
+      showDatetimePopup(input_date, false);
+      break;
+    case ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL:
+      showDatetimePopup(input_date, true);
+      break;
+    case ui::TEXT_INPUT_TYPE_TIME:
+      showTimePopup(input_date);
+      break;
+    case ui::TEXT_INPUT_TYPE_WEEK:
+      showWeekPopup(input_date);
+      break;
+    case ui::TEXT_INPUT_TYPE_MONTH:
+      showMonthPopup(input_date);
+      break;
+    default:
+      break;
+  }
+
 }
 
 void InputPicker::ShowColorPicker(int r, int g, int b, int alpha) {
index fde4901..0c3afdf 100755 (executable)
@@ -7,8 +7,7 @@
 
 #include <ctime>
 #include <Evas.h>
-
-#include "tizen_webview/public/tw_input_type.h"
+#include "ui/base/ime/text_input_type.h"
 
 class EWebView;
 
@@ -24,7 +23,7 @@ class InputPicker {
     ~InputPicker();
 
     void showDatePicker(
-        tizen_webview::Input_Type input_type, double input_date);
+        ui::TextInputType input_type, double input_date);
     void ShowColorPicker(int r, int g, int b, int alpha);
     void HideColorPicker();
     void SetPopupSize(int width, int height);
index 41dd834..26afc95 100644 (file)
@@ -2151,7 +2151,8 @@ bool EWebView::SetColorPickerColor(int r, int g, int b, int a) {
 }
 
 void EWebView::InputPickerShow(
-    tizen_webview::Input_Type input_type, double input_value) {
+    ui::TextInputType input_type, double input_value) {
+
   inputPicker_.reset(new InputPicker(*this));
   inputPicker_->showDatePicker(input_type, input_value);
 }
index e387a7c..edede6e 100644 (file)
@@ -66,7 +66,6 @@
 #include "tizen_webview/public/tw_callbacks.h"
 #include "tizen_webview/public/tw_content_security_policy.h"
 #include "tizen_webview/public/tw_frame.h"
-#include "tizen_webview/public/tw_input_type.h"
 #include "tizen_webview/public/tw_find_options.h"
 #include "tizen_webview/public/tw_touch_event.h"
 
@@ -437,7 +436,7 @@ class EWebView {
   void DismissColorPicker();
   bool SetColorPickerColor(int r, int g, int b, int a);
   void InputPickerShow(
-      tizen_webview::Input_Type input_type, double input_value);
+      ui::TextInputType input_type, double input_value);
   void FindAndRunSnapshotCallback(Evas_Object* image, int snapshotId);
 
 #ifdef TIZEN_EDGE_EFFECT
diff --git a/tizen_src/impl/tizen_webview/public/tw_input_type.h b/tizen_src/impl/tizen_webview/public/tw_input_type.h
deleted file mode 100644 (file)
index f548875..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 Samsung Electronics. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef TIZEN_WEBVIEW_PUBLIC_TW_INPUT_TYPE_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_INPUT_TYPE_H_
-
-namespace tizen_webview {
-
-// Provides type of focused input element
-enum Input_Type {
-  TW_INPUT_TYPE_TEXT,
-  TW_INPUT_TYPE_TELEPHONE,
-  TW_INPUT_TYPE_NUMBER,
-  TW_INPUT_TYPE_EMAIL,
-  TW_INPUT_TYPE_URL,
-  TW_INPUT_TYPE_PASSWORD,
-  TW_INPUT_TYPE_COLOR,
-  TW_INPUT_TYPE_DATE,
-  TW_INPUT_TYPE_DATETIME,
-  TW_INPUT_TYPE_DATETIMELOCAL,
-  TW_INPUT_TYPE_MONTH,
-  TW_INPUT_TYPE_TIME,
-  TW_INPUT_TYPE_WEEK
-};
-
-} // namespace tizen_webview
-
-#endif  // TIZEN_WEBVIEW_PUBLIC_TW_INPUT_TYPE_H_
index 324fcd5..c49b57f 100644 (file)
@@ -32,7 +32,6 @@
 #include "browser/favicon/favicon_service.h"
 
 #include "tizen_webview/public/tw_web_context.h"
-#include "tizen_webview/public/tw_input_type.h"
 
 #if defined(OS_TIZEN)
 #include "content/public/browser/media_capture_devices.h"
@@ -615,36 +614,6 @@ void WebContentsDelegateEfl::OpenDateTimeDialog(
     double step,
     const std::vector<DateTimeSuggestion>& suggestions) {
   int inputPickerType;
-
-  switch (dialog_type) {
-    case ui::TEXT_INPUT_TYPE_DATE:
-      inputPickerType = TW_INPUT_TYPE_DATE;
-      break;
-    case ui::TEXT_INPUT_TYPE_DATE_TIME:
-      inputPickerType = TW_INPUT_TYPE_DATETIME;
-      break;
-    case ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL:
-      inputPickerType = TW_INPUT_TYPE_DATETIMELOCAL;
-      break;
-    case ui::TEXT_INPUT_TYPE_TIME:
-      inputPickerType = TW_INPUT_TYPE_TIME;
-      break;
-    case ui::TEXT_INPUT_TYPE_WEEK:
-      inputPickerType = TW_INPUT_TYPE_WEEK;
-      break;
-    case ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE:
-      inputPickerType = TW_INPUT_TYPE_TEXT;
-      break;
-    case ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD:
-      inputPickerType = TW_INPUT_TYPE_DATETIME;
-      break;
-    case ui::TEXT_INPUT_TYPE_MONTH:
-      inputPickerType = TW_INPUT_TYPE_MONTH;
-      break;
-    default:
-      inputPickerType = TW_INPUT_TYPE_TEXT;
-      break;
-  }
-  web_view_->InputPickerShow(static_cast<tizen_webview::Input_Type>(inputPickerType), dialog_value);
+  web_view_->InputPickerShow(dialog_type, dialog_value);
 }
 } //namespace content