#include "ui/base/clipboard/clipboard.h"
#include "private/ewk_context_menu_private.h"
-#include "tizen_webview/public/tw_webview.h"
-
#include "selection_controller_efl.h"
#if defined(OS_TIZEN_MOBILE)
#include <efl_assist.h>
#endif
-using tizen_webview::WebView;
using web_contents_utils::WebViewFromWebContents;
namespace {
if (!webview_)
return false;
- EWebView* view = webview_->GetImpl();
- if (!view)
- return false;
-
DCHECK(menu_items_ == NULL);
if (menu_items_)
return false;
params_ = params;
GetProposedContextMenu();
_Ewk_Context_Menu new_menu(menu_items_);
- view->SmartCallback<EWebViewCallbacks::ContextMenuCustomize>().call(&new_menu);
+ webview_->SmartCallback<EWebViewCallbacks::ContextMenuCustomize>().call(&new_menu);
menu_items_ = new_menu.TakeMenuList();
if (!CreateContextMenu())
params_.src_url.spec(),
params_.link_url.spec(),
std::string()));
- EWebView* view = webview_->GetImpl();
- view->SmartCallback<EWebViewCallbacks::ContextMenuItemSelected>().call(&item);
+ webview_->SmartCallback<EWebViewCallbacks::ContextMenuItemSelected>().call(&item);
}
void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
if (!menu_item)
return;
- EWebView* view = webview_->GetImpl();
- if (!view)
+ if (!webview_)
return;
// FIXME: Add cases as and when required
break;
}
case MENU_ITEM_GO_BACK: {
- view->GoBack();
+ webview_->GoBack();
break;
}
case MENU_ITEM_GO_FORWARD: {
- view->GoForward();
+ webview_->GoForward();
break;
}
case MENU_ITEM_RELOAD: {
- view->ReloadIgnoringCache();
+ webview_->ReloadIgnoringCache();
break;
}
case MENU_ITEM_COPY: {
- view->ExecuteEditCommand("copy", NULL);
+ webview_->ExecuteEditCommand("copy", NULL);
if (params_.is_editable) {
HideSelectionHandle();
Eina_Rectangle left_rect, right_rect;
- view->GetSelectionRange(&left_rect, &right_rect);
- view->MoveCaret(gfx::Point(right_rect.x, right_rect.y));
+ webview_->GetSelectionRange(&left_rect, &right_rect);
+ webview_->MoveCaret(gfx::Point(right_rect.x, right_rect.y));
} else {
- view->ExecuteEditCommand("Unselect", NULL);
+ webview_->ExecuteEditCommand("Unselect", NULL);
}
break;
}
case MENU_ITEM_TEXT_SELECTION_MODE: {
Evas_Coord x, y;
- evas_object_geometry_get(view->evas_object(), &x, &y, 0, 0);
- view->SelectLinkText(gfx::Point(params_.x - x, params_.y - y));
+ evas_object_geometry_get(webview_->evas_object(), &x, &y, 0, 0);
+ webview_->SelectLinkText(gfx::Point(params_.x - x, params_.y - y));
ShowSelectionHandleAndContextMenu();
break;
}
break;
}
case MENU_ITEM_SELECT_WORD: {
- view->ExecuteEditCommand("SelectWord", NULL);
+ webview_->ExecuteEditCommand("SelectWord", NULL);
ShowSelectionHandleAndContextMenu();
break;
}
case MENU_ITEM_SELECT_ALL: {
- view->ExecuteEditCommand("SelectAll", NULL);
+ webview_->ExecuteEditCommand("SelectAll", NULL);
ShowSelectionHandleAndContextMenu();
break;
}
case MENU_ITEM_PASTE: {
- view->ExecuteEditCommand("paste", NULL);
+ webview_->ExecuteEditCommand("paste", NULL);
HideSelectionHandle();
break;
}
case MENU_ITEM_CUT: {
- view->ExecuteEditCommand("cut", NULL);
+ webview_->ExecuteEditCommand("cut", NULL);
HideSelectionHandle();
break;
}
case MENU_ITEM_CLIPBOARD: {
// TODO: set true for richly editable.
// Paste operations are blocked by Editor if content is not richly editible.
- // Need to find if view has rich editor.
- ClipboardHelperEfl::GetInstance()->OpenClipboardWindow(view, true);
+ // Need to find if webview_ has rich editor.
+ ClipboardHelperEfl::GetInstance()->OpenClipboardWindow(webview_, true);
break;
}
#if !defined(EWK_BRINGUP)
#include "content/public/browser/web_contents.h"
#include "content/public/common/context_menu_params.h"
-#include "tizen_webview/public/tw_webview.h"
+class EWebView;
namespace content {
static void ContextMenuItemSelectedCallback(void* data, Evas_Object* obj, void* event_info);
static void ContextMenuHWBackKey(void* data, Evas_Object* obj, void* event_info);
- ContextMenuControllerEfl(tizen_webview::WebView* wv, ContextMenuType type, WebContents& web_contents)
+ ContextMenuControllerEfl(EWebView* wv, ContextMenuType type, WebContents& web_contents)
: webview_(wv),
native_view_(static_cast<Evas_Object*>(web_contents.GetNativeView())),
popup_(NULL),
static unsigned int _appended_item_size;
static int _popup_item_height;
static bool _context_menu_resized;
- tizen_webview::WebView* webview_;
+ EWebView* webview_;
Evas_Object* native_view_;
Evas_Object* popup_;
Eina_List* menu_items_;
'tizen_webview/public/tw_webview_delegate.h',
'tizen_webview/public/tw_webview_evas_event_handler.h',
'tizen_webview/public/tw_webview_evas_event_handler.cc',
- 'tizen_webview/public/tw_webview.h',
- 'tizen_webview/public/tw_webview.cc',
'renderer/content_renderer_client_efl.cc',
'renderer/content_renderer_client_efl.h',
#include "private/ewk_policy_decision_private.h"
#include "private/ewk_settings_private.h"
#include "private/ewk_text_style_private.h"
+#include "private/webview_delegate_ewk.h"
#include "web_contents_delegate_efl.h"
#include "public/ewk_hit_test.h"
#include "public/platform/WebString.h"
#include "ui/gfx/screen.h"
#include "devtools_delegate_efl.h"
-#include "tizen_webview/public/tw_webview.h"
#include "tizen_webview/public/tw_webview_delegate.h"
#include "tizen_webview/public/tw_webview_evas_event_handler.h"
base::Bind(&NullCreateWebContents);
EWebView* EWebView::FromEvasObject(Evas_Object* eo) {
- WebView *wv = WebView::FromEvasObject(eo);
- if (!wv) {
- DLOG(ERROR) << "Trying to get WebView from non-WebView Evas_Object";
- return NULL;
- }
- return wv->GetImpl();
-}
-
-tizen_webview::WebView* EWebView::GetPublicWebView() {
- DCHECK(public_webview_);
- if (public_webview_ == NULL) {
- DLOG(ERROR) << "WebView is not set. Something wrong on construction";
- }
- return public_webview_;
+ return WebViewDelegateEwk::GetInstance().
+ GetWebViewFromEvasObject(eo);
}
RenderWidgetHostViewEfl* EWebView::rwhv() const {
return static_cast<RenderWidgetHostViewEfl*>(web_contents_->GetRenderWidgetHostView());
}
-EWebView::EWebView(tizen_webview::WebView* owner, Ewk_Context* context, Evas_Object* object)
- : public_webview_(owner),
- context_(context),
+EWebView::EWebView(Ewk_Context* context, Evas_Object* object)
+ : context_(context),
evas_object_(object),
native_view_(object),
touch_events_enabled_(false),
formNavigation_.nextState = false;
// evas_object_del(evas_object());
- public_webview_ = NULL;
// Release manually those scoped pointers to
// make sure they are released in correct order
convertedParams.y = convertedPoint.y();
}
- context_menu_.reset(new content::ContextMenuControllerEfl(GetPublicWebView(), type, *web_contents_.get()));
+ context_menu_.reset(new content::ContextMenuControllerEfl(this, type, *web_contents_.get()));
Evas_Coord x, y;
evas_object_geometry_get(evas_object(), &x, &y, 0, 0);
}
namespace tizen_webview {
-class WebView;
class WebViewEvasEventHandler;
}
static EWebView* FromEvasObject(Evas_Object* eo);
static int GetOrientation();
+ EWebView(Ewk_Context*, Evas_Object* smart_object);
+ ~EWebView();
+
// initialize data members and activate event handlers.
// call this once after created and before use
void Initialize();
void CreateNewWindow(content::WebContentsEflDelegate::WebContentsCreateCallback);
static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
- tizen_webview::WebView* GetPublicWebView();
Ewk_Context* context() const { return context_.get(); }
Evas_Object* evas_object() const { return evas_object_; }
Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
void ReleasePopupMenuList();
- tizen_webview::WebView* public_webview_;
scoped_refptr<tizen_webview::WebViewEvasEventHandler> evas_event_handler_;
scoped_refptr<Ewk_Context> context_;
scoped_refptr<Ewk_Context> old_context_;
std::set<IPC::Message*> delayed_messages_;
std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
- // only tizen_webview::WebView can create and delete this
- EWebView(tizen_webview::WebView* owner, Ewk_Context*, Evas_Object* smart_object);
- ~EWebView();
- friend class tizen_webview::WebView;
};
namespace tizen_webview {
#include "private/webview_delegate_ewk.h"
-using tizen_webview::WebView;
using tizen_webview::WebViewDelegate;
// -------- EwkViewImpl
struct EwkViewImpl {
- explicit EwkViewImpl(tizen_webview::WebView* wv) : wv_(wv) {}
- ~EwkViewImpl() { tizen_webview::WebView::Delete(wv_); }
- tizen_webview::WebView* GetTizenWebView() { return wv_; }
- const tizen_webview::WebView* GetTizenWebView() const { return wv_; }
+ explicit EwkViewImpl(EWebView* wv) : wv_(wv) {}
+ ~EwkViewImpl() { delete(wv_); }
+ EWebView* GetTizenWebView() { return wv_; }
+ const EWebView* GetTizenWebView() const { return wv_; }
private:
- tizen_webview::WebView* wv_;
+ EWebView* wv_;
DISALLOW_COPY_AND_ASSIGN(EwkViewImpl);
};
void handleEvasObjectShow(Evas_Object* o)
{
Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
- WebView* wv = GetWebViewFromSmartData(d);
+ EWebView* wv = GetWebViewFromSmartData(d);
if (!wv) {
return;
}
void handleEvasObjectHide(Evas_Object* o)
{
Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
- WebView* wv = GetWebViewFromSmartData(d);
+ EWebView* wv = GetWebViewFromSmartData(d);
if (!wv) {
return;
}
void handleEvasObjectMove(Evas_Object* o, Evas_Coord x, Evas_Coord y)
{
Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
- WebView* wv = GetWebViewFromSmartData(d);
+ EWebView* wv = GetWebViewFromSmartData(d);
if (!wv) {
return;
}
void handleEvasObjectResize(Evas_Object* o, Evas_Coord width, Evas_Coord height)
{
Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
- WebView* wv = GetWebViewFromSmartData(d);
+ EWebView* wv = GetWebViewFromSmartData(d);
if (!wv) {
return;
}
void handleEvasObjectCalculate(Evas_Object* o)
{
Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
- WebView* wv = GetWebViewFromSmartData(d);
+ EWebView* wv = GetWebViewFromSmartData(d);
if (!wv) {
return;
}
Eina_Bool handleTextSelectionDown(Ewk_View_Smart_Data* d, int x, int y)
{
- WebView* wv = GetWebViewFromSmartData(d);
+ EWebView* wv = GetWebViewFromSmartData(d);
if (!wv)
return false;
return wv->HandleTextSelectionDown(x, y);
Eina_Bool handleTextSelectionUp(Ewk_View_Smart_Data* d, int x, int y)
{
- WebView* wv = GetWebViewFromSmartData(d);
+ EWebView* wv = GetWebViewFromSmartData(d);
if (!wv)
return false;
return wv->HandleTextSelectionUp(x, y);
return static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(evas_object));
}
-WebView* GetWebViewFromSmartData(const Ewk_View_Smart_Data* smartData)
+EWebView* GetWebViewFromSmartData(const Ewk_View_Smart_Data* smartData)
{
if (smartData && smartData->priv) {
return smartData->priv->GetTizenWebView();
return NULL;
}
-WebView* GetWebViewFromEvasObject(const Evas_Object* eo) {
+EWebView* GetWebViewFromEvasObject(const Evas_Object* eo) {
if (!IsWebViewObject(eo)) {
return NULL;
}
smart = smart ? smart : DefaultSmartClassInstance();
Evas_Object* wv_evas_object = evas_object_smart_add(canvas, smart);
- WebView* view = WebView::Create(context, wv_evas_object);
+ EWebView* view = new EWebView(context, wv_evas_object);
if (!view) {
return NULL;
}
Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv_evas_object);
if (!sd) {
- WebView::Delete(view);
+ delete view;
return NULL;
}
// attach webview as a member of smart data
#define ewk_view_private_h
#include <Evas.h>
+
+#include "eweb_view.h"
#include "ewk_view.h"
-#include <tizen_webview/public/tw_webview.h>
class Ewk_Context;
// type conversion utility
bool IsWebViewObject(const Evas_Object* evas_object);
Ewk_View_Smart_Data* GetEwkViewSmartDataFromEvasObject(const Evas_Object* evas_object);
-tizen_webview::WebView* GetWebViewFromSmartData(const Ewk_View_Smart_Data* smartData);
-tizen_webview::WebView* GetWebViewFromEvasObject(const Evas_Object* eo);
+EWebView* GetWebViewFromSmartData(const Ewk_View_Smart_Data* smartData);
+EWebView* GetWebViewFromEvasObject(const Evas_Object* eo);
// helper macro
#define EWK_VIEW_IMPL_GET_OR_RETURN(evas_object, impl, ...) \
- tizen_webview::WebView* impl = GetWebViewFromEvasObject(evas_object); \
- do { \
- if (!impl) { \
- EINA_LOG_CRIT("Evas Object %p is not Ewk WebView", evas_object); \
- return __VA_ARGS__; \
- } \
- } while (0)
+ EWebView* impl = GetWebViewFromEvasObject(evas_object) \
#endif // ewk_view_private_h
return instance;
}
-tizen_webview::WebView* WebViewDelegateEwk::GetWebViewFromEvasObject(
- Evas_Object* evas_object) {
+EWebView* WebViewDelegateEwk::GetWebViewFromEvasObject(
+ Evas_Object* evas_object) const {
return ::GetWebViewFromEvasObject(evas_object);
}
#define webview_delegate_ewk_h
#include <Evas.h>
-#include <tizen_webview/public/tw_webview.h>
+#include "base/macros.h"
+
#include <tizen_webview/public/tw_webview_delegate.h>
-using tizen_webview::WebView;
using tizen_webview::WebViewDelegate;
+class EWebView;
+
struct WebViewDelegateEwk : public WebViewDelegate {
public:
static const WebViewDelegateEwk& GetInstance();
- protected:
- WebView* GetWebViewFromEvasObject(Evas_Object* evas_object);
+ EWebView* GetWebViewFromEvasObject(Evas_Object* evas_object) const;
bool IsWebViewEvasObject(Evas_Object* evas_object);
Evas_Object_Smart_Clipped_Data* GetSmartClippedData(Evas_Object* evas_object);
Eina_Rectangle GetLastUsedViewPortArea(Evas_Object* evas_object);
+ protected:
// Event handlers
bool RequestHandleEvent_FocusIn(EWebView* wv);
bool RequestHandleEvent_FocusOut(EWebView* wv);
#include "ewk_settings.h"
-#include <tizen_webview/public/tw_webview.h>
-
#include "eweb_view.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "public/text_encoding_map_efl.h"
#include "private/ewk_settings_private.h"
#include "private/ewk_view_private.h"
-using tizen_webview::WebView;
namespace {
void ewkUpdateWebkitPreferences(Evas_Object *ewkView)
{
- WebView* impl = WebView::FromEvasObject(ewkView);
+ EWebView* impl = EWebView::FromEvasObject(ewkView);
assert(impl);
bool autoSelectWord = ewk_settings_select_word_automatically_get(impl->GetSettings());
Eina_Bool ewk_settings_private_browsing_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
- WebView* impl = WebView::FromEvasObject(settings->getEvasObject());
+ EWebView* impl = EWebView::FromEvasObject(settings->getEvasObject());
return impl->SetPrivateBrowsing(enable);
}
#include "ewk_view.h"
#include <Evas.h>
-#include <tizen_webview/public/tw_webview.h>
#include "content/public/browser/navigation_controller.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "third_party/WebKit/public/web/WebViewModeEnums.h"
#include "web_contents_delegate_efl.h"
-using tizen_webview::WebView;
-
Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class* api)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(api, false);
Evas_Object* ret = ewk_view_add(canvas);
- WebView *webView = GetWebViewFromEvasObject(ret);
+ EWebView *webView = GetWebViewFromEvasObject(ret);
if (!webView || !data || !length)
return ret;
Ewk_Context *ewk_view_context_get(const Evas_Object *view)
{
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
- return static_cast<Ewk_Context*>(impl->GetWebContext());
+ return static_cast<Ewk_Context*>(impl->context());
}
Eina_Bool ewk_view_url_set(Evas_Object* view, const char* url)
EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(impl->GetWebContext(),EINA_FALSE);
- return impl->GetWebContext()->HTTPCustomHeaderAdd(name, value);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context(),EINA_FALSE);
+ return impl->context()->HTTPCustomHeaderAdd(name, value);
}
Eina_Bool ewk_view_custom_header_remove(const Evas_Object* ewkView, const char* name)
{
EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(impl->GetWebContext(),EINA_FALSE);
- return impl->GetWebContext()->HTTPCustomHeaderRemove(name);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context(),EINA_FALSE);
+ return impl->context()->HTTPCustomHeaderRemove(name);
}
Eina_Bool ewk_view_custom_header_clear(const Evas_Object* ewkView)
{
EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(impl->GetWebContext(),EINA_FALSE);
- impl->GetWebContext()->HTTPCustomHeaderClear();
+ EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context(),EINA_FALSE);
+ impl->context()->HTTPCustomHeaderClear();
return EINA_TRUE;
}
Eina_Bool ewk_view_text_selection_clear(Evas_Object *view)
{
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
- return impl->ClearSelection() ? EINA_TRUE : EINA_FALSE;
+ return impl->GetSelectionController()->ClearSelectionViaEWebView() ? EINA_TRUE : EINA_FALSE;
}
const char* ewk_view_text_selection_text_get(Evas_Object* view)
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
std::string cookiesForURL;
- cookiesForURL = impl->GetWebContext()->cookieManager()->GetCookiesForURL(std::string(url));
+ cookiesForURL = impl->context()->cookieManager()->GetCookiesForURL(std::string(url));
if (cookiesForURL.empty())
return NULL;
return strndup(cookiesForURL.c_str(), cookiesForURL.length());
EINA_SAFETY_ON_NULL_RETURN(data);
EINA_SAFETY_ON_NULL_RETURN(length);
- WebView* impl = GetWebViewFromEvasObject(ewkView);
+ EWebView* impl = GetWebViewFromEvasObject(ewkView);
if (!impl) {
*data = NULL;
*length = 0;
+++ /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_webview.h"
-#include "eweb_view.h"
-
-#include <base/logging.h>
-#include <base/memory/scoped_ptr.h>
-
-#include "content/browser/renderer_host/render_widget_host_view_efl.h"
-#include "private/ewk_back_forward_list_private.h"
-#include "private/ewk_history_private.h"
-#include <tizen_webview/public/tw_webview_delegate.h>
-
-using content::SelectionControllerEfl;
-
-namespace tizen_webview {
-
-WebView* WebView::Create(Ewk_Context* wc, Evas_Object* eo) {
- WebView* wv = new WebView();
- DCHECK(wv);
-
- Impl* impl = new Impl(wv, wc, eo);
- if (!impl) {
- DLOG(ERROR) << "[tizen_webview] Cannot create webview";
- delete wv;
- return NULL;
- }
- wv->SetImpl(impl);
- DCHECK(wv == impl->GetPublicWebView());
- return wv;
-}
-
-void WebView::Delete(WebView* wv) {
- delete wv;
-}
-
-void WebView::Initialize() {
- impl_->Initialize();
-}
-
-WebView::WebView()
- : impl_(NULL) {
-}
-
-WebView::~WebView() {
- delete impl_;
-}
-
-Evas_Object* WebView::AsEvasObject() {
- return impl_->evas_object();
-}
-
-WebView* WebView::FromEvasObject(Evas_Object* eo) {
- return WebViewDelegate::GetInstance()->GetWebViewFromEvasObject(eo);
-}
-
-Ewk_Context* WebView::GetWebContext() {
- return impl_->context();
-}
-
-bool WebView::SetPrivateBrowsing(bool incognito) {
- return impl_->SetPrivateBrowsing(incognito);
-}
-
-bool WebView::GetPrivateBrowsing() const {
- return impl_->GetPrivateBrowsing();
-}
-
-Ewk_Settings* WebView::GetSettings() {
- return impl_->GetSettings();
-}
-
-content::SelectionControllerEfl* WebView::GetSelectionController() {
- return impl_->GetSelectionController();
-}
-
-content::ContextMenuControllerEfl* WebView::GetContextMenuController() {
- return impl_->GetContextMenuController();
-}
-
-void WebView::ResetContextMenuController() {
- return impl_->ResetContextMenuController();
-}
-
-void WebView::HideSelectionHandlers() {
- if (SelectionControllerEfl* selection_controller = GetSelectionController())
- selection_controller->HideHandles();
-}
-
-_Ewk_Frame* WebView::GetMainFrame() {
- return impl_->GetMainFrame();
-}
-
-bool WebView::SetUserAgent(const char* userAgent) {
- return impl_->SetUserAgent(userAgent);
-}
-
-const char* WebView::GetUserAgent() const {
- return impl_->GetUserAgent();
-}
-
-bool WebView::SetUserAgentAppName(const char* application_name) {
- return impl_->SetUserAgentAppName(application_name);
-}
-
-const char* WebView::GetUserAgentAppName() const {
- return impl_->GetUserAgentAppName();
-}
-
-void WebView::SetURL(const char* url_string) {
- return impl_->SetURL(url_string);
-}
-
-const char* WebView::GetURL() const {
- return impl_->GetURL();
-}
-
-void WebView::Reload() {
- return impl_->Reload();
-}
-
-void WebView::ReloadIgnoringCache() {
- return impl_->ReloadIgnoringCache();
-}
-
-double WebView::GetProgressValue() {
- return impl_->GetProgressValue();
-}
-
-void WebView::LoadHTMLString(const char* html, const char* base_uri, const char* unreachable_uri) {
- return impl_->LoadHTMLString(html, base_uri, unreachable_uri);
-}
-
-void WebView::Suspend() {
- return impl_->Suspend();
-}
-
-void WebView::Resume() {
- return impl_->Resume();
-}
-
-void WebView::Stop() {
- return impl_->Stop();
-}
-
-void WebView::LoadPlainTextString(const char* plain_text) {
- return impl_->LoadPlainTextString(plain_text);
-}
-
-void WebView::LoadData(const char* data, size_t size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri /*= NULL*/) {
- return impl_->LoadData(data, size, mime_type, encoding, base_uri, unreachable_uri);
-}
-
-void WebView::UrlRequestSet(const char* url,
- content::NavigationController::LoadURLType loadtype,
- Eina_Hash* headers,
- const char* body) {
- return impl_->UrlRequestSet(url, loadtype, headers, body);
-}
-
-void WebView::LoadNotFoundErrorPage(const std::string& invalidUrl) {
- return impl_->LoadNotFoundErrorPage(invalidUrl);
-}
-
-bool WebView::GoBack() {
- return impl_->GoBack();
-}
-
-bool WebView::GoForward() {
- return impl_->GoForward();
-}
-
-bool WebView::CanGoBack() {
- return impl_->CanGoBack();
-}
-
-bool WebView::CanGoForward() {
- return impl_->CanGoForward();
-}
-
-void WebView::BackForwardListClear() {
- return impl_->BackForwardListClear();
-}
-
-_Ewk_Back_Forward_List* WebView::GetBackForwardList() const {
- return impl_->GetBackForwardList();
-}
-
-_Ewk_History* WebView::GetBackForwardHistory() const {
- return impl_->GetBackForwardHistory();
-}
-
-const char* WebView::GetTitle() {
- return impl_->GetTitle();
-}
-
-const Eina_Rectangle WebView::GetContentsSize() const {
- return impl_->GetContentsSize();
-}
-
-bool WebView::PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) {
- return impl_->PlainTextGet(callback, user_data);
-}
-
-void WebView::InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id) {
- return impl_->InvokePlainTextGetCallback(content_text, plain_text_get_callback_id);
-}
-
-int WebView::SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) {
- return impl_->SetEwkViewPlainTextGetCallback(callback, user_data);
-}
-
-bool WebView::GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data) {
- return impl_->GetMHTMLData(callback, user_data);
-}
-
-void WebView::OnMHTMLContentGet(const std::string& mhtml_content, int callback_id) {
- return impl_->OnMHTMLContentGet(mhtml_content, callback_id);
-}
-
-void WebView::SetOverrideEncoding(const std::string& encoding) {
- return impl_->SetOverrideEncoding(encoding);
-}
-
-void WebView::ExecuteEditCommand(const char* command, const char* value) {
- return impl_->ExecuteEditCommand(command, value);
-}
-
-void WebView::Find(const char* text, Ewk_Find_Options options) {
- return impl_->Find(text, options);
-}
-
-void WebView::StopFinding() {
- return impl_->StopFinding();
-}
-
-void WebView::SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type) {
- return impl_->SetContentSecurityPolicy(policy, type);
-}
-
-void WebView::SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data) {
- impl_->SetViewGeolocationPermissionCallback(callback, user_data);
-}
-
-void WebView::SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data){
- impl_->SetViewUnfocusAllowCallback(callback, user_data);
-}
-
-void WebView::Show() {
- return impl_->Show();
-}
-
-void WebView::Hide() {
- return impl_->Hide();
-}
-
-void WebView::SetFocus(Eina_Bool focus) {
- return impl_->SetFocus(focus);
-}
-
-bool WebView::HasFocus() const {
- return impl_->HasFocus();
-}
-
-void WebView::SetScale(double scale_factor, int x, int y) {
- return impl_->SetScale(scale_factor, x, y);
-}
-
-double WebView::GetScale() {
- return impl_->GetScale();
-}
-
-void WebView::DidChangePageScaleFactor(double scale_factor) {
- return impl_->DidChangePageScaleFactor(scale_factor);
-}
-
-void WebView::GetPageScaleRange(double *min_scale, double *max_scale) {
- return impl_->GetPageScaleRange(min_scale, max_scale);
-}
-
-void WebView::DidChangePageScaleRange(double min_scale, double max_scale) {
- return impl_->DidChangePageScaleRange(min_scale, max_scale);
-}
-
-bool WebView::GetScrollPosition(int* x, int* y) const {
- return impl_->GetScrollPosition(x, y);
-}
-
-void WebView::SetScroll(int x, int y) {
- return impl_->SetScroll(x, y);
-}
-
-void WebView::GetScrollSize(int* w, int* h) {
- return impl_->GetScrollSize(w, h);
-}
-
-void WebView::SetOrientation(int orientation) {
- return impl_->SetOrientation(orientation);
-}
-
-void WebView::SetOrientationLockCallback(Ewk_Orientation_Lock_Cb func, void* data) {
- return impl_->SetOrientationLockCallback(func, data);
-}
-
-void WebView::SetViewMode(blink::WebViewMode view_mode) {
- return impl_->SetViewMode(view_mode);
-}
-
-bool WebView::IsFullscreen() {
- return impl_->IsFullscreen();
-}
-
-void WebView::ExitFullscreen() {
- return impl_->ExitFullscreen();
-}
-
-Evas_Object* WebView::GetSnapshot(Eina_Rectangle rect) {
- return impl_->GetSnapshot(rect);
-}
-
-bool WebView::GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data) {
- return impl_->GetSnapshotAsync(rect, canvas, callback, user_data);
-}
-
-void WebView::SetDrawsTransparentBackground(bool enabled) {
- return impl_->SetDrawsTransparentBackground(enabled);
-}
-
-bool WebView::TouchEventsEnabled() const {
- return impl_->TouchEventsEnabled();
-}
-
-void WebView::SetTouchEventsEnabled(bool enabled) {
- return impl_->SetTouchEventsEnabled(enabled);
-}
-
-void WebView::HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *point, const Evas_Modifier *modifiers) {
- return impl_->HandleTouchEvents(type, point, modifiers);
-}
-
-_Ewk_Hit_Test* WebView::RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode) {
- return impl_->RequestHitTestDataAt(x, y, mode);
-}
-
-Eina_Bool WebView::AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, Ewk_View_Hit_Test_Request_Callback callback, void* user_data)
-{
- return impl_->AsyncRequestHitTestDataAt(x, y, mode, callback, user_data);
-}
-
-void WebView::QuerySelectionStyle() {
- return impl_->QuerySelectionStyle();
-}
-
-void WebView::OnQuerySelectionStyleReply(const SelectionStylePrams& params) {
- return impl_->OnQuerySelectionStyleReply(params);
-}
-
-void WebView::SelectClosestWord(const gfx::Point& touch_point) {
- return impl_->SelectClosestWord(touch_point);
-}
-
-void WebView::SelectLinkText(const gfx::Point& touch_point) {
- return impl_->SelectLinkText(touch_point);
-}
-
-bool WebView::GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect) {
- return impl_->GetSelectionRange(left_rect, right_rect);
-}
-
-bool WebView::ClearSelection() {
- return impl_->GetSelectionController()->ClearSelectionViaEWebView();
-}
-
-const char* WebView::GetSelectedText() const {
- return impl_->GetSelectedText();
-}
-
-void WebView::GetSessionData(const char **data, unsigned *length) const {
- return impl_->GetSessionData(data, length);
-}
-
-bool WebView::RestoreFromSessionData(const char *data, unsigned length) {
- return impl_->RestoreFromSessionData(data, length);
-}
-
-void WebView::UseSettingsFont() {
- return impl_->UseSettingsFont();
-}
-
-void WebView::SetMouseEventsEnabled(bool enabled) {
- return impl_->SetMouseEventsEnabled(enabled);
-}
-
-bool WebView::MouseEventsEnabled() const {
- return impl_->MouseEventsEnabled();
-}
-
-double WebView::GetTextZoomFactor() const {
- return impl_->GetTextZoomFactor();
-}
-
-void WebView::SetTextZoomFactor(double text_zoom_factor) {
- return impl_->SetTextZoomFactor(text_zoom_factor);
-}
-
-bool WebView::GetLinkMagnifierEnabled() const {
- return impl_->GetLinkMagnifierEnabled();
-}
-
-void WebView::SetLinkMagnifierEnabled(bool enabled) {
- return impl_->SetLinkMagnifierEnabled(enabled);
-}
-
-void WebView::SetBrowserFont() {
- return impl_->SetBrowserFont();
-}
-
-void WebView::UpdateWebKitPreferences() {
- return impl_->UpdateWebKitPreferences();
-}
-
-bool WebView::ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata) {
- return impl_->ExecuteJavaScript(script, callback, userdata);
-}
-
-void WebView::SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data) {
- return impl_->SetJavaScriptAlertCallback(callback, user_data);
-}
-
-void WebView::JavaScriptAlertReply() {
- return impl_->JavaScriptAlertReply();
-}
-
-void WebView::SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data) {
- return impl_->SetJavaScriptConfirmCallback(callback, user_data);
-}
-
-void WebView::JavaScriptConfirmReply(bool result) {
- return impl_->JavaScriptConfirmReply(result);
-}
-
-void WebView::SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data) {
- return impl_->SetJavaScriptPromptCallback(callback, user_data);
-}
-
-void WebView::JavaScriptPromptReply(const char* result) {
- return impl_->JavaScriptPromptReply(result);
-}
-
-bool WebView::WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData) {
- return impl_->WebAppCapableGet(callback, userData);
-}
-
-bool WebView::WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData) {
- return impl_->WebAppIconUrlGet(callback, userData);
-}
-
-bool WebView::WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData) {
- return impl_->WebAppIconUrlsGet(callback, userData);
-}
-
-void WebView::InvokeWebAppCapableGetCallback(bool capable, int callbackId) {
- return impl_->InvokeWebAppCapableGetCallback(capable, callbackId);
-}
-
-void WebView::InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId) {
- return impl_->InvokeWebAppIconUrlGetCallback(iconUrl, callbackId);
-}
-
-void WebView::InvokeWebAppIconUrlsGetCallback(const std::map<std::string, std::string> &iconUrls, int callbackId) {
- return impl_->InvokeWebAppIconUrlsGetCallback(iconUrls, callbackId);
-}
-
-void WebView::SetNotificationPermissionCallback(
- Ewk_View_Notification_Permission_Callback callback, void* user_data) {
- return impl_->SetNotificationPermissionCallback(callback, user_data);
-}
-
-bool WebView::SaveAsPdf(int width, int height, const std::string& file_name) {
- return impl_->SaveAsPdf(width, height, file_name);
-}
-
-int WebView::StartInspectorServer(int port ) {
- return impl_->StartInspectorServer(port);
-}
-
-bool WebView::StopInspectorServer() {
- return impl_->StopInspectorServer();
-}
-
-bool WebView::HandleShow() {
- return impl_->HandleShow();
-}
-
-bool WebView::HandleHide() {
- return impl_->HandleHide();
-}
-
-bool WebView::HandleMove(int x, int y) {
- return impl_->HandleMove(x, y);
-}
-
-bool WebView::HandleResize(int width, int height) {
- return impl_->HandleResize(width, height);
-}
-
-bool WebView::HandleTextSelectionDown(int x, int y) {
- return impl_->HandleTextSelectionDown(x, y);
-}
-
-bool WebView::HandleTextSelectionUp(int x, int y) {
- return impl_->HandleTextSelectionUp(x, y);
-}
-
-} // 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_WEBVIEW_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_WEBVIEW_H_
-
-#include <Evas.h>
-#include <string>
-#include <map>
-
-#include "base/macros.h"
-#include "content/public/browser/navigation_controller.h"
-#include "ewk_touch.h"
-#include "public/ewk_hit_test.h"
-#include "public/ewk_view.h"
-#include "third_party/WebKit/public/web/WebViewModeEnums.h"
-
-// TODO: Remove this dependency
-class _Ewk_Back_Forward_List;
-class _Ewk_History;
-class Ewk_Settings;
-class WebContentDelegateEfl;
-struct SelectionStylePrams;
-// TODO END
-
-class Ewk_Context;
-class EWebView;
-class _Ewk_Frame;
-
-namespace gfx {
-class Point;
-}
-
-namespace content {
-class SelectionControllerEfl;
-class ContextMenuControllerEfl;
-}
-
-namespace tizen_webview {
-
-class WebViewDelegate;
-class WebViewEvasEventHandler;
-
-class WebView {
- public:
- // ---- create/delete
- static WebView* Create(Ewk_Context* wc, Evas_Object* eo) WARN_UNUSED_RESULT;
- static void Delete(WebView* wv);
-
- // initialize data members and activate event handlers.
- // call this once after Create() and before using EWebView
- void Initialize();
-
- // ---- Get various objects related with this webview
- Evas_Object* AsEvasObject();
- static WebView* FromEvasObject(Evas_Object* eo);
- Ewk_Context* GetWebContext();
- bool SetPrivateBrowsing(bool incognito);
- bool GetPrivateBrowsing() const;
- Ewk_Settings* GetSettings();
- content::SelectionControllerEfl* GetSelectionController();
- content::ContextMenuControllerEfl* GetContextMenuController();
- void ResetContextMenuController();
- void HideSelectionHandlers();
-
- _Ewk_Frame* GetMainFrame();
-
- // ---- User Agent
- bool SetUserAgent(const char* userAgent);
- const char* GetUserAgent() const;
- bool SetUserAgentAppName(const char* application_name);
- const char* GetUserAgentAppName() const;
-
- // ---- Load
- void SetURL(const char* url_string);
- const char* GetURL() const;
- void Reload();
- void ReloadIgnoringCache();
- double GetProgressValue(); // GetLoadProgressPercentage
- void LoadHTMLString(const char* html, const char* base_uri, const char* unreachable_uri);
- void Suspend();
- void Resume();
- void Stop();
- void LoadPlainTextString(const char* plain_text);
- void LoadData(const char* data, size_t size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri = NULL); // SetContent
- void UrlRequestSet(const char* url,
- content::NavigationController::LoadURLType loadtype,
- Eina_Hash* headers,
- const char* body);
- void LoadNotFoundErrorPage(const std::string& invalidUrl);
-
- // ---- Navigation
- bool GoBack();
- bool GoForward();
- bool CanGoBack();
- bool CanGoForward();
- void BackForwardListClear();
- _Ewk_Back_Forward_List* GetBackForwardList() const;
- _Ewk_History* GetBackForwardHistory() const;
-
- // ---- Contents
- const char* GetTitle();
- const Eina_Rectangle GetContentsSize() const;
- bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
- void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id);
- int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
- bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
- void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
- void SetOverrideEncoding(const std::string& encoding);
- void ExecuteEditCommand(const char* command, const char* value);
- void Find(const char* text, Ewk_Find_Options options);
- void StopFinding();
- void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
-
- void SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data);
- void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data);
- // ---- View
- // > View Visibility
- void Show();
- void Hide();
- // > View Focus
- void SetFocus(Eina_Bool focus);
- bool HasFocus() const;
- // > View Scale
- void SetScale(double scale_factor, int x, int y);
- double GetScale();
- void DidChangePageScaleFactor(double scale_factor);
- void GetPageScaleRange(double *min_scale, double *max_scale);
- void DidChangePageScaleRange(double min_scale, double max_scale);
- // > View Scroll
- bool GetScrollPosition(int* x, int* y) const;
- void SetScroll(int x, int y); // TODO: rename to ScrollTo (x,y) x,y is left top (see GetScrollSize)
- void GetScrollSize(int* w, int* h); // TODO: rename to GetPossibleScrollSize
- // > View Orientation
- void SetOrientation(int orientation);
- void SetOrientationLockCallback(Ewk_Orientation_Lock_Cb func, void* data);
- // > View mode
- void SetViewMode(blink::WebViewMode view_mode);
- bool IsFullscreen();
- void ExitFullscreen();
- // > View Snapshot
- // Get snapshot for given |rect|. Return a new created Evas_Object.
- Evas_Object* GetSnapshot(Eina_Rectangle rect);
- bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data);
- // > View Misc.
- void SetDrawsTransparentBackground(bool enabled);
-
- // ---- Touch & Hit Test
- bool TouchEventsEnabled() const;
- void SetTouchEventsEnabled(bool enabled);
- void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *point, const Evas_Modifier *modifiers);
- _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
- Eina_Bool AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, Ewk_View_Hit_Test_Request_Callback, void* user_data);
-
- // ---- Selection
- void QuerySelectionStyle();
- void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
- void SelectClosestWord(const gfx::Point& touch_point);
- void SelectLinkText(const gfx::Point& touch_point);
- bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
- bool ClearSelection();
- const char* GetSelectedText() const;
-
- // ---- Session
- void GetSessionData(const char **data, unsigned *length) const;
- bool RestoreFromSessionData(const char *data, unsigned length);
-
- // ---- Settings
- void UseSettingsFont();
- void SetMouseEventsEnabled(bool enabled);
- bool MouseEventsEnabled() const;
- double GetTextZoomFactor() const;
- void SetTextZoomFactor(double text_zoom_factor);
- bool GetLinkMagnifierEnabled() const;
- void SetLinkMagnifierEnabled(bool enabled);
- void SetBrowserFont(); // browser specific? make static?
- void UpdateWebKitPreferences(); // global? make static
-
- //---- JavaScript
- bool ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata);
- void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
- void JavaScriptAlertReply();
- void SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
- void JavaScriptConfirmReply(bool result);
- void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
- void JavaScriptPromptReply(const char* result);
-
- // ---- Web App
- bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData);
- bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData);
- bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData);
- void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
- void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId);
- void InvokeWebAppIconUrlsGetCallback(const std::map<std::string, std::string> &iconUrls, int callbackId);
-
- // ---- Notification Permission Request
- void SetNotificationPermissionCallback(
- Ewk_View_Notification_Permission_Callback callback,
- void* user_data);
-
- // ---- Misc.
- bool SaveAsPdf(int width, int height, const std::string& file_name);
- // Returns TCP port number with Inspector, or 0 if error.
- int StartInspectorServer(int port = 0);
- bool StopInspectorServer();
-
-
- /// ---- Event handling
- bool HandleShow();
- bool HandleHide();
- bool HandleMove(int x, int y);
- bool HandleResize(int width, int height);
- bool HandleTextSelectionDown(int x, int y);
- bool HandleTextSelectionUp(int x, int y);
-
- // TODO: move to private
- typedef ::EWebView Impl;
- Impl* GetImpl() { return impl_; }
- const Impl* GetImpl() const { return impl_; }
-
- private:
- Impl* impl_;
- void SetImpl(Impl* impl) { impl_ = impl; }
-
- WebView();
- ~WebView();
- DISALLOW_COPY_AND_ASSIGN(WebView);
- friend class ::WebContentDelegateEfl;
-};
-
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_WEBVIEW_H_
// Retrieve WebView from |evas_object|.
// If |evas_object| is not WebView, return NULL.
- virtual WebView* GetWebViewFromEvasObject(Evas_Object* evas_object) = 0;
+ virtual EWebView* GetWebViewFromEvasObject(Evas_Object* evas_object) const = 0;
// Check if |evas_object| is WebView or not.
virtual bool IsWebViewEvasObject(Evas_Object* evas_object) = 0;
#include "private/ewk_custom_handlers_private.h"
#include "private/ewk_policy_decision_private.h"
#include "private/ewk_user_media_private.h"
+#include "private/webview_delegate_ewk.h"
#include "browser/javascript_dialog_manager_efl.h"
#include "browser/policy_response_delegate_efl.h"
#include "browser/inputpicker/color_chooser_efl.h"
if (!new_object)
return NULL;
- EWebView* wv = EWebView::FromEvasObject(new_object);
+ EWebView* wv = WebViewDelegateEwk::GetInstance().
+ GetWebViewFromEvasObject(new_object);
DCHECK(wv);
wv->SetURL(url.spec().c_str());
return NULL;