From 61f70a9673310bdfcb536c2c54f1f3bf534f957b Mon Sep 17 00:00:00 2001 From: Yunchan Cho Date: Wed, 24 Apr 2013 14:56:21 +0900 Subject: [PATCH] Implement delegate callback for navigation decision on default livebox plugin [Issue#] N/A [Problem] There is no interface that handles 'box' scheme on livebox plugin This interface is needed for AppWidget Web API to be used by Box and PD content of default livebox [Cause] This interface is not considered by now, because requirement of AppWidget Web API is newly added. [Solution] wrt delegate callback for this is added, this callback is implemented in default livebox plugin. [SCMRequest] This patch is dependancy to the following patch of 'wrt' package https://tizendev.org/gerrit/#/c/64349/ Change-Id: I2b6eb845d17464d199c551d7ecc313dbd29b8536 --- src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp | 13 +++++++++++++ src/Plugin/AppBoxPlugin/AppBoxRenderView.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp index ff88f32..17c0370 100644 --- a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp +++ b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -145,6 +146,7 @@ bool AppBoxRenderView::createView() cbs->bufferUnset = DPL::MakeDelegate(this, &AppBoxRenderView::unsetBufferCallback); cbs->windowCreateBefore = DPL::MakeDelegate(this, &AppBoxRenderView::createWindowBeforeCallback); cbs->windowCreateAfter = DPL::MakeDelegate(this, &AppBoxRenderView::createWindowAfterCallback); + cbs->navigationDecide = DPL::MakeDelegate(this, &AppBoxRenderView::decideNavigationCallback); m_view->SetUserDelegates(cbs); // set base webview @@ -426,3 +428,14 @@ void AppBoxRenderView::unsetBufferCallback(Evas_Object* webview) LogD("enter"); evas_object_hide(webview); } + +void AppBoxRenderView::decideNavigationCallback(Evas_Object* webview, std::string& uri) +{ + LogD("enter"); + + // navigation of box scheme should be ignored + if(BoxSchemeHandler::Instance()->isBoxScheme(uri)) { + LogD("box scheme"); + BoxSchemeHandler::Instance()->process(m_instanceId, uri); + } +} diff --git a/src/Plugin/AppBoxPlugin/AppBoxRenderView.h b/src/Plugin/AppBoxPlugin/AppBoxRenderView.h index c5dcd40..ad6aa05 100644 --- a/src/Plugin/AppBoxPlugin/AppBoxRenderView.h +++ b/src/Plugin/AppBoxPlugin/AppBoxRenderView.h @@ -85,6 +85,7 @@ class AppBoxRenderView: public IRenderView { void createWindowAfterCallback(Evas_Object* parent, Evas_Object* child); void setBufferCallback(Evas_Object* webview); void unsetBufferCallback(Evas_Object* webview); + void decideNavigationCallback(Evas_Object* webview, std::string& uri); // constructor explicit AppBoxRenderView( -- 2.7.4