Debugmode has been removed.
authorlke01.lee <lke01.lee@samsung.com>
Thu, 27 Dec 2012 08:18:14 +0000 (17:18 +0900)
committerlke01.lee <lke01.lee@samsung.com>
Thu, 27 Dec 2012 11:00:39 +0000 (20:00 +0900)
[Issue#] N/A
[Problem]
[Cause] Tizen does not support debugmode in WebApp
[Solution] Debugmode has been removed

Change-Id: If37e1db28c3e115b262cf8e107e01ca775f20836

16 files changed:
CMakeLists.txt
data/Daemon.edc
data/images/icon_left_arrow.png [deleted file]
data/images/icon_refresh.png [deleted file]
data/images/icon_right_arrow.png [deleted file]
data/images/mp_stop.png [deleted file]
src/api_new/i_runnable_widget_object.h
src/api_new/runnable_widget_object.cpp
src/api_new/runnable_widget_object.h
src/view/i_view_module.h
src/view/webkit/view_logic.cpp
src/view/webkit/view_logic.h
src/wrt-client/window_data.cpp [changed mode: 0644->0755]
src/wrt-client/window_data.h [changed mode: 0644->0755]
src/wrt-client/wrt-client.cpp [changed mode: 0644->0755]
src/wrt-client/wrt-client.h [changed mode: 0644->0755]

index c8e2ce9..408bfc7 100644 (file)
@@ -152,22 +152,6 @@ INSTALL(FILES   ${CMAKE_SOURCE_DIR}/data/default_icon_tizen.png
 INSTALL(FILES   ${CMAKE_SOURCE_DIR}/data/default_icon_wac.png
     DESTINATION share/wrt-engine/
     )
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/images/icon_left_arrow.png
-    DESTINATION /usr/etc/wrt/
-    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE
-    )
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/images/icon_refresh.png
-    DESTINATION /usr/etc/wrt/
-    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE
-    )
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/images/icon_right_arrow.png
-    DESTINATION /usr/etc/wrt/
-    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE
-    )
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/images/mp_stop.png
-    DESTINATION /usr/etc/wrt/
-    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE
-    )
 INSTALL(FILES   ${CMAKE_SOURCE_DIR}/data/userAgentProfile.xml
     DESTINATION share/wrt-engine/
     )
index 25eb355..c3c94dc 100644 (file)
@@ -47,48 +47,6 @@ collections {
                 }
             }
             part {
-                name: "elm.swallow.toolbar";
-                type: SWALLOW;
-                mouse_events: 1;
-                repeat_events: 0;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 0;
-                    min: 700 100;
-                    max: 800 100;
-                    align: 1.0 1.0;
-                    rel1 { relative: 0.0 1.0; }
-                    rel2 { relative: 1.0 1.0; }
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            part {
-                name: "elm.rect.hiddenOption";
-                type: RECT;
-                mouse_events: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 0;
-                    min: 50 50;
-                    max: 50 50;
-                    fixed: 1 1;
-                    align: 1.0 1.0;
-                    rel1 { relative: 1.0 1.0; to: base; }
-                    rel2 { relative: 1.0 1.0; to: base; }
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    color: 100 55 55 100;
-                    visible: 1;
-                }
-            }
-            part {
                 name: "elm.rect.comboboxPickerBG";
                 type: RECT;
                 mouse_events: 0;
@@ -150,26 +108,6 @@ collections {
                 action: STATE_SET "default" 0.0;
                 target: "elm.swallow.backward";
             }
-            program { name: "show,toolbar";
-                signal: "show,toolbar,signal";
-                action: STATE_SET "visible" 0.0;
-                target: "elm.swallow.toolbar";
-            }
-            program { name: "hide,toolbar";
-                signal: "hide,toolbar,signal";
-                action: STATE_SET "default" 0.0;
-                target: "elm.swallow.toolbar";
-            }
-            program { name: "show,hiddenOption";
-                signal: "show,hiddenOption,signal";
-                action: STATE_SET "visible" 0.0;
-                target: "elm.rect.hiddenOption";
-            }
-            program { name: "hide,hiddenOption";
-                signal: "hide,hiddenOption,signal";
-                action: STATE_SET "default" 0.0;
-                target: "elm.rect.hiddenOption";
-            }
             program { name: "showComboboxPicker";
                 signal: "show,comboboxPicker";
                 action: STATE_SET "showComboboxPicker" 0.0;
diff --git a/data/images/icon_left_arrow.png b/data/images/icon_left_arrow.png
deleted file mode 100644 (file)
index 556399e..0000000
Binary files a/data/images/icon_left_arrow.png and /dev/null differ
diff --git a/data/images/icon_refresh.png b/data/images/icon_refresh.png
deleted file mode 100644 (file)
index 5ea70bf..0000000
Binary files a/data/images/icon_refresh.png and /dev/null differ
diff --git a/data/images/icon_right_arrow.png b/data/images/icon_right_arrow.png
deleted file mode 100644 (file)
index 6bbb2c6..0000000
Binary files a/data/images/icon_right_arrow.png and /dev/null differ
diff --git a/data/images/mp_stop.png b/data/images/mp_stop.png
deleted file mode 100644 (file)
index e09dd1f..0000000
Binary files a/data/images/mp_stop.png and /dev/null differ
index 783eaf0..73bdbd1 100644 (file)
@@ -163,8 +163,6 @@ public:
      * Call goBack() on webkit
      */
     virtual void Backward() = 0;
-    virtual void Reload() = 0;
-    virtual void Forward() = 0;
     /**
      * fire custom javascript event
      */
index 088274d..8244564 100644 (file)
@@ -220,20 +220,6 @@ void RunnableWidgetObject::Backward() {
     change.commit();
 }
 
-void RunnableWidgetObject::Reload() {
-    State::StateChange change = m_guardstate->allowReload();
-    m_view->reload();
-
-    change.commit();
-}
-
-void RunnableWidgetObject::Forward() {
-    State::StateChange change = m_guardstate->allowForward();
-    m_view->forward();
-
-    change.commit();
-}
-
 void RunnableWidgetObject::FireJavascriptEvent(int event, void* data)
 {
     State::StateChange change = m_guardstate->allowFireJavascriptEvent();
index 49f028e..dd0f85e 100644 (file)
@@ -59,8 +59,6 @@ public:
     Evas_Object* GetCurrentWebview();
     void SetUserDelegates(const UserDelegatesPtr& cbs);
     void Backward();
-    void Reload();
-    void Forward();
     void FireJavascriptEvent(int event, void* data);
 
 private:
index f4f6d7a..8068151 100644 (file)
@@ -50,8 +50,6 @@ public:
     virtual void resumeWidget() = 0;
     virtual void resetWidget() = 0;
     virtual void backward() = 0;
-    virtual void reload() = 0;
-    virtual void forward() = 0;
     virtual void reloadStartPage() = 0;
     virtual Evas_Object* getCurrentWebview() = 0;
     virtual void fireJavascriptEvent(int event, void* data) = 0;
index 6e975fc..52924e5 100644 (file)
@@ -378,18 +378,6 @@ void ViewLogic::backward()
     }
 }
 
-void ViewLogic::reload()
-{
-    ewk_view_reload(m_currentEwkView);
-}
-
-void ViewLogic::forward()
-{
-    if (ewk_view_forward_possible(m_currentEwkView)) {
-        ewk_view_forward(m_currentEwkView);
-    }
-}
-
 void ViewLogic::reloadStartPage()
 {
     LogInfo("Reload Start Page");
index 56df489..5369a26 100644 (file)
@@ -57,8 +57,6 @@ class ViewLogic : public ViewModule::IViewModule
     void resumeWidget();
     void resetWidget();
     void backward();
-    void reload();
-    void forward();
     void reloadStartPage();
     Evas_Object* getCurrentWebview();
     void fireJavascriptEvent(int event, void* data);
old mode 100644 (file)
new mode 100755 (executable)
index c7597dd..d021321
@@ -31,13 +31,6 @@ char const* const THEME_EDJ_PATH = "/usr/share/edje/wrt/wrt_theme.edj";
 char const* const ELM_STATE_SHOW_CONTENT = "elm,state,show,content";
 char const* const ELM_SWALLOW_CONTENT = "elm.swallow.content";
 char const* const ELM_SWALLOW_BACKWARD = "elm.swallow.backward";
-char const* const ELM_SWALLOW_TOOLBAR = "elm.swallow.toolbar";
-char const* const ELM_RECT_HIDDENOPTION = "elm.rect.hiddenOption";
-
-const char *EDJE_SHOW_TOOLBAR_SIGNAL = "show,toolbar,signal";
-const char *EDJE_HIDE_TOOLBAR_SIGNAL = "hide,toolbar,signal";
-const char *EDJE_SHOW_HIDDENOPTION_SIGNAL = "show,hiddenOption,signal";
-const char *EDJE_HIDE_HIDDENOPTION_SIGNAL = "hide,hiddenOption,signal";
 
 char const* const ELM = "elm";
 char const* const LAYOUT = "layout";
@@ -50,10 +43,8 @@ char const* const FLOATBACKWARD_BUTTON_STYLE = "wrt/backward";
 } // anonymous namespace
 
 WindowData::WindowData(unsigned long pid, bool manualInit) :
-    m_debugMode(false),
     m_win(NULL),
-    m_naviBackButton(NULL),
-    m_toolbarTimer(NULL)
+    m_naviBackButton(NULL)
 {
     m_win = createWindow(pid);
 
@@ -109,8 +100,7 @@ void WindowData::toggleIndicator(bool fullscreen)
 
 void WindowData::setViewMode(
         bool fullscreen,
-        bool backbutton,
-        CtxMenuItems ctxMenuItems)
+        bool backbutton)
 {
     LogDebug("setViewMode");
     LogDebug("fullscreen: " << fullscreen);
@@ -124,94 +114,6 @@ void WindowData::setViewMode(
         createFloatBackButton();
     }
 
-    m_ctxMenuItems = ctxMenuItems;
-
-    if(m_debugMode) {
-        showHiddenOption(m_user_layout);
-        createToolbar(m_ctxMenuItems);
-    }
-}
-
-void WindowData::createToolbar(CtxMenuItems ctxMenuItems)
-{
-    Elm_Object_Item *toolbarIt;
-    Evas_Object *toolbarButton;
-    Evas_Object *toolbar;
-    char buf[100];
-
-    toolbar = elm_toolbar_add(m_user_layout);
-    if (!toolbar)
-        return;
-
-    elm_object_style_set(toolbar, "naviframe");
-    elm_object_part_content_set(m_user_layout,
-            ELM_SWALLOW_TOOLBAR,
-            toolbar);
-
-    std::list<CtxMenuItem>::iterator itor;
-    for (itor = ctxMenuItems.begin(); itor != ctxMenuItems.end(); ++itor) {
-        toolbarButton = elm_button_add(toolbar);
-        if (!toolbarButton)
-            return;
-
-        evas_object_size_hint_align_set(toolbarButton,
-                EVAS_HINT_FILL,
-                EVAS_HINT_FILL);
-        evas_object_size_hint_weight_set(toolbarButton,
-                EVAS_HINT_EXPAND,
-                EVAS_HINT_EXPAND);
-
-        Evas_Object *ic = elm_icon_add(toolbar);
-
-        // (*itor).icon.c_str() guarantied not to have format specifiers
-        snprintf(buf, sizeof(buf), (*itor).icon.c_str());
-
-        elm_icon_file_set(ic, buf, NULL);
-        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
-        elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
-        elm_object_part_content_set(toolbarButton, "icon", ic);
-
-        evas_object_smart_callback_add(toolbarButton,
-                "clicked",
-                (*itor).callback,
-                (*itor).data);
-        toolbarIt = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
-        elm_object_item_part_content_set(toolbarIt, "object", toolbarButton);
-
-        //for margin button between buttons
-        toolbarButton = elm_button_add(toolbar);
-        if (!toolbarButton)
-            return;
-        evas_object_color_set(
-                toolbarButton,
-                255,
-                255,
-                255,
-                0);
-        toolbarIt = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL);
-        elm_object_item_part_content_set(toolbarIt, "object", toolbarButton);
-    }
-
-    optionheaderClose = TRUE;
-
-    elm_object_part_content_set(m_user_layout,
-            ELM_SWALLOW_TOOLBAR,
-            toolbar);
-}
-
-void WindowData::showToolbar()
-{
-    emitSignalForUserLayout(EDJE_SHOW_TOOLBAR_SIGNAL, "");
-    m_toolbarTimer = ecore_timer_add(10.0, hideToolbarCallback, this);
-}
-
-void WindowData::hideToolbar()
-{
-    emitSignalForUserLayout(EDJE_HIDE_TOOLBAR_SIGNAL, "");
-    if(m_toolbarTimer) {
-        ecore_timer_del(m_toolbarTimer);
-        m_toolbarTimer = NULL;
-    }
 }
 
 void WindowData::createFloatBackButton()
@@ -320,37 +222,6 @@ Evas_Object* WindowData::createUserLayout(Evas_Object* parent)
     return layout;
 }
 
-void WindowData::showHiddenOption(Evas_Object* parent)
-{
-    Assert(parent != NULL && "Parent for Hiden Option");
-
-    emitSignalForUserLayout(EDJE_SHOW_HIDDENOPTION_SIGNAL, "");
-
-    edje_object_signal_callback_add(elm_layout_edje_get(parent),
-            "mouse,clicked,1",
-            "elm.rect.hiddenOption",
-            controlHiddenOptionCallback,
-            this);
-}
-
-void WindowData::hideHiddenOption(Evas_Object* parent)
-{
-    Assert(parent != NULL && "Parent for Hiden Option");
-
-    emitSignalForUserLayout(EDJE_HIDE_HIDDENOPTION_SIGNAL, "");
-
-    edje_object_signal_callback_del(elm_layout_edje_get(parent),
-            "mouse,clicked,1",
-            "elm.rect.hiddenOption",
-            controlHiddenOptionCallback);
-}
-
-void WindowData::initFullViewMode ()
-{
-    hideToolbar();
-    showHiddenOption(m_user_layout);
-}
-
 void WindowData::addNaviBackButtonCallback(
         const char* event,
         CallbackType callback,
@@ -414,64 +285,6 @@ void WindowData::emitSignalForUserLayout(
             elm_layout_edje_get(m_user_layout), emission, source);
 }
 
-void WindowData::moreButtonCallback(void *data,
-        Evas_Object */*obj*/,
-        void */*event_info*/)
-{
-    WindowData* This = static_cast<WindowData*>(data);
-    Elm_Object_Item *naviIt = elm_naviframe_top_item_get(This->m_navigation);
-
-    if (This->optionheaderClose)
-        elm_object_item_signal_emit(naviIt, "elm,state,optionheader,open", "");
-    else
-        elm_object_item_signal_emit(naviIt, "elm,state,optionheader,close", "");
-
-    This->optionheaderClose = !This->optionheaderClose;
-}
-
-
-void WindowData::changeViewModeCallback(void *data,
-        Evas_Object */*obj*/,
-        void */*event_info*/)
-{
-    WindowData* This = static_cast<WindowData*>(data);
-    Elm_Object_Item *naviIt = elm_naviframe_top_item_get(This->m_navigation);
-
-    if(elm_naviframe_item_title_visible_get(naviIt)) {
-        This->showHiddenOption(This->m_user_layout);
-
-    } else {
-        This ->hideToolbar();
-    }
-}
-
-void WindowData::controlHiddenOptionCallback(void *data,
-        Evas_Object * /*obj*/,
-        const char * /*emission*/,
-        const char * /*source*/)
-{
-    LogDebug("controlHiddenOptionCallback");
-    WindowData* This = static_cast<WindowData *>(data);
-    const char* state = edje_object_part_state_get(
-            elm_layout_edje_get(This->m_user_layout), "elm.swallow.toolbar",
-            NULL);
-
-    if (state && !strncmp(state, "default", strlen("default"))) {
-        This->showToolbar();
-        This->hideHiddenOption(This->m_user_layout);
-    } else {
-        This->initFullViewMode();
-    }
-}
-
-Eina_Bool WindowData::hideToolbarCallback(void *data)
-{
-    WindowData *This = static_cast<WindowData *>(data);
-
-    This->initFullViewMode();
-    return TRUE;
-}
-
 void WindowData::toggleFullscreen(bool fullscreen)
 {
     LogDebug(__PRETTY_FUNCTION__);
old mode 100644 (file)
new mode 100755 (executable)
index 0082990..64c827b
@@ -28,7 +28,6 @@
 #include <vector>
 #include <string>
 #include <dpl/noncopyable.h>
-#include <list>
 
 /*
  * Current layout structure
  *                  widget_area (elm_webview)
  *
  */
-namespace {
-const char *const WRT_OPTION_LABEL_BACKWARD = "Backward";
-const char *const WRT_OPTION_LABEL_FORWARD = "Forward";
-const char *const WRT_OPTION_LABEL_RELOAD = "Reload";
-
-const char *const WRT_OPTION_ICON_BACKWARD = "/usr/etc/wrt/icon_left_arrow.png";
-const char *const WRT_OPTION_ICON_FORWARD = "/usr/etc/wrt/icon_right_arrow.png";
-const char *const WRT_OPTION_ICON_RELOAD  = "/usr/etc/wrt/icon_refresh.png";
-}
 
 class WindowData : private DPL::Noncopyable
 {
@@ -72,20 +62,9 @@ class WindowData : private DPL::Noncopyable
     typedef std::vector<EventWithFunction> EventWithFunctionVector;
 
   public:
-    bool m_debugMode;
     Evas_Object* m_win;
     Evas_Object* m_user_layout;
 
-
-    struct CtxMenuItem
-    {
-        std::string label;
-        std::string icon;
-        Evas_Smart_Cb callback;
-        void* data;
-    };
-    typedef std::list<CtxMenuItem> CtxMenuItems;
-
     explicit WindowData(unsigned long pid, bool manualInit=false);
     virtual ~WindowData();
 
@@ -117,29 +96,10 @@ class WindowData : private DPL::Noncopyable
             const char* emission,
             const char* source);
 
-    void changeViewMode();
-    void createToolbar(CtxMenuItems ctxMenuItems);
-    void showToolbar();
-    void hideToolbar();
-    void createOptionButton();
-    void destroyOptionButton();
     void setViewMode(
             bool fullscreen,
-            bool backbutton,
-            CtxMenuItems ctxMenuItems);
-    void initFullViewMode();
+            bool backbutton);
 
-    static void moreButtonCallback(void *data,
-            Evas_Object *obj,
-            void *event_info);
-    static void changeViewModeCallback(void *data,
-            Evas_Object *obj,
-            void *event_info);
-    static void controlHiddenOptionCallback(void *data,
-            Evas_Object *obj,
-            const char *emission,
-            const char *source);
-    static Eina_Bool hideToolbarCallback(void *data);
     void toggleFullscreen(bool fullscreen);
 
   protected:
@@ -148,10 +108,6 @@ class WindowData : private DPL::Noncopyable
     Evas_Object* m_navigation;
     Evas_Object* m_naviBackButton;
     Evas_Object* m_floatBackButton;
-    bool optionheaderClose;
-    std::string m_title;
-    CtxMenuItems m_ctxMenuItems;
-    Ecore_Timer *m_toolbarTimer;
     bool m_fullscreen;
 
     Evas_Object* createWindow(unsigned long pid);
@@ -159,9 +115,6 @@ class WindowData : private DPL::Noncopyable
     Evas_Object* createNavigationBar(Evas_Object* parent);
     Evas_Object* createUserLayout(Evas_Object* parent);
     Evas_Object* createConformant(Evas_Object* parent);
-    Evas_Object* createProgress(Evas_Object* parent);
-    void showHiddenOption(Evas_Object* parent);
-    void hideHiddenOption(Evas_Object* parent);
 
     void alignProgressPosition();
     void toggleIndicator(bool fullscreen);
old mode 100644 (file)
new mode 100755 (executable)
index 5508920..2e8f448
@@ -550,41 +550,8 @@ void WrtClient::initializeWindowModes()
         }
     }
 
-    LogInfo("initializeWindowModes " << m_debugMode);
-
-    if(m_debugMode) {
-        m_windowData->m_debugMode = TRUE;
-    }
-    else {
-        m_windowData->m_debugMode = FALSE;
-    }
-
-    WindowData::CtxMenuItems ctxMenuItems;
-
-    WindowData::CtxMenuItem ctxMenuBackword;
-    ctxMenuBackword.label = WRT_OPTION_LABEL_BACKWARD;
-    ctxMenuBackword.icon = WRT_OPTION_ICON_BACKWARD;
-    ctxMenuBackword.callback = backwardCallback;
-    ctxMenuBackword.data = this;
-    ctxMenuItems.push_back(ctxMenuBackword);
-
-    WindowData::CtxMenuItem ctxMenuReload;
-    ctxMenuReload.label = WRT_OPTION_LABEL_RELOAD;
-    ctxMenuReload.icon = WRT_OPTION_ICON_RELOAD;
-    ctxMenuReload.callback = reloadCallback;
-    ctxMenuReload.data = this;
-    ctxMenuItems.push_back(ctxMenuReload);
-
-    WindowData::CtxMenuItem ctxMenuForward;
-    ctxMenuForward.label = WRT_OPTION_LABEL_FORWARD;
-    ctxMenuForward.icon = WRT_OPTION_ICON_FORWARD;
-    ctxMenuForward.callback = forwardCallback;
-    ctxMenuForward.data = this;
-    ctxMenuItems.push_back(ctxMenuForward);
-
     m_windowData->setViewMode(fullscreen,
-            backbutton,
-            ctxMenuItems);
+            backbutton);
 }
 
 void WrtClient::backButtonCallback(void* data,
@@ -599,44 +566,6 @@ void WrtClient::backButtonCallback(void* data,
     This->m_widget->Backward();
 }
 
-void WrtClient::backwardCallback(void *data,
-        Evas_Object */*obj*/,
-        void */*event_info*/)
-{
-    LogInfo("BackButtonCallback");
-    Assert(data);
-
-    WrtClient* This = static_cast<WrtClient*>(data);
-
-    This->m_widget->Backward();
-    This->m_windowData->initFullViewMode();
-}
-
-void WrtClient::reloadCallback(void *data,
-        Evas_Object */*obj*/,
-        void */*event_info*/)
-{
-    LogInfo("reloadCallback");
-
-    WrtClient* This = static_cast<WrtClient*>(data);
-
-    This->m_widget->Reload();
-    This->m_windowData->initFullViewMode();
-}
-
-void WrtClient::forwardCallback(void *data,
-        Evas_Object */*obj*/,
-        void */*event_info*/)
-{
-    LogInfo("forwardCallback");
-
-    WrtClient* This = static_cast<WrtClient*>(data);
-
-    This->m_widget->Forward();
-    This->m_windowData->initFullViewMode();
-}
-
-
 void WrtClient::connectElmCallback()
 {
     Assert(m_windowData);
old mode 100644 (file)
new mode 100755 (executable)
index 921aebc..e5ce5c6
@@ -81,15 +81,6 @@ class WrtClient :
     static void backButtonCallback(void* data,
                                    Evas_Object* obj,
                                    void* event_info);
-    static void backwardCallback(void* data,
-            Evas_Object* obj,
-            void* event_info);
-    static void reloadCallback(void* data,
-            Evas_Object* obj,
-            void* event_info);
-    static void forwardCallback(void* data,
-            Evas_Object* obj,
-            void* event_info);
 
     // launching steps
     void initStep();