Remove tizen_webview/public/tw_url.h and tizen_webview/public/tw_misc.*
authorArnaud Renevier <a.renevier@samsung.com>
Wed, 11 Mar 2015 22:23:35 +0000 (15:23 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
With this patch, we don't use tw::URL but instead, we use directly GURL

Change-Id: Ic2ebb9f86c8e9479f787f4abc614bf15ba5aeb2e
Signed-off-by: Arnaud Renevier <a.renevier@samsung.com>
18 files changed:
tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.cc
tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h
tizen_src/ewk/efl_integration/content_browser_client_efl.cc
tizen_src/ewk/efl_integration/efl_integration.gypi
tizen_src/ewk/efl_integration/eweb_context.cc
tizen_src/ewk/efl_integration/eweb_context.h
tizen_src/ewk/efl_integration/private/ewk_notification_private.cc
tizen_src/ewk/efl_integration/private/ewk_notification_private.h
tizen_src/ewk/efl_integration/public/ewk_context.cc
tizen_src/ewk/efl_integration/tizen_webview/public/tw_security_origin.cc
tizen_src/ewk/efl_integration/tizen_webview/public/tw_security_origin.h
tizen_src/ewk/efl_integration/tizen_webview/public/tw_url.cc [deleted file]
tizen_src/ewk/efl_integration/tizen_webview/public/tw_url.h [deleted file]
tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.cc
tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.h
tizen_src/ewk/efl_integration/tizen_webview/tw_misc_utility.cc [deleted file]
tizen_src/ewk/efl_integration/tizen_webview/tw_misc_utility.h [deleted file]
tizen_src/impl/chromium-efl.gyp

index c809b65..8eedcf3 100644 (file)
@@ -12,7 +12,6 @@
 #include "content/public/browser/web_contents.h"
 #include "private/ewk_notification_private.h"
 #include "tizen_webview/public/tw_security_origin.h"
-#include "tizen_webview/tw_misc_utility.h"
 
 using tizen_webview::Security_Origin;
 using web_contents_utils::WebViewFromWebContents;
@@ -75,8 +74,7 @@ void NotificationControllerEfl::SetPermissionForNotification(
       wv->web_contents().GetRenderViewHost();
 
   if (render_view_host) {
-    GURL origin = tizen_webview::GetGURL(
-        notification->GetSecurityOrigin()->GetURL());
+    GURL origin = notification->GetSecurityOrigin()->GetURL();
     // save decision in permissions map
     permissions_mutex_.Acquire();
     permissions_map_[origin] = isAllowed;
@@ -122,10 +120,9 @@ void NotificationControllerEfl::RemovePermissions(Eina_List* origins) {
   void* data = NULL;
   base::AutoLock locker(permissions_mutex_);
   EINA_LIST_FOREACH(origins, list, data) {
-    tizen_webview::Security_Origin* o =
+    tizen_webview::Security_Origin* origin =
         static_cast<tizen_webview::Security_Origin*>(data);
-    GURL origin = tizen_webview::GetGURL(o->GetURL());
-    permissions_map_.erase(origin);
+    permissions_map_.erase(origin->GetURL());
   }
 }
 
@@ -167,7 +164,7 @@ void NotificationControllerEfl::RequestPermission(
   }
   scoped_ptr<Ewk_Notification_Permission_Request> notification_permission(
       new Ewk_Notification_Permission_Request(web_view->evas_object(),
-          result_callback,    tizen_webview::GetURL(requesting_frame)));
+          result_callback, requesting_frame));
 
   if (!web_view->IsNotificationPermissionCallbackSet()) {
     LOG(ERROR) << "Dropping PermissionNotification request caused by lack "
index be670c0..cb3fdc4 100644 (file)
@@ -16,7 +16,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "third_party/WebKit/public/platform/WebNotificationPermission.h"
-#include "tizen_webview/public/tw_url.h"
 #include "url/gurl.h"
 
 class Ewk_Notification_Permission_Request;
index 95fc45f..c4b3e0c 100644 (file)
 
 #include "private/ewk_notification_private.h"
 #include "tizen_webview/public/tw_security_origin.h"
-#include "tizen_webview/public/tw_url.h"
-#include "tizen_webview/tw_misc_utility.h"
 
 using tizen_webview::Security_Origin;
-using tizen_webview::URL;
 using web_contents_utils::WebContentsFromFrameID;
 using web_contents_utils::WebContentsFromViewID;
 using web_contents_utils::WebViewFromWebContents;
@@ -220,9 +217,7 @@ void ContentBrowserClientEfl::ShowDesktopNotification(
                            base::UTF16ToUTF8(params.title),
                            params.icon,
                            notificationUniqueId,
-                           URL(params.origin.host(),
-                               params.origin.scheme(),
-                               atoi(params.origin.port().c_str())));
+                           params.origin);
 
   notification_show_callback_(notification, notification_callback_user_data_);
   delete notification;
index be263d6..3cafbf5 100644 (file)
       'public/text_encoding_map_efl.cc',
       'public/text_encoding_map_efl.h',
 
-      'tizen_webview/tw_misc_utility.h',
       'tizen_webview/public/tw_settings.h',
       'tizen_webview/public/tw_legacy_font_size_mode.h',
       'tizen_webview/public/tw_back_forward_list_impl.cc',
       'tizen_webview/public/tw_touch_event.h',
       'tizen_webview/public/tw_callbacks.h',
       'tizen_webview/public/tw_frame.h',
-      'tizen_webview/public/tw_url.cc',
       'tizen_webview/public/tw_webview_delegate.h',
       'tizen_webview/public/tw_context_menu_controller.h',
       'tizen_webview/public/tw_security_origin.cc',
       'tizen_webview/public/tw_hit_test.h',
       'tizen_webview/public/tw_wrt.h',
       'tizen_webview/public/tw_macro.h',
-      'tizen_webview/public/tw_url.h',
       'tizen_webview/public/tw_web_context.h',
       'tizen_webview/public/tw_export.h',
       'tizen_webview/public/tw_back_forward_history.h',
       'tizen_webview/public/tw_cookie_accept_policy.h',
       'tizen_webview/public/tw_policy_decision.h',
       'tizen_webview/public/tw_touch_point.cc',
-      'tizen_webview/tw_misc_utility.cc',
 
       'renderer/content_renderer_client_efl.cc',
       'renderer/content_renderer_client_efl.h',
index a6a1c49..7be5aeb 100644 (file)
@@ -37,7 +37,6 @@
 #include "content/common/render_messages_efl.h"
 
 #include "tizen_webview/public/tw_security_origin.h"
-#include "tizen_webview/tw_misc_utility.h"
 
 #include "wrt/wrt_widget_host.h"
 
@@ -51,8 +50,6 @@ using std::map;
 
 using tizen_webview::Cache_Model;
 using tizen_webview::Security_Origin;
-using tizen_webview::GetGURL;
-using tizen_webview::GetURL;
 
 EWebContext* EWebContext::default_context_ = NULL;
 
@@ -78,7 +75,7 @@ public:
     std::vector<content::LocalStorageUsageInfo>::const_iterator it;
 
     for (it = local_storage.begin(); it != local_storage.end(); it++) {
-      Security_Origin* origin = new Security_Origin(GetURL(it->origin));
+      Security_Origin* origin = new Security_Origin(it->origin);
       lorigins = eina_list_append(lorigins, origin);
     }
 
@@ -108,7 +105,7 @@ void OnOriginsWithApplicationCacheObtained(tizen_webview::Web_Application_Cache_
   for (map<GURL, content::AppCacheInfoVector>::iterator iter = collection->infos_by_origin.begin();
       iter != collection->infos_by_origin.end();
       ++iter) {
-    Security_Origin* origin = new Security_Origin(GetURL(iter->first));
+    Security_Origin* origin = new Security_Origin(iter->first);
     origins = eina_list_append(origins, origin);
   }
   callback(origins, user_data);
@@ -138,7 +135,7 @@ void OnGetWebDBOrigins(
   for (std::set<GURL>::iterator iter =
          origins_ref.begin();
          iter != origins_ref.end(); ++iter) {
-      Security_Origin* sec_origin = new Security_Origin(GetURL(*iter));
+      Security_Origin* sec_origin = new Security_Origin(*iter);
       origins = eina_list_append(origins, sec_origin);
   }
   BrowserThread::PostTask(BrowserThread::UI,
@@ -163,7 +160,7 @@ void OnGetFileSystemOrigins(
   for (std::set<GURL>::iterator iter =
          origins_ref.begin();
          iter != origins_ref.end(); ++iter) {
-      Security_Origin* sec_origin = new Security_Origin(GetURL(*iter));
+      Security_Origin* sec_origin = new Security_Origin(*iter);
       origins = eina_list_append(origins, sec_origin);
   }
   BrowserThread::PostTask(BrowserThread::UI,
@@ -348,12 +345,12 @@ void EWebContext::DeleteAllApplicationCache() {
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_APPCACHE, GURL());
 }
 
-void EWebContext::DeleteApplicationCacheForSite(const tizen_webview::URL& site) {
+void EWebContext::DeleteApplicationCacheForSite(const GURL& site) {
   content::StoragePartition* partition = BrowserContext::GetStoragePartitionForSite(browser_context_.get(),
-                                                                                    GetGURL(site));
+                                                                                    site);
   partition->ClearDataForOrigin(content::StoragePartition::REMOVE_DATA_MASK_APPCACHE,
                                 content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
-                                GetGURL(site),
+                                site,
                                 partition->GetURLRequestContext(), base::Bind(&base::DoNothing));
 }
 
@@ -371,7 +368,7 @@ void EWebContext::GetAllOriginsWithApplicationCache(tizen_webview::Web_Applicati
 }
 
 void EWebContext::GetApplicationCacheUsage(
-    const tizen_webview::URL& url,
+    const GURL& url,
     tizen_webview::Web_Application_Cache_Usage_For_Origin_Get_Callback callback,
     void* user_data) {
   content::StoragePartition* partition =
@@ -382,7 +379,7 @@ void EWebContext::GetApplicationCacheUsage(
       FROM_HERE,
       base::Bind(&storage::QuotaManager::GetUsageAndQuota,
                  partition->GetQuotaManager(),
-                 GetGURL(url),
+                 url,
                  storage::kStorageTypeTemporary,
                  base::Bind(&OnTemporaryUsageAndQuotaObtained, callback, user_data)));
 }
@@ -399,7 +396,7 @@ void EWebContext::WebStorageDelete() {
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_LOCAL_STORAGE, GURL());
 }
 
-void EWebContext::WebStorageDeleteForOrigin(const tizen_webview::URL& origin) {
+void EWebContext::WebStorageDeleteForOrigin(const GURL& origin) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
@@ -410,7 +407,7 @@ void EWebContext::WebStorageDeleteForOrigin(const tizen_webview::URL& origin) {
   content::StoragePartition* partition =
       BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
 
-  partition->GetDOMStorageContext()->DeleteLocalStorage(GetGURL(origin));
+  partition->GetDOMStorageContext()->DeleteLocalStorage(origin);
 }
 
 void EWebContext::WebStorageOriginsAllGet(tizen_webview::Web_Storage_Origins_Get_Callback callback,
@@ -435,7 +432,7 @@ void EWebContext::IndexedDBDelete() {
   remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_INDEXEDDB, GURL());
 }
 
-void EWebContext::WebDBDelete(const tizen_webview::URL& host) {
+void EWebContext::WebDBDelete(const GURL& host) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
@@ -444,7 +441,7 @@ void EWebContext::WebDBDelete(const tizen_webview::URL& host) {
     return;
   }
   BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
-  remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_WEBSQL, GetGURL(host));
+  remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_WEBSQL, host);
 }
 
 void EWebContext::GetAllOriginsWithWebDB(tizen_webview::Web_Database_Origins_Get_Callback callback, void* user_data) {
@@ -456,7 +453,7 @@ void EWebContext::GetAllOriginsWithWebDB(tizen_webview::Web_Database_Origins_Get
                  callback, user_data, partition));
 }
 
-void EWebContext::FileSystemDelete(const tizen_webview::URL& host) {
+void EWebContext::FileSystemDelete(const GURL& host) {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
@@ -465,7 +462,7 @@ void EWebContext::FileSystemDelete(const tizen_webview::URL& host) {
     return;
   }
   BrowsingDataRemoverEfl* remover = BrowsingDataRemoverEfl::CreateForUnboundedRange(browser_context_.get());
-  remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_FILE_SYSTEMS, GetGURL(host));
+  remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_FILE_SYSTEMS, host);
 }
 
 void EWebContext::GetAllOriginsWithFileSystem(tizen_webview::Local_File_System_Origins_Get_Callback callback, void* user_data) const {
index b7a3a65..1b9cc41 100644 (file)
@@ -13,7 +13,6 @@
 #include "devtools_delegate_efl.h"
 
 namespace tizen_webview {
-class URL;
 class WebContext;
 }
 
@@ -79,20 +78,20 @@ class EWebContext {
                                    void* user_data);
   EwkDidStartDownloadCallback* DidStartDownloadCallback();
   void DeleteAllApplicationCache();
-  void DeleteApplicationCacheForSite(const tizen_webview::URL&);
+  void DeleteApplicationCacheForSite(const GURL&);
   void GetAllOriginsWithApplicationCache(tizen_webview::Web_Application_Cache_Origins_Get_Callback callback,
                                          void* user_data);
   void GetApplicationCacheUsage(
-      const tizen_webview::URL& url,
+      const GURL& url,
       tizen_webview::Web_Application_Cache_Usage_For_Origin_Get_Callback callback,
       void* user_data);
   void GetAllOriginsWithWebDB(tizen_webview::Web_Database_Origins_Get_Callback callback, void* user_data);
-  void WebDBDelete(const tizen_webview::URL& host);
+  void WebDBDelete(const GURL& host);
   void IndexedDBDelete();
   void WebStorageDelete();
-  void WebStorageDeleteForOrigin(const tizen_webview::URL& origin);
+  void WebStorageDeleteForOrigin(const GURL& origin);
   void WebStorageOriginsAllGet(tizen_webview::Web_Storage_Origins_Get_Callback callback, void* user_data);
-  void FileSystemDelete(const tizen_webview::URL& host);
+  void FileSystemDelete(const GURL& host);
   void GetAllOriginsWithFileSystem(tizen_webview::Local_File_System_Origins_Get_Callback callback, void* user_data) const;
   bool SetFaviconDatabasePath(const char *path);
   Evas_Object *AddFaviconObject(const char *uri, Evas *canvas) const;
index cfbd651..293cfdc 100644 (file)
@@ -14,7 +14,7 @@ Ewk_Notification::Ewk_Notification(
     const std::string& title,
     const SkBitmap& icon,
     uint64_t notificationID,
-    const tizen_webview::URL& origin)
+    const GURL& origin)
     : body_(body)
     , icon_(icon)
     , replaceID_(replaceID)
@@ -68,7 +68,7 @@ const tizen_webview::Security_Origin* Ewk_Notification::GetSecurityOrigin() cons
 Ewk_Notification_Permission_Request::Ewk_Notification_Permission_Request(
     Evas_Object* webview,
     const base::Callback<void(bool)>& callback,
-    const tizen_webview::URL& source_origin)
+    const GURL& source_origin)
     : webview_(webview)
     , origin_(new tizen_webview::Security_Origin(source_origin))
     , callback_(callback)
index adb9a60..4a33ae0 100644 (file)
@@ -15,6 +15,8 @@
 #include "tizen_webview/public/tw_macro.h"
 #include "tizen_webview/public/tw_security_origin.h"
 
+class GURL;
+
 struct Ewk_Notification {
  public:
   Ewk_Notification(const std::string& body,
@@ -22,7 +24,7 @@ struct Ewk_Notification {
                    const std::string& title,
                    const SkBitmap& icon,
                    uint64_t notificationID,
-                   const tizen_webview::URL& securityOrigin);
+                   const GURL& securityOrigin);
   ~Ewk_Notification();
 
   const char* GetBody() const;
@@ -48,7 +50,7 @@ struct Ewk_Notification_Permission_Request {
  public:
   Ewk_Notification_Permission_Request(Evas_Object* webview,
                                       const base::Callback<void(bool)>& callback,
-                                      const tizen_webview::URL& source_origin);
+                                      const GURL& source_origin);
   ~Ewk_Notification_Permission_Request();
 
   Evas_Object* GetWebviewEvasObject() const;
index 605156c..91a8911 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <tizen_webview/public/tw_security_origin.h>
 #include <tizen_webview/public/tw_web_context.h>
-#include <tizen_webview/public/tw_url.h>
 
 #include "base/memory/ref_counted.h"
 #include "browser/vibration/vibration_provider_client.h"
@@ -162,7 +161,7 @@ Evas_Object* ewk_context_icon_database_icon_object_add(Ewk_Context* context, con
 Eina_Bool ewk_context_local_file_system_all_delete(Ewk_Context *context)
 {
   EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
-  context->FileSystemDelete(tizen_webview::URL());
+  context->FileSystemDelete(GURL(""));
   return true;
 }
 
@@ -170,7 +169,9 @@ Eina_Bool ewk_context_local_file_system_delete(Ewk_Context *context, Ewk_Securit
 {
   EINA_SAFETY_ON_NULL_RETURN_VAL(origin, EINA_FALSE);
   EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
-  context->FileSystemDelete(tizen_webview::URL(ewk_security_origin_host_get(origin)));
+  std::ostringstream ss;
+  ss << "://" << ewk_security_origin_host_get(origin);
+  context->FileSystemDelete(GURL(ss.str()));
   return true;
 }
 
@@ -187,7 +188,7 @@ Eina_Bool ewk_context_local_file_system_origins_get(const Ewk_Context *context,
 Eina_Bool ewk_context_web_database_delete_all(Ewk_Context* context)
 {
   EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
-  context->WebDBDelete(tizen_webview::URL());
+  context->WebDBDelete(GURL());
   return true;
 }
 
@@ -195,7 +196,9 @@ Eina_Bool ewk_context_web_database_delete(Ewk_Context* context, Ewk_Security_Ori
 {
   EINA_SAFETY_ON_NULL_RETURN_VAL(origin, EINA_FALSE);
   EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
-  context->WebDBDelete(tizen_webview::URL(ewk_security_origin_host_get(origin)));
+  std::ostringstream ss;
+  ss << "://" << ewk_security_origin_host_get(origin);
+  context->WebDBDelete(GURL(ss.str()));
   return true;
 }
 
index 72436d2..44fef04 100644 (file)
@@ -4,43 +4,51 @@
 // found in the LICENSE file.
 
 #include "tw_security_origin.h"
-#include "tizen_webview/tw_misc_utility.h"
-#include "tizen_webview/public/tw_url.h"
-#include "url/gurl.h"
+
+#include <sstream>
 
 namespace tizen_webview {
 
-Security_Origin::Security_Origin(const tizen_webview::URL& url)
-  : host(eina_stringshare_add(url.getHost()))
-  , protocol(eina_stringshare_add(url.getProtocol()))
-  , port(url.getPort()) {
+Security_Origin::Security_Origin(const GURL& url)
+  : url_(url) {
+  host_ = eina_stringshare_add(url_.host().c_str());
+  protocol_ = eina_stringshare_add(url_.scheme().c_str());
 }
 
-Security_Origin::Security_Origin(const char* host_in, const char* protocol_in, int port_in)
-  : host(eina_stringshare_add(host_in))
-  , protocol(eina_stringshare_add(protocol_in))
-  , port(port_in) {
+Security_Origin::Security_Origin(const char* host, const char* protocol, int port) {
+  if (!host) {
+    url_ = GURL("");
+  } else {
+    std::ostringstream ss;
+    ss << protocol << "://" << port;
+    if (port != url::PORT_UNSPECIFIED) {
+      ss << ":" << port;
+    }
+    url_ = GURL(ss.str());
+  }
+  host_ = eina_stringshare_add(url_.host().c_str());
+  protocol_ = eina_stringshare_add(url_.scheme().c_str());
 }
 
 Security_Origin::~Security_Origin() {
-  eina_stringshare_del(host);
-  eina_stringshare_del(protocol);
+  eina_stringshare_del(host_);
+  eina_stringshare_del(protocol_);
 }
 
-tizen_webview::URL Security_Origin::GetURL() const {
-  return tizen_webview::URL(protocol, host, port);
+GURL Security_Origin::GetURL() const {
+  return url_;
 }
 
 Eina_Stringshare* Security_Origin::GetHost() const {
-  return host;
+  return host_;
 }
 
 Eina_Stringshare* Security_Origin::GetProtocol() const {
-  return protocol;
+  return protocol_;
 }
 
 int Security_Origin::GetPort() const {
-  return port;
+  return url_.IntPort();
 }
 
 Security_Origin* Security_Origin::CreateFromString(const char *url) {
@@ -51,7 +59,7 @@ Security_Origin* Security_Origin::CreateFromString(const char *url) {
   if (gurl.is_empty() || !gurl.is_valid())
     return 0;
 
-  return new Security_Origin(tizen_webview::GetURL(gurl));
+  return new Security_Origin(gurl);
 }
 
 } // namespace tizen_webview
index 5147817..30ecc7a 100644 (file)
@@ -8,17 +8,17 @@
 
 #include <Eina.h>
 
-namespace tizen_webview {
+#include "url/gurl.h"
 
-class URL;
+namespace tizen_webview {
 
 class Security_Origin {
  public:
-  Security_Origin(const tizen_webview::URL& url);
-  Security_Origin(const char* host_in, const char* protocol_in, int port_in);
+  Security_Origin(const GURL& url);
+  Security_Origin(const char* host, const char* protocol, int port);
   ~Security_Origin();
 
-  tizen_webview::URL GetURL() const;
+  GURL GetURL() const;
   Eina_Stringshare* GetHost() const;
   Eina_Stringshare* GetProtocol() const;
   int GetPort() const;
@@ -26,9 +26,9 @@ class Security_Origin {
   static Security_Origin* CreateFromString(const char* url);
 
  private:
-  Eina_Stringshare* host;
-  Eina_Stringshare* protocol;
-  int port;
+  GURL url_;
+  Eina_Stringshare* host_;
+  Eina_Stringshare* protocol_;
 
   // Just for safety in using Eina_Stringshare, disallow copy constructor and
   // assignment for now.
diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_url.cc b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_url.cc
deleted file mode 100644 (file)
index fc9c15e..0000000
+++ /dev/null
@@ -1,28 +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_url.h"
-
-namespace tizen_webview {
-
-URL::URL()
-  : protocol()
-  , host()
-  , port(PORT_UNSPECIFIED) { // url_parse::PORT_INVALID
-}
-
-URL::URL(const std::string& host_)
-  : protocol()
-  , host(host_)
-  , port(PORT_UNSPECIFIED) { // url_parse::PORT_INVALID
-}
-
-URL::URL(const std::string& protocol_, const std::string& host_, int port_)
-  : protocol(protocol_)
-  , host(host_)
-  , port(port_) {
-}
-
-} // namespace tizen_webview
diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_url.h b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_url.h
deleted file mode 100644 (file)
index ee08db4..0000000
+++ /dev/null
@@ -1,39 +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_URL_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_URL_H_
-
-#include <string>
-
-namespace tizen_webview {
-
-class URL {
- public:
-  enum {
-    PORT_UNSPECIFIED = -1,
-    PORT_INVALID = -2
-  };
-
-  URL();
-  explicit URL(const std::string& host_);
-  URL(const std::string& protocol_, const std::string& host_, int port_);
-
-  const char* getProtocol() const { return protocol.c_str(); }
-  const char* getHost() const { return host.c_str(); }
-  int         getPort() const { return port; }
-
-  bool isPortInvalid() const { return port == PORT_INVALID; }
-  bool isPortUnspecified() const { return port == PORT_UNSPECIFIED; }
-
- private:
-  std::string protocol;
-  std::string host;
-  int port;
-};
-
-} // namespace tizen_webview
-
-#endif  // TIZEN_WEBVIEW_PUBLIC_TW_URL_H_
index c18948a..5658c1c 100644 (file)
@@ -171,7 +171,7 @@ void WebContext::GetAllOriginsWithApplicationCache(Web_Application_Cache_Origins
   impl->GetAllOriginsWithApplicationCache(callback, user_data);
 }
 
-void WebContext::GetApplicationCacheUsage(const URL& url, Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data) {
+void WebContext::GetApplicationCacheUsage(const GURL& url, Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data) {
   impl->GetApplicationCacheUsage(url, callback, user_data);
 }
 
@@ -179,7 +179,7 @@ void WebContext::DeleteAllApplicationCache() {
   impl->DeleteAllApplicationCache();
 }
 
-void WebContext::DeleteApplicationCacheForSite(const tizen_webview::URL& url) {
+void WebContext::DeleteApplicationCacheForSite(const GURL& url) {
   impl->DeleteApplicationCacheForSite(url);
 }
 
@@ -187,7 +187,7 @@ void WebContext::GetAllOriginsWithWebDB(Web_Database_Origins_Get_Callback callba
   impl->GetAllOriginsWithWebDB(callback, user_data);
 }
 
-void WebContext::WebDBDelete(const URL& host) {
+void WebContext::WebDBDelete(const GURL& host) {
   impl->WebDBDelete(host);
 }
 
@@ -203,7 +203,7 @@ void WebContext::WebStorageDelete() {
   impl->WebStorageDelete();
 }
 
-void WebContext::WebStorageDelete(const URL& origin) {
+void WebContext::WebStorageDelete(const GURL& origin) {
   impl->WebStorageDeleteForOrigin(origin);
 }
 
@@ -211,7 +211,7 @@ void WebContext::GetAllOriginsWithFileSystem(Local_File_System_Origins_Get_Callb
   impl->GetAllOriginsWithFileSystem(callback, user_data);
 }
 
-void WebContext::FileSystemDelete(const URL& host) {
+void WebContext::FileSystemDelete(const GURL& host) {
   impl->FileSystemDelete(host);
 }
 
index b2c4aff..248b93e 100644 (file)
@@ -20,6 +20,7 @@ class EWebContext;
 #if defined(OS_TIZEN_TV)
 class FaviconDatabase;
 #endif
+class GURL;
 //struct Ewk_IPC_Wrt_Message_Data;
 
 namespace content {
@@ -27,7 +28,6 @@ class BrowserContextEfl;
 }
 
 namespace tizen_webview {
-class URL;
 
 struct WebContext : public tizen_webview::RefCounted<WebContext> {
  public:
@@ -75,16 +75,16 @@ struct WebContext : public tizen_webview::RefCounted<WebContext> {
   // Application Cache
   void GetAllOriginsWithApplicationCache(
       Web_Application_Cache_Origins_Get_Callback callback, void* user_data);
-  void GetApplicationCacheUsage(const URL& url,
+  void GetApplicationCacheUsage(const GURL& url,
       Web_Application_Cache_Usage_For_Origin_Get_Callback callback,
       void* user_data);
   void DeleteAllApplicationCache();
-  void DeleteApplicationCacheForSite(const tizen_webview::URL& url);
+  void DeleteApplicationCacheForSite(const GURL& url);
 
   // Web Database
   void GetAllOriginsWithWebDB(Web_Database_Origins_Get_Callback callback,
       void* user_data);
-  void WebDBDelete(const URL& host);
+  void WebDBDelete(const GURL& host);
 
   // Indexed DB
   void IndexedDBDelete();
@@ -93,13 +93,13 @@ struct WebContext : public tizen_webview::RefCounted<WebContext> {
   void WebStorageOriginsAllGet(Web_Storage_Origins_Get_Callback callback,
       void* user_data);
   void WebStorageDelete();
-  void WebStorageDelete(const URL& origin);
+  void WebStorageDelete(const GURL& origin);
   void ClearCandidateData();
 
   // File System
   void GetAllOriginsWithFileSystem(
       Local_File_System_Origins_Get_Callback callback, void* user_data) const;
-  void FileSystemDelete(const URL& host);
+  void FileSystemDelete(const GURL& host);
 
   // Favicon
   bool SetFaviconDatabasePath(const char *path);
diff --git a/tizen_src/ewk/efl_integration/tizen_webview/tw_misc_utility.cc b/tizen_src/ewk/efl_integration/tizen_webview/tw_misc_utility.cc
deleted file mode 100644 (file)
index e14bdbc..0000000
+++ /dev/null
@@ -1,29 +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_misc_utility.h"
-
-#include <sstream>
-
-namespace tizen_webview {
-
-GURL GetGURL(const URL& url) {
-  std::ostringstream ss;
-  ss << url.getProtocol() << "://" << url.getHost();
-  if (!url.isPortUnspecified())
-    ss << ":" << url.getPort();
-  if (!ss.str().compare("://")) {
-    return GURL("");
-  }
-  GURL result(ss.str());
-  assert(result.is_valid());
-  return result;
-}
-
-URL GetURL(const GURL& url) {
-  return URL(url.scheme(), url.host(), url.IntPort());
-}
-
-} // namespace tizen_webview
diff --git a/tizen_src/ewk/efl_integration/tizen_webview/tw_misc_utility.h b/tizen_src/ewk/efl_integration/tizen_webview/tw_misc_utility.h
deleted file mode 100644 (file)
index 2012527..0000000
+++ /dev/null
@@ -1,19 +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_MISC_UTILITY_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_MISC_UTILITY_H_
-
-#include "url/gurl.h"
-#include "tizen_webview/public/tw_url.h"
-
-namespace tizen_webview {
-
-GURL GetGURL(const tizen_webview::URL& url);
-tizen_webview::URL  GetURL(const GURL& url);
-
-} // namespace tizen_webview
-
-#endif  // TIZEN_WEBVIEW_PUBLIC_TW_MISC_UTILITY_H_
index c4a3296..7a68cf8 100644 (file)
       'tizen_webview/public/tw_selection_controller.cc',
       'tizen_webview/public/tw_touch_point.h',
       'tizen_webview/public/tw_touch_point.cc',
-      'tizen_webview/public/tw_url.cc',
-      'tizen_webview/public/tw_url.h',
       'tizen_webview/public/tw_web_context.h',
       'tizen_webview/public/tw_web_context.cc',
       'tizen_webview/public/tw_webview.cc',
       'tizen_webview/public/tw_webview_delegate.cc',
       'tizen_webview/public/tw_webview_evas_event_handler.h',
       'tizen_webview/public/tw_webview_evas_event_handler.cc',
-      'tizen_webview/tw_misc_utility.h',
-      'tizen_webview/tw_misc_utility.cc',
       'url_request_context_getter_efl.cc',
       'url_request_context_getter_efl.h',
       'web_contents_delegate_efl.cc',