Remove tw_settings and tw_touch_point
authorArnaud Renevier <a.renevier@samsung.com>
Wed, 15 Apr 2015 22:19:34 +0000 (15:19 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
We use Ewk_Touch_Point instead of tw::touch_point

tw::Settings was the webview settings member of Ewk_Settings. It's the
object sent from browser process to render process. So this patch
renames it to WebViewSettings, and puts in common/ folder.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=11619

Change-Id: I62ff5383accb3065d67a3b22e2d3ac85ec7cce8c
Signed-off-by: Arnaud Renevier <a.renevier@samsung.com>
tizen_src/ewk/efl_integration/browser/web_cache_efl/web_cache_manager_efl.cc
tizen_src/ewk/efl_integration/common/render_messages_ewk.h
tizen_src/ewk/efl_integration/common/web_view_settings.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/efl_integration.gypi
tizen_src/ewk/efl_integration/private/ewk_settings_private.h
tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.h
tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc
tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.h
tizen_src/ewk/efl_integration/tizen_webview/public/tw_settings.h [deleted file]
tizen_src/ewk/efl_integration/tizen_webview/public/tw_touch_point.cc [deleted file]
tizen_src/ewk/efl_integration/tizen_webview/public/tw_touch_point.h [deleted file]

index 5d90dcd..93b7d1e 100644 (file)
@@ -14,8 +14,6 @@
 #include "content/public/browser/notification_types.h"
 #include "content/public/browser/render_process_host.h"
 
-using namespace tizen_webview;
-
 WebCacheManagerEfl::WebCacheManagerEfl(content::BrowserContext* browser_context)
     : browser_context_(browser_context),
       cache_model_(EWK_CACHE_MODEL_DOCUMENT_VIEWER)
index 12676a3..8e1b7ee 100644 (file)
@@ -10,6 +10,7 @@
 #include "common/error_params.h"
 #include "common/cache_params_efl.h"
 #include "common/navigation_policy_params.h"
+#include "common/web_view_settings.h"
 #include "ipc/ipc_message_macros.h"
 #include "ipc/ipc_channel_handle.h"
 #include "private/ewk_hit_test_private.h"
@@ -17,7 +18,6 @@
 #include "private/ewk_wrt_private.h"
 #include "public/ewk_hit_test.h"
 #include "public/ewk_view.h"
-#include "tizen_webview/public/tw_settings.h"
 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
 #include "third_party/WebKit/public/web/WebNavigationType.h"
 #include "third_party/WebKit/public/web/WebViewModeEnums.h"
@@ -34,7 +34,7 @@ IPC_STRUCT_TRAITS_BEGIN(Ewk_Wrt_Message_Data)
   IPC_STRUCT_TRAITS_MEMBER(reference_id)
 IPC_STRUCT_TRAITS_END()
 
-IPC_STRUCT_TRAITS_BEGIN(tizen_webview::Settings)
+IPC_STRUCT_TRAITS_BEGIN(WebViewSettings)
   IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows)
   IPC_STRUCT_TRAITS_MEMBER(link_effect_enabled)
 IPC_STRUCT_TRAITS_END()
@@ -229,7 +229,7 @@ IPC_MESSAGE_ROUTED1(EwkViewMsg_PlainTextGet,
 IPC_MESSAGE_ROUTED1(EwkViewMsg_SelectionTextStyleState,
                     SelectionStylePrams /* params */)
 
-IPC_MESSAGE_ROUTED1(EflViewMsg_UpdateSettings, tizen_webview::Settings)
+IPC_MESSAGE_ROUTED1(EflViewMsg_UpdateSettings, WebViewSettings)
 
 IPC_MESSAGE_ROUTED0(EwkHostMsg_PlayLinkEffect)
 
diff --git a/tizen_src/ewk/efl_integration/common/web_view_settings.h b/tizen_src/ewk/efl_integration/common/web_view_settings.h
new file mode 100644 (file)
index 0000000..d5c468e
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEB_VIEW_SETTINGS_H
+#define WEB_VIEW_SETTINGS_H
+
+struct WebViewSettings {
+  WebViewSettings()
+    : javascript_can_open_windows(false),
+      link_effect_enabled(true) {}
+
+  bool javascript_can_open_windows;
+  bool link_effect_enabled;
+};
+
+#endif // WEB_VIEW_SETTINGS_H
index 402d005..219682c 100644 (file)
       'common/version_info.cc',
       'common/web_contents_utils.cc',
       'common/web_contents_utils.h',
+      'common/web_view_settings.h',
 
       'private/back_forward_list.h',
       'private/ewk_auth_challenge_private.h',
       'public/ewk_touch.h',
       'public/text_encoding_map_efl.cc',
       'public/text_encoding_map_efl.h',
-
-      'tizen_webview/public/tw_settings.h',
-      'tizen_webview/public/tw_touch_point.h',
       'tizen_webview/public/tw_webview_delegate.cc',
       'tizen_webview/public/tw_webview_delegate.h',
       'tizen_webview/public/tw_hit_test.h',
       'tizen_webview/public/tw_webview.h',
       'tizen_webview/public/tw_webview.cc',
       'tizen_webview/public/tw_web_context.cc',
-      'tizen_webview/public/tw_touch_point.cc',
 
       'renderer/content_renderer_client_efl.cc',
       'renderer/content_renderer_client_efl.h',
index c421642..9df748d 100644 (file)
@@ -8,9 +8,9 @@
 #include <Eina.h>
 #include <Evas.h>
 
+#include "common/web_view_settings.h"
 #include <content/public/common/web_preferences.h>
 #include "public/ewk_settings.h"
-#include "tizen_webview/public/tw_settings.h"
 
 class Ewk_Settings {
   public:
@@ -84,8 +84,8 @@ class Ewk_Settings {
     void setSpdyEnabled(bool flag);
     void setDetectContentsAutomatically(bool enable) { m_detectContentsAutomatically = enable; }
     bool detectContentsAutomatically() const { return m_detectContentsAutomatically; }
-    tizen_webview::Settings& getWebViewSettings() { return m_settings; }
-    const tizen_webview::Settings& getWebViewSettings() const { return m_settings; }
+    WebViewSettings& getWebViewSettings() { return m_settings; }
+    const WebViewSettings& getWebViewSettings() const { return m_settings; }
 
     Evas_Object* getEvasObject() { return m_evas_object; }
     content::WebPreferences& getPreferences() { return m_preferences; }
@@ -116,7 +116,7 @@ class Ewk_Settings {
 
   private:
     content::WebPreferences m_preferences;
-    tizen_webview::Settings m_settings;
+    WebViewSettings m_settings;
     bool m_autofillPasswordForm;
     bool m_formCandidateData;
     bool m_autofillProfileForm;
index 369e4b4..0cd3b19 100644 (file)
@@ -5,9 +5,9 @@
 #ifndef CONTER_RENDERER_CLIENT_EFL_H
 #define CONTER_RENDERER_CLIENT_EFL_H
 
+#include "common/web_view_settings.h"
 #include "content/public/renderer/content_renderer_client.h"
 #include "renderer/content_renderer_client_efl.h"
-#include "tizen_webview/public/tw_settings.h"
 #include "v8/include/v8.h"
 #include "renderer/render_process_observer_efl.h"
 
@@ -81,7 +81,7 @@ class ContentRendererClientEfl : public content::ContentRendererClient
                                      size_t length) override;
 
   bool IsLinkVisited(unsigned long long link_hash) override;
-  void SetWebViewSettings(const tizen_webview::Settings& settings) { m_settings = settings; }
+  void SetWebViewSettings(const WebViewSettings& settings) { m_settings = settings; }
 
   blink::WebSpeechSynthesizer* OverrideSpeechSynthesizer(
       blink::WebSpeechSynthesizerClient* client) override;
@@ -91,7 +91,7 @@ class ContentRendererClientEfl : public content::ContentRendererClient
   scoped_ptr<WrtUrlParseImpl> wrt_url_parser_;
   scoped_ptr<RenderProcessObserverEfl> render_process_observer_;
   scoped_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_;
-  tizen_webview::Settings m_settings;
+  WebViewSettings m_settings;
 };
 
 #endif
index fbfcfff..8930b78 100644 (file)
@@ -39,8 +39,6 @@
 #include "third_party/WebKit/Source/config.h"
 #include "third_party/WebKit/Source/platform/fonts/FontCache.h"
 
-using namespace tizen_webview;
-
 using blink::WebDataSource;
 using blink::WebURLRequest;
 
@@ -601,7 +599,7 @@ void RenderViewObserverEfl::OnSetViewMode(blink::WebViewMode view_mode) {
     view->setViewMode(view_mode);
 }
 
-void RenderViewObserverEfl::OnUpdateSettings(const tizen_webview::Settings& settings)
+void RenderViewObserverEfl::OnUpdateSettings(const WebViewSettings& settings)
 {
   DCHECK(renderer_client_);
   if (renderer_client_) {
index 53a0a8f..100348e 100644 (file)
@@ -32,16 +32,13 @@ namespace WebKit {
 class WebHitTestResult;
 }
 
-namespace tizen_webview {
-class Settings;
-}
-
 namespace blink {
 class WebGestureEvent;
 }
 
 class EwkViewMsg_LoadData_Params;
 class Hit_Test_Params;
+class WebViewSettings;
 
 class RenderViewObserverEfl: public content::RenderViewObserver {
  public:
@@ -86,7 +83,7 @@ class RenderViewObserverEfl: public content::RenderViewObserver {
   void CheckContentsSize();
   void OnSuspendScheduledTasks();
   void OnResumeScheduledTasks();
-  void OnUpdateSettings(const tizen_webview::Settings& settings);
+  void OnUpdateSettings(const WebViewSettings& settings);
 
   void HandleTap(const blink::WebGestureEvent& event);
 
diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_settings.h b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_settings.h
deleted file mode 100644 (file)
index 754656c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2014 The Chromium Authors. 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_SETTINGS_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_SETTINGS_H_
-
-namespace tizen_webview {
-struct Settings {
-  Settings() 
-    : javascript_can_open_windows(false),
-      link_effect_enabled(true) {}
-
-  bool javascript_can_open_windows;
-  bool link_effect_enabled;
-};
-
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_SETTINGS_H_
diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_touch_point.cc b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_touch_point.cc
deleted file mode 100644 (file)
index 83fabd0..0000000
+++ /dev/null
@@ -1,15 +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.
-
-#include "tw_touch_point.h"
-
-namespace tizen_webview {
-
-Touch_Point::Touch_Point()
-  : id (-1), x (-1), y (-1), state (EVAS_TOUCH_POINT_CANCEL)
-{
-}
-
-} // namespace tizen_webview
diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_touch_point.h b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_touch_point.h
deleted file mode 100644 (file)
index dd16bbe..0000000
+++ /dev/null
@@ -1,25 +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_TOUCH_POINT_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_TOUCH_POINT_H_
-
-#include <Evas.h>
-
-namespace tizen_webview {
-
-struct Touch_Point {
-  int id;                       // identifier of the touch event
-  int x;                        // the horizontal position of the touch event
-  int y;                        // the vertical position of the touch event
-  Evas_Touch_Point_State state; // state of the touch event
-
- public:
-  Touch_Point();
-};
-
-} // namespace tizen_webview
-
-#endif  // TIZEN_WEBVIEW_PUBLIC_TW_TOUCH_POINT_H_