#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/public/browser/web_contents.h"
#include "private/ewk_notification_private.h"
-#include "tizen_webview/public/tw_security_origin.h"
+#include "private/ewk_security_origin_private.h"
-using tizen_webview::Security_Origin;
using web_contents_utils::WebViewFromWebContents;
namespace content {
void* data = NULL;
base::AutoLock locker(permissions_mutex_);
EINA_LIST_FOREACH(origins, list, data) {
- tizen_webview::Security_Origin* origin =
- static_cast<tizen_webview::Security_Origin*>(data);
+ _Ewk_Security_Origin* origin = static_cast<_Ewk_Security_Origin*>(data);
permissions_map_.erase(origin->GetURL());
}
}
#include "browser/notification/notification_controller_efl.h"
#include "private/ewk_notification_private.h"
-#include "tizen_webview/public/tw_security_origin.h"
-using tizen_webview::Security_Origin;
using web_contents_utils::WebContentsFromFrameID;
using web_contents_utils::WebContentsFromViewID;
using web_contents_utils::WebViewFromWebContents;
'tizen_webview/public/tw_frame.h',
'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_selection_controller.h',
'tizen_webview/public/tw_selection_controller.cc',
'tizen_webview/public/tw_hit_test.h',
#'tizen_webview/public/tw_webview_evas_event_handler.cc',
'tizen_webview/public/tw_webview.h',
'tizen_webview/public/tw_hit_test.cc',
- 'tizen_webview/public/tw_security_origin.h',
'tizen_webview/public/tw_webview.cc',
'tizen_webview/public/tw_web_context.cc',
'tizen_webview/public/tw_error.h',
#include "browser/browsing_data_remover_efl.h"
#include "browser/vibration/vibration_provider_client.h"
#include "content/common/render_messages_efl.h"
-
-#include "tizen_webview/public/tw_security_origin.h"
+#include "private/ewk_security_origin_private.h"
#include "wrt/wrt_widget_host.h"
using std::map;
using tizen_webview::Cache_Model;
-using tizen_webview::Security_Origin;
EWebContext* EWebContext::default_context_ = NULL;
std::vector<content::LocalStorageUsageInfo>::const_iterator it;
for (it = local_storage.begin(); it != local_storage.end(); it++) {
- Security_Origin* origin = new Security_Origin(it->origin);
+ _Ewk_Security_Origin* origin = new _Ewk_Security_Origin(it->origin);
lorigins = eina_list_append(lorigins, origin);
}
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(iter->first);
+ _Ewk_Security_Origin* origin = new _Ewk_Security_Origin(iter->first);
origins = eina_list_append(origins, origin);
}
callback(origins, user_data);
for (std::set<GURL>::iterator iter =
origins_ref.begin();
iter != origins_ref.end(); ++iter) {
- Security_Origin* sec_origin = new Security_Origin(*iter);
+ _Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
origins = eina_list_append(origins, sec_origin);
}
BrowserThread::PostTask(BrowserThread::UI,
for (std::set<GURL>::iterator iter =
origins_ref.begin();
iter != origins_ref.end(); ++iter) {
- Security_Origin* sec_origin = new Security_Origin(*iter);
+ _Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
origins = eina_list_append(origins, sec_origin);
}
BrowserThread::PostTask(BrowserThread::UI,
// found in the LICENSE file.
#include "ewk_geolocation_private.h"
-#include "tizen_webview/public/tw_security_origin.h"
+#include "private/ewk_security_origin_private.h"
#include <content/public/browser/browser_thread.h>
const char* host, const char* protocol, uint16_t port,
base::Callback<void(bool)> callback)
: Ewk_Suspendable_Object(callback)
- , origin_(new tizen_webview::Security_Origin(host, protocol, port)) {
+ , origin_(new _Ewk_Security_Origin(host, protocol, port)) {
}
_Ewk_Geolocation_Permission_Request::~_Ewk_Geolocation_Permission_Request() {
#include "base/callback.h"
#include "ewk_suspendable_object.h"
-#include "tizen_webview/public/tw_security_origin.h"
+
+class _Ewk_Security_Origin;
// This holds the geolocation permission request data.
// The callback present is the direct engine callback which need
base::Callback<void(bool)> callback);
~_Ewk_Geolocation_Permission_Request();
- tizen_webview::Security_Origin* GetOrigin() const { return origin_; }
+ _Ewk_Security_Origin* GetOrigin() const { return origin_; }
private:
- tizen_webview::Security_Origin* origin_;
+ _Ewk_Security_Origin* origin_;
};
#endif // ewk_geolocation_private_h
, replaceID_(replaceID)
, title_(title)
, notificationID_(notificationID)
- , origin_(new tizen_webview::Security_Origin(origin)) {
+ , origin_(new _Ewk_Security_Origin(origin)) {
}
Ewk_Notification::~Ewk_Notification() {
return notificationID_;
}
-const tizen_webview::Security_Origin* Ewk_Notification::GetSecurityOrigin() const {
+const _Ewk_Security_Origin* Ewk_Notification::GetSecurityOrigin() const {
return origin_.get();
}
const base::Callback<void(bool)>& callback,
const GURL& source_origin)
: webview_(webview)
- , origin_(new tizen_webview::Security_Origin(source_origin))
+ , origin_(new _Ewk_Security_Origin(source_origin))
, callback_(callback)
, decided_(false)
, suspended_(false)
return webview_;
}
-const tizen_webview::Security_Origin* Ewk_Notification_Permission_Request::GetSecurityOrigin() const {
+const _Ewk_Security_Origin* Ewk_Notification_Permission_Request::GetSecurityOrigin() const {
return origin_.get();
}
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
+#include "private/ewk_security_origin_private.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "tizen_webview/public/tw_macro.h"
-#include "tizen_webview/public/tw_security_origin.h"
class GURL;
const char* GetTitle() const;
Evas_Object* GetIcon(Evas* evas) const;
int GetID() const;
- const tizen_webview::Security_Origin* GetSecurityOrigin() const;
+ const _Ewk_Security_Origin* GetSecurityOrigin() const;
private:
std::string body_;
std::string replaceID_;
std::string title_;
uint64_t notificationID_;
- scoped_ptr<tizen_webview::Security_Origin> origin_;
+ scoped_ptr<_Ewk_Security_Origin> origin_;
DISALLOW_COPY_AND_ASSIGN(Ewk_Notification);
~Ewk_Notification_Permission_Request();
Evas_Object* GetWebviewEvasObject() const;
- const tizen_webview::Security_Origin* GetSecurityOrigin() const;
+ const _Ewk_Security_Origin* GetSecurityOrigin() const;
bool IsDecided() const;
bool IsSuspended() const;
bool SetSuspend(bool suspend) const;
private:
Evas_Object* webview_;
- scoped_ptr<tizen_webview::Security_Origin> origin_;
+ scoped_ptr<_Ewk_Security_Origin> origin_;
base::Callback<void(bool)> callback_;
bool decided_;
mutable bool suspended_;
#include "ewk_security_origin_private.h"
+#include <sstream>
+
+_Ewk_Security_Origin::_Ewk_Security_Origin(const GURL& url)
+ : url_(url) {
+ host_ = eina_stringshare_add(url_.host().c_str());
+ protocol_ = eina_stringshare_add(url_.scheme().c_str());
+}
+
+_Ewk_Security_Origin::_Ewk_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());
+}
+
+_Ewk_Security_Origin::~_Ewk_Security_Origin() {
+ eina_stringshare_del(host_);
+ eina_stringshare_del(protocol_);
+}
+
+GURL _Ewk_Security_Origin::GetURL() const {
+ return url_;
+}
+
+Eina_Stringshare* _Ewk_Security_Origin::GetHost() const {
+ return host_;
+}
+
+Eina_Stringshare* _Ewk_Security_Origin::GetProtocol() const {
+ return protocol_;
+}
+
+int _Ewk_Security_Origin::GetPort() const {
+ return url_.IntPort();
+}
+
+_Ewk_Security_Origin* _Ewk_Security_Origin::CreateFromString(const char *url) {
+ if (!url)
+ return 0;
+
+ GURL gurl(url);
+ if (gurl.is_empty() || !gurl.is_valid())
+ return 0;
+
+ return new _Ewk_Security_Origin(gurl);
+}
#include "base/callback.h"
#include "url/gurl.h"
-#include <tizen_webview/public/tw_security_origin.h>
// Security Origin Structure
struct __Ewk_Security_Origin {
};
// chromium-efl implementation for _Ewk_Security_Origin
-struct _Ewk_Security_Origin : tizen_webview::Security_Origin
+struct _Ewk_Security_Origin
{
+ public:
+ _Ewk_Security_Origin(const GURL& url);
+ _Ewk_Security_Origin(const char* host, const char* protocol, int port);
+ ~_Ewk_Security_Origin();
+
+ GURL GetURL() const;
+ Eina_Stringshare* GetHost() const;
+ Eina_Stringshare* GetProtocol() const;
+ int GetPort() const;
+
+ static _Ewk_Security_Origin* CreateFromString(const char* url);
+
+ private:
+ GURL url_;
+ Eina_Stringshare* host_;
+ Eina_Stringshare* protocol_;
+
+ // Just for safety in using Eina_Stringshare, disallow copy constructor and
+ // assignment for now.
+ // TODO: Need to revisit and add proper implementation.
+ _Ewk_Security_Origin(const _Ewk_Security_Origin&);
+ _Ewk_Security_Origin& operator=(const _Ewk_Security_Origin&);
};
#endif // ewk_security_origin_private_h
#include "ewk_context.h"
-#include <tizen_webview/public/tw_security_origin.h>
#include <tizen_webview/public/tw_web_context.h>
#include "base/memory/ref_counted.h"
Ewk_Security_Origin *ewk_security_origin_new_from_string(const char *url)
{
- return static_cast<Ewk_Security_Origin *>(tizen_webview::Security_Origin::CreateFromString(url));
+ return static_cast<Ewk_Security_Origin *>(_Ewk_Security_Origin::CreateFromString(url));
}
namespace tizen_webview {
class Hit_Test;
-class Security_Origin;
// from ewk_context.h
typedef void (*Local_File_System_Origins_Get_Callback)(Eina_List *origins, void *user_data);
*/
typedef Eina_Bool (*View_JavaScript_Prompt_Callback)(Evas_Object* o, const char* message, const char* default_value, void* user_data);
//typedef Eina_Bool (*View_Before_Unload_Confirm_Panel_Callback)(Evas_Object* o, const char* message, void* user_data);
-//typedef Eina_Bool (*View_Applicacion_Cache_Permission_Callback)(Evas_Object* o, Security_Origin* origin, void* user_data);
-//typedef Eina_Bool (*View_Exceeded_Indexed_Database_Quota_Callback)(Evas_Object* o, Security_Origin* origin, long long currentQuota, void* user_data);
-//typedef Eina_Bool (*View_Exceeded_Database_Quota_Callback)(Evas_Object* o, Security_Origin* origin, const char* database_name, unsigned long long expectedQuota, void* user_data);
-//typedef Eina_Bool (*View_Exceeded_Local_File_System_Quota_Callback)(Evas_Object* o, Security_Origin* origin, long long currentQuota, void* user_data);
+//typedef Eina_Bool (*View_Applicacion_Cache_Permission_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, void* user_data);
+//typedef Eina_Bool (*View_Exceeded_Indexed_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data);
+//typedef Eina_Bool (*View_Exceeded_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, const char* database_name, unsigned long long expectedQuota, void* user_data);
+//typedef Eina_Bool (*View_Exceeded_Local_File_System_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data);
typedef Eina_Bool (*Orientation_Lock_Cb)(Evas_Object* o, Eina_Bool need_lock, int orientation, void* user_data);
typedef void (*View_Hit_Test_Request_Callback)(Evas_Object* o, int x, int y, int hit_test_mode, Hit_Test* hit_test, void* user_data);
typedef Eina_Bool (*View_Geolocation_Permission_Callback)(Evas_Object* view, void* geolocation_permission_context, void* user_data);
+++ /dev/null
-// 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_security_origin.h"
-
-#include <sstream>
-
-namespace tizen_webview {
-
-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, 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_);
-}
-
-GURL Security_Origin::GetURL() const {
- return url_;
-}
-
-Eina_Stringshare* Security_Origin::GetHost() const {
- return host_;
-}
-
-Eina_Stringshare* Security_Origin::GetProtocol() const {
- return protocol_;
-}
-
-int Security_Origin::GetPort() const {
- return url_.IntPort();
-}
-
-Security_Origin* Security_Origin::CreateFromString(const char *url) {
- if (!url)
- return 0;
-
- GURL gurl(url);
- if (gurl.is_empty() || !gurl.is_valid())
- return 0;
-
- return new Security_Origin(gurl);
-}
-
-} // namespace tizen_webview
+++ /dev/null
-// 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_SECURITY_ORIGIN_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_SECURITY_ORIGIN_H_
-
-#include <Eina.h>
-
-#include "url/gurl.h"
-
-namespace tizen_webview {
-
-class Security_Origin {
- public:
- Security_Origin(const GURL& url);
- Security_Origin(const char* host, const char* protocol, int port);
- ~Security_Origin();
-
- GURL GetURL() const;
- Eina_Stringshare* GetHost() const;
- Eina_Stringshare* GetProtocol() const;
- int GetPort() const;
-
- static Security_Origin* CreateFromString(const char* url);
-
- private:
- GURL url_;
- Eina_Stringshare* host_;
- Eina_Stringshare* protocol_;
-
- // Just for safety in using Eina_Stringshare, disallow copy constructor and
- // assignment for now.
- // TODO: Need to revisit and add proper implementation.
- Security_Origin(const Security_Origin&);
- Security_Origin& operator=(const Security_Origin&);
-};
-
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_SECURITY_ORIGIN_H_