Moved code responsible for web page ui to separate service. 68/48368/6
authorMaciej Skrzypkowski <m.skrzypkows@samsung.com>
Mon, 21 Sep 2015 09:24:46 +0000 (11:24 +0200)
committerMaciej Skrzypkowski <m.skrzypkows@samsung.com>
Mon, 21 Sep 2015 09:47:29 +0000 (11:47 +0200)
[Issue]    https://bugs.tizen.org/jira/browse/TT-167
[Problem]  Functionality of SimpleUI was confusing.
[Cause]    N/A
[Solution] Created new class WebPageUI, moved all classes connected
           to web page ui to new service.

Change-Id: I633b5c5abad0040b9b7d51e5fb532de2c0d25689
Signed-off-by: Maciej Skrzypkowski <m.skrzypkows@samsung.com>
59 files changed:
services/CMakeLists.txt
services/MainUI/MainUI.cpp
services/MainUI/MainUI.h
services/SimpleUI/ButtonBar.cpp [deleted file]
services/SimpleUI/ButtonBar.h [deleted file]
services/SimpleUI/CMakeLists.txt
services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h
services/SimpleUI/edc/ErrorMessage.edc [deleted file]
services/SimpleUI/edc/ImageButton.edc [deleted file]
services/SimpleUI/edc/LeftButtonBar.edc [deleted file]
services/SimpleUI/edc/MainLayout.edc [deleted file]
services/SimpleUI/edc/RightButtonBar.edc [deleted file]
services/SimpleUI/edc/ScrollerDefault.edc [deleted file]
services/SimpleUI/edc/Spacer.edc [deleted file]
services/SimpleUI/edc/webview.edc [deleted file]
services/SimpleUI/images/btn_bar_back_nor.png [deleted file]
services/SimpleUI/images/btn_bar_forward_nor.png [deleted file]
services/SimpleUI/images/btn_bar_manager_nor.png [deleted file]
services/SimpleUI/images/btn_bar_more_nor.png [deleted file]
services/SimpleUI/images/btn_bar_reload_nor.png [deleted file]
services/SimpleUI/images/btn_bar_stop_nor.png [deleted file]
services/SimpleUI/images/btn_bar_vertical_settings.png [deleted file]
services/SimpleUI/images/round_rectangle_4X4.png [deleted file]
services/SimpleUI/images/web_browsing_icon_error.png [deleted file]
services/SimpleUI/images/web_shadow.png [deleted file]
services/SimpleURI/CMakeLists.txt [deleted file]
services/SimpleURI/SimpleURI.cpp [deleted file]
services/SimpleURI/SimpleURI.h [deleted file]
services/SimpleURI/edc/URIEntry.edc [deleted file]
services/SimpleURI/images/ico_search.png [deleted file]
services/SimpleURI/images/ico_url.png [deleted file]
services/SimpleURI/images/search_searchbar_bg_foc.png [deleted file]
services/SimpleURI/images/search_searchbar_bg_nor.png [deleted file]
services/WebPageUI/ButtonBar.cpp [new file with mode: 0644]
services/WebPageUI/ButtonBar.h [new file with mode: 0644]
services/WebPageUI/CMakeLists.txt [new file with mode: 0644]
services/WebPageUI/URIEntry.cpp [new file with mode: 0644]
services/WebPageUI/URIEntry.h [new file with mode: 0644]
services/WebPageUI/WebPageUI.cpp [new file with mode: 0644]
services/WebPageUI/WebPageUI.h [new file with mode: 0644]
services/WebPageUI/edc/ErrorMessage.edc [new file with mode: 0644]
services/WebPageUI/edc/ImageButton.edc [new file with mode: 0644]
services/WebPageUI/edc/LeftButtonBar.edc [new file with mode: 0644]
services/WebPageUI/edc/RightButtonBar.edc [new file with mode: 0644]
services/WebPageUI/edc/Spacer.edc [new file with mode: 0644]
services/WebPageUI/edc/URIEntry.edc [new file with mode: 0644]
services/WebPageUI/edc/WebPageUI.edc [new file with mode: 0644]
services/WebPageUI/images/btn_bar_back_nor.png [new file with mode: 0644]
services/WebPageUI/images/btn_bar_forward_nor.png [new file with mode: 0644]
services/WebPageUI/images/btn_bar_manager_nor.png [new file with mode: 0644]
services/WebPageUI/images/btn_bar_more_nor.png [new file with mode: 0644]
services/WebPageUI/images/btn_bar_reload_nor.png [new file with mode: 0644]
services/WebPageUI/images/btn_bar_stop_nor.png [new file with mode: 0644]
services/WebPageUI/images/btn_bar_vertical_settings.png [new file with mode: 0644]
services/WebPageUI/images/round_rectangle_4X4.png [new file with mode: 0644]
services/WebPageUI/images/web_browsing_icon_error.png [new file with mode: 0644]
services/WebPageUI/images/web_shadow.png [new file with mode: 0644]
unit_tests/CMakeLists.txt

index b4944bfa9d49b6f9f22c1efa941607e363dadcbc..975dd9369f00e381771276cd3f5fa074edd152d3 100644 (file)
@@ -7,7 +7,7 @@ add_subdirectory(HistoryUI)
 add_subdirectory(TabUI)
 add_subdirectory(SimpleUI)
 add_subdirectory(SettingsUI)
-add_subdirectory(SimpleURI)
+add_subdirectory(WebPageUI)
 add_subdirectory(BookmarkManagerUI)
 add_subdirectory(StorageService)
 add_subdirectory(HistoryService)
index d5bec801ed9908b831ce2f697d945cbe69dabf8d..11df7f9a0d3623a7eb1197f0cff8412972dcfe54 100644 (file)
@@ -81,6 +81,34 @@ MainUI::~MainUI()
     elm_gengrid_item_class_free(m_bookmark_item_class);
 }
 
+void MainUI::init(Evas_Object* parent)
+{
+    M_ASSERT(parent);
+    m_parent = parent;
+}
+
+
+Evas_Object* MainUI::getContent()
+{
+    M_ASSERT(m_parent);
+    if (!m_layout) {
+        m_layout = createQuickAccessLayout(m_parent);
+    }
+    return m_layout;
+}
+
+void MainUI::showMostVisited(std::shared_ptr< services::HistoryItemVector > vec)
+{
+    addHistoryItems(vec);
+    showHistory();
+}
+
+void MainUI::showBookmarks(std::vector< std::shared_ptr< tizen_browser::services::BookmarkItem > > vec)
+{
+    addBookmarkItems(vec);
+    showBookmarks();
+}
+
 void MainUI::createItemClasses()
 {
     BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
@@ -94,14 +122,6 @@ void MainUI::createItemClasses()
     }
 }
 
-void MainUI::show(Evas_Object* parent)
-{
-    //FIXME: this may be source of memory leak this object is not deleted anywhere
-    m_layout = createQuickAccessLayout(parent);
-    evas_object_show(m_layout);
-
-    m_parent = parent;
-}
 
 Evas_Object* MainUI::createQuickAccessLayout(Evas_Object* parent)
 {
@@ -304,6 +324,7 @@ void MainUI::addBookmarkItem(std::shared_ptr<tizen_browser::services::BookmarkIt
 
 void MainUI::addBookmarkItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > items)
 {
+    clearBookmarkGengrid();
          BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
          for (auto it = items.begin(); it != items.end(); ++it) {
                  addBookmarkItem(*it);
@@ -393,6 +414,7 @@ void MainUI::showHistory()
         return;
     }
     setEmptyView(false);
+    evas_object_show(m_layout);
 }
 
 void MainUI::clearBookmarkGengrid()
@@ -417,13 +439,12 @@ void MainUI::showBookmarks()
     evas_object_show(m_bookmarksView);
 
     elm_object_focus_set(m_bookmarksButton, true);
+    evas_object_show(m_layout);
 }
 
 void MainUI::hide()
 {
     BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
-
-    //TODO: remove these "evas_object_hide" after cleaning up the mess in whole app window.
     evas_object_hide(m_layout);
     evas_object_hide(m_mostVisitedView);
     evas_object_hide(m_bookmarksView);
index 0ebc78d08f12a26556a5f766bd35d9456a318854..0b5b52ba7e8bf740271c4206b3434f6dae36da66 100644 (file)
@@ -39,24 +39,17 @@ class BROWSER_EXPORT MainUI
 public:
     MainUI();
     ~MainUI();
-    void show(Evas_Object *main_layout);
+    void init(Evas_Object *main_layout);
+    Evas_Object* getContent();
+    void showMostVisited(std::shared_ptr<services::HistoryItemVector> vec);
+    void showBookmarks(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > vec);
     void hide();
     virtual std::string getName();
-    void clearHistoryGenlist();
-    void clearBookmarkGengrid();
-    void showHistory();
-    void showBookmarks();
-    void clearItems();
     void openDetailPopup(std::shared_ptr<services::HistoryItem> currItem, std::shared_ptr<services::HistoryItemVector> prevItems);
     bool isDesktopMode() const;
     void setDesktopMode(bool mode);
     DetailPopup & getDetailPopup();
 
-    void addHistoryItem(std::shared_ptr<services::HistoryItem>);
-    void addHistoryItems(std::shared_ptr<services::HistoryItemVector>);
-    void addBookmarkItem(std::shared_ptr<tizen_browser::services::BookmarkItem>);
-    void addBookmarkItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> >);
-
     boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>, int)> mostVisitedTileClicked;
     boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>, bool)> openURLInNewTab;
     boost::signals2::signal<void (const std::string & )> mostVisitedClicked;
@@ -68,6 +61,15 @@ public:
 
 private:
     void createItemClasses();
+    void addHistoryItem(std::shared_ptr<services::HistoryItem>);
+    void addHistoryItems(std::shared_ptr<services::HistoryItemVector>);
+    void addBookmarkItem(std::shared_ptr<tizen_browser::services::BookmarkItem>);
+    void addBookmarkItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> >);
+    void clearHistoryGenlist();
+    void clearBookmarkGengrid();
+    void showHistory();
+    void showBookmarks();
+    void clearItems();
 
     Evas_Object* createQuickAccessLayout(Evas_Object *parent);
     Evas_Object* createMostVisitedView(Evas_Object *parent);
diff --git a/services/SimpleUI/ButtonBar.cpp b/services/SimpleUI/ButtonBar.cpp
deleted file mode 100644 (file)
index 6bf795b..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <Elementary.h>
-#include <iostream>
-#include "BrowserLogger.h"
-
-#include "Config.h"
-#include "ButtonBar.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-double ButtonBar::tooltipHideTimeout = 0.;
-double ButtonBar::tooltipShowDelay = 0.;
-Ecore_Timer * ButtonBar::m_tooltipHideTimer = NULL;
-Ecore_Timer * ButtonBar::m_tooltipShowTimer = NULL;
-
-ButtonBar::ButtonBar(Evas_Object *parent, const std::string &edjFile, const std::string &groupName)
-{
-    config::DefaultConfig config;
-    config.load("");
-    ButtonBar::tooltipHideTimeout =  boost::any_cast <double> (config.get("TOOLTIP_HIDE_TIMEOUT"));
-
-    std::string edjFilePath = EDJE_DIR;
-    edjFilePath.append(edjFile);
-    elm_theme_extension_add(NULL, edjFilePath.c_str());
-    m_layout = elm_layout_add(parent);
-    Eina_Bool layoutSetResult = elm_layout_file_set(m_layout, edjFilePath.c_str(), groupName.c_str());
-    if(!layoutSetResult)
-        throw std::runtime_error("Layout file not found: " + edjFilePath);
-    evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(m_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    evas_object_show(m_layout);
-}
-ButtonBar::~ButtonBar()
-{
-
-    if(ButtonBar::m_tooltipShowTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
-        ButtonBar::m_tooltipShowTimer = NULL;
-    }
-    if(ButtonBar::m_tooltipHideTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
-        ButtonBar::m_tooltipHideTimer = NULL;
-    }
-}
-
-void ButtonBar::addAction(sharedAction action, const std::string &buttonName)
-{
-    ActionButton actionButton;
-    std::shared_ptr<EAction> eAction = std::make_shared<EAction>(action);
-    actionButton.eAction = eAction;
-    Evas_Object *button = elm_button_add(m_layout);
-
-    evas_object_event_callback_add(button, EVAS_CALLBACK_MOUSE_IN, __cb_mouse_in, NULL);
-    evas_object_event_callback_add(button, EVAS_CALLBACK_MOUSE_OUT, __cb_mouse_out, NULL);
-    evas_object_smart_callback_add(button, "focused", __cb_focus_in, NULL);
-    evas_object_smart_callback_add(button, "unfocused", __cb_focus_out, NULL);
-
-
-    elm_object_style_set(button, action->getIcon().c_str());
-    elm_object_disabled_set(button, action->isEnabled() ? EINA_FALSE : EINA_TRUE);
-    evas_object_smart_callback_add(button, "clicked", EAction::callbackFunction, eAction.get());
-    evas_object_show(button);
-    if(action->isEnabled()){
-        elm_object_tooltip_text_set(button, eAction->getAction()->getToolTip().c_str());
-        elm_object_tooltip_orient_set(button, ELM_TOOLTIP_ORIENT_BOTTOM);
-        elm_object_tooltip_style_set(button, "browserTip");
-    }
-
-    elm_object_part_content_set(m_layout, buttonName.c_str(), button);
-
-    actionButton.button = button;
-    m_buttonsMap[buttonName] = actionButton;
-    m_actionsMap[buttonName] = action;
-    registerEnabledChangedCallback(action, buttonName);
-}
-
-void ButtonBar::registerEnabledChangedCallback(sharedAction action, const std::string &buttonName)
-{
-    action->enabledChanged.connect(boost::bind(&ButtonBar::onEnabledChanged, this, buttonName, action));
-}
-
-void ButtonBar::onEnabledChanged(const std::string &buttonName, sharedAction action)
-{
-    // if action match action assigned to button, refresh button
-    if (m_actionsMap[buttonName] == action) {
-        refreshButton(buttonName);
-    }
-
-}
-
-void ButtonBar::setActionForButton(const std::string &buttonName, sharedAction newAction)
-{
-        ActionButton actionButton;
-        Evas_Object *button = m_buttonsMap[buttonName].button;
-        std::shared_ptr<EAction> eAction = std::make_shared<EAction>(newAction);
-
-        elm_object_style_set(button, newAction->getIcon().c_str());
-
-        evas_object_smart_callback_del(button, "clicked", EAction::callbackFunction);
-        evas_object_smart_callback_add(button, "clicked", EAction::callbackFunction, eAction.get());
-
-
-        if(elm_object_focus_get(button)) {
-            elm_object_signal_emit(button, "elm,action,focus", "elm");
-        }
-
-        m_buttonsMap[buttonName].eAction = eAction;
-        m_actionsMap[buttonName] = newAction;
-
-        refreshButton(buttonName);
-
-}
-
-void ButtonBar::refreshButton(const std::string &buttonName)
-{
-    Evas_Object * button = m_buttonsMap[buttonName].button;
-    if(m_actionsMap[buttonName]->isEnabled())
-    {
-        elm_object_disabled_set(button, EINA_FALSE);
-        elm_object_tooltip_text_set(button, m_actionsMap[buttonName]->getToolTip().c_str());
-        elm_object_tooltip_orient_set(button, ELM_TOOLTIP_ORIENT_BOTTOM);
-        elm_object_tooltip_style_set(button, "browserTip");
-    }
-    else
-    {
-        elm_object_disabled_set(button, EINA_TRUE);
-        elm_object_tooltip_unset(button);
-    }
-}
-
-Evas_Object* ButtonBar::getContent()
-{
-    return m_layout;
-}
-
-Evas_Object* ButtonBar::getButton(const std::string &buttonName)
-{
-    return m_buttonsMap[buttonName].button;
-}
-
-void ButtonBar::clearFocus()
-{
-    for ( auto it = m_buttonsMap.begin(); it != m_buttonsMap.end(); it++) {
-        elm_object_focus_set((*it).second.button, EINA_FALSE);
-    }
-}
-
-void ButtonBar::setDisabled(bool disabled)
-{
-    if (disabled) {
-        clearFocus();
-    }
-    elm_object_disabled_set(getContent(), disabled ? EINA_TRUE : EINA_FALSE);
-}
-
-void ButtonBar::__cb_focus_in(void *data, Evas_Object *obj, void *event_info)
-{
-    //BROWSER_LOGD("[%s:%d] %d", __PRETTY_FUNCTION__, __LINE__, reinterpret_cast<int>(obj));
-    if(ButtonBar::m_tooltipHideTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
-        ButtonBar::m_tooltipHideTimer = NULL;
-    }
-    if(ButtonBar::m_tooltipShowTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
-        ButtonBar::m_tooltipShowTimer = NULL;
-    }
-    ButtonBar::m_tooltipHideTimer = ecore_timer_add(ButtonBar::tooltipHideTimeout, ButtonBar::__cb_tooltip_hide_timeout, obj);
-    //emulate native behaviour
-    //tooltip works better with some delay
-    ButtonBar::m_tooltipShowTimer = ecore_timer_add(elm_config_tooltip_delay_get(), ButtonBar::__cb_tooltip_show_delay, obj);
-}
-
-void ButtonBar::__cb_focus_out(void *data, Evas_Object *obj, void *event_info)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    if(ButtonBar::m_tooltipHideTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
-        ButtonBar::m_tooltipHideTimer = NULL;
-    }
-    if(ButtonBar::m_tooltipShowTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
-        ButtonBar::m_tooltipShowTimer = NULL;
-    }
-     elm_object_tooltip_hide(obj);
-}
-
-void ButtonBar::__cb_mouse_in(void * /*data*/, Evas */*e*/, Evas_Object *obj, void */*event_info*/)
-{
-    //BROWSER_LOGD("[%s:%d] %d", __PRETTY_FUNCTION__, __LINE__, reinterpret_cast<int>(obj));
-    elm_object_focus_set(obj, EINA_TRUE);
-}
-
-void ButtonBar::__cb_mouse_out(void */*data*/, Evas */*e*/, Evas_Object *obj, void */*event_info*/)
-{
-    elm_object_focus_set(obj, EINA_FALSE);
-}
-
-Eina_Bool ButtonBar::__cb_tooltip_hide_timeout(void * data)
-{
-    Evas_Object * button = static_cast<Evas_Object *> (data);
-
-    if(ButtonBar::m_tooltipHideTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
-        ButtonBar::m_tooltipHideTimer = NULL;
-    }
-
-    elm_object_tooltip_hide(button);
-    return ECORE_CALLBACK_CANCEL;
-}
-
-Eina_Bool ButtonBar::__cb_tooltip_show_delay(void * data)
-{
-    Evas_Object * button = static_cast<Evas_Object *> (data);
-
-    if(ButtonBar::m_tooltipShowTimer) {
-        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
-        ButtonBar::m_tooltipShowTimer = NULL;
-    }
-
-    elm_object_tooltip_show(button);
-    return ECORE_CALLBACK_CANCEL;
-}
-
-}
-}
diff --git a/services/SimpleUI/ButtonBar.h b/services/SimpleUI/ButtonBar.h
deleted file mode 100644 (file)
index 9362647..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BUTTONBAR_H
-#define BUTTONBAR_H
-
-#include <Evas.h>
-#include <list>
-
-#include "Action.h"
-#include "EAction.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-class ButtonBar
-{
-public:
-
-    struct ActionButton
-    {
-        Evas_Object *button;
-        std::shared_ptr<EAction> eAction;
-    };
-
-    ButtonBar(Evas_Object *parent, const std::string &edjFile, const std::string &groupName);
-    ~ButtonBar();
-    void addAction(sharedAction action, const std::string &buttonName);
-    void setActionForButton(const std::string &buttonName, sharedAction newAction);
-    /**
-     * @brief register callback, used internally by addAction,
-     *        should be called externally for all actions that will be assigned to button
-     * @param action - action that will be used with buttonName
-     * @param buttonName - name of button used in ButtonBar
-     */
-    void registerEnabledChangedCallback(sharedAction action, const std::string &buttonName);
-
-    Evas_Object* getContent();
-    Evas_Object* getButton(const std::string &buttonName);
-    void clearFocus();
-    void setDisabled(bool disabled);
-
-private:
-    //map button name to current action assigned to button
-    std::map<std::string, sharedAction> m_actionsMap;
-    //map button name to struct ActionButton which contains Evas_Object of button
-    std::map<std::string, ActionButton> m_buttonsMap;
-    Evas_Object *m_layout;
-    void refreshButton(const std::string &buttonName);
-    void onEnabledChanged(const std::string &buttonName, sharedAction action);
-    static Ecore_Timer *m_tooltipHideTimer;
-    static Ecore_Timer *m_tooltipShowTimer;
-
-    static double tooltipHideTimeout;
-    static double tooltipShowDelay;
-
-    static void __cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
-    static void __cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
-    static void __cb_focus_in(void *data, Evas_Object *obj, void *event_info);
-    static void __cb_focus_out(void *data, Evas_Object *obj, void *event_info);
-    static Eina_Bool __cb_tooltip_hide_timeout(void * data);
-    static Eina_Bool __cb_tooltip_show_delay(void * data);
-
-};
-
-}
-
-}
-
-#endif // BUTTONBAR_H
index 4c77390b64c3bd76cef6781eab0e18d398225ecf..9771495146fb3efca32d1ef25bbfbb560ed5aeeb 100644 (file)
@@ -2,7 +2,6 @@ project(SimpleUI)
 
 set(SimpleUI_SRCS
     SimpleUI.cpp
-    ButtonBar.cpp
     SimplePopup.cpp
     BookmarksManager.cpp
     ViewManager.cpp
@@ -10,7 +9,6 @@ set(SimpleUI_SRCS
 
 set(SimpleUI_HEADERS
     SimpleUI.h
-    ButtonBar.h
     SimplePopup.h
     BookmarksManager.h
     ViewManager.h
@@ -23,7 +21,7 @@ include(EWebKitHelpers)
 include_directories(${CMAKE_BINARY_DIR})
 include_directories(${CMAKE_SOURCE_DIR})
 include_directories(${CMAKE_SOURCE_DIR}/services)
-include_directories(${CMAKE_SOURCE_DIR}/services/SimpleURI)
+include_directories(${CMAKE_SOURCE_DIR}/services/WebPageUI)
 include_directories(${CMAKE_SOURCE_DIR}/services/WebEngineService)
 include_directories(${CMAKE_SOURCE_DIR}/services/WebEngineService/src)
 include_directories(${CMAKE_SOURCE_DIR}/services/StorageService)
@@ -45,7 +43,7 @@ pkg_check_modules(capi_net QUIET capi-network-connection)
 
 add_library(${PROJECT_NAME} SHARED ${SimpleUI_SRCS})
 
-add_dependencies(${PROJECT_NAME} SimpleURI)
+add_dependencies(${PROJECT_NAME} WebPageUI)
 add_dependencies(${PROJECT_NAME} StorageService)
 add_dependencies(${PROJECT_NAME} HistoryService)
 add_dependencies(${PROJECT_NAME} MoreMenuUI)
@@ -56,7 +54,7 @@ add_dependencies(${PROJECT_NAME} TabUI)
 add_dependencies(${PROJECT_NAME} SettingsUI)
 add_dependencies(${PROJECT_NAME} PlatformInputManager)
 add_dependencies(${PROJECT_NAME} SessionStorage)
-target_link_libraries(${PROJECT_NAME} SimpleURI)
+target_link_libraries(${PROJECT_NAME} WebPageUI)
 target_link_libraries(${PROJECT_NAME} StorageService)
 target_link_libraries(${PROJECT_NAME} HistoryService)
 target_link_libraries(${PROJECT_NAME} MoreMenuUI)
@@ -81,13 +79,8 @@ include(EDCCompile)
 
 #please do not add edc/ directory
 set(edcFiles
-    MainLayout.edc
-    LeftButtonBar.edc
-    RightButtonBar.edc
     AuthenticationPopup.edc
     BookmarksManager.edc
-    ScrollerDefault.edc
-    ErrorMessage.edc
     Tooltip.edc
     )
 
index 9ee8eaec663090ab3b5d13c797ca7bdb771c2124..dee412fb5eb04922615b4afd5483d27881516920 100644 (file)
@@ -20,7 +20,6 @@
 #include <ewk_chromium.h>
 #endif
 
-#include <boost/format.hpp>
 #include <boost/any.hpp>
 #include <memory>
 #include <algorithm>
@@ -37,7 +36,6 @@
 #include "TabId.h"
 #include "Tools/EflTools.h"
 #include "BrowserImage.h"
-#include "SimpleURI.h"
 #include "SimpleUI.h"
 #include "BookmarkItem.h"
 #include "Tools/EflTools.h"
@@ -60,15 +58,12 @@ const int ROOT_FOLDER = 0;
 
 SimpleUI::SimpleUI()
     : AbstractMainWindow()
-    , m_mainLayout(nullptr)
-    , m_progressBar(nullptr)
     , m_popup(nullptr)
     , m_moreMenuUI()
     , m_tabUI()
     , m_bookmarkManagerUI()
     , m_mainUI()
     , m_initialised(false)
-    , m_isHomePageActive(false)
     , items_vector()
     , m_networkErrorPopup(0)
     , m_wvIMEStatus(false)
@@ -147,29 +142,23 @@ int SimpleUI::exec(const std::string& _url)
             //set global show tooltip timeout
             elm_config_tooltip_delay_set( boost::any_cast <double> (config.get("TOOLTIP_DELAY")));
 
-            loadThemes();
-
             loadUIServices();
             loadModelServices();
             createActions();
 
-            // create view layouts
-            m_mainLayout = createWebLayout(m_window.get());
-            elm_win_resize_object_add(m_window.get(), m_mainLayout);
-
-            m_errorLayout = createErrorLayout(m_window.get());
-
-            //this needs to be called after UI is estabilished
+            // initModelServices() needs to be called after initUIServices()
+            initUIServices();
             initModelServices();
 
+            // create view layouts
+            elm_win_resize_object_add(m_window.get(), m_webPageUI->getContent());
+
             connectModelSignals();
             connectUISignals();
             connectActions();
 
-            elm_layout_signal_callback_add(m_simpleURI->getContent(), "slide_websearch", "elm", SimpleUI::favicon_clicked, this);
-
             // show main layout and window
-            evas_object_show(m_mainLayout);
+            evas_object_show(m_webPageUI->getContent());
             evas_object_show(m_window.get());
         }
         m_initialised = true;
@@ -180,63 +169,17 @@ int SimpleUI::exec(const std::string& _url)
     if (url.empty())
     {
         BROWSER_LOGD("[%s]: changing to homeUrl", __func__);
-        switchViewToHomePage();
+        switchViewToQuickAccess();
         restoreLastSession();
+    } else {
+        openNewTab(url);
     }
-     else
-         openNewTab(url);
-    m_simpleURI->setFocus();
+    m_webPageUI->getURIEntry().setFocus();
 
     BROWSER_LOGD("[%s]:%d url=%s", __func__, __LINE__, url.c_str());
     return 0;
 }
 
-Evas_Object* SimpleUI::createWebLayout(Evas_Object* parent)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    // create web layout
-    Evas_Object* web_layout = elm_layout_add(parent);
-    evas_object_size_hint_weight_set(web_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-    elm_layout_file_set(web_layout, edjePath("SimpleUI/MainLayout.edj").c_str(), "main_layout");
-
-    // left buttons
-    leftButtonBar = std::make_shared<ButtonBar>(web_layout, "SimpleUI/LeftButtonBar.edj", "left_button_bar");
-    leftButtonBar->addAction(m_back, "prev_button");
-    leftButtonBar->addAction(m_forward, "next_button");
-    leftButtonBar->addAction(m_reload, "refresh_stop_button");
-
-    //register action that will be used later by buttons"
-    leftButtonBar->registerEnabledChangedCallback(m_stopLoading, "refresh_stop_button");
-
-    // right buttons
-    rightButtonBar = std::make_shared<ButtonBar>(web_layout, "SimpleUI/RightButtonBar.edj", "right_button_bar");
-    rightButtonBar->addAction(m_tab, "tab_button");
-    rightButtonBar->addAction(m_showMoreMenu, "setting_button");
-
-    // progress bar
-    m_progressBar = elm_progressbar_add(web_layout);
-    elm_object_style_set(m_progressBar,"play_buffer");
-
-    //URL bar (Evas Object is shipped by SimpleURI object)
-    elm_object_part_content_set(web_layout, "uri_entry", m_simpleURI->getContent(web_layout));
-    elm_object_part_content_set(web_layout, "uri_bar_buttons_left", leftButtonBar->getContent());
-    elm_object_part_content_set(web_layout, "uri_bar_buttons_right", rightButtonBar->getContent());
-
-    return web_layout;
-}
-
-Evas_Object* SimpleUI::createErrorLayout(Evas_Object* parent)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    Evas_Object* errorLayout =  elm_layout_add(parent);
-    evas_object_size_hint_weight_set(errorLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-    elm_layout_file_set(errorLayout, edjePath("SimpleUI/ErrorMessage.edj").c_str(), "error_message");
-
-    return errorLayout;
-}
-
 void SimpleUI::restoreLastSession()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -258,10 +201,10 @@ void SimpleUI::loadUIServices()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
 
-    m_simpleURI =
+    m_webPageUI =
         std::dynamic_pointer_cast
-        <tizen_browser::base_ui::SimpleURI,tizen_browser::core::AbstractService>
-        (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.simpleuri"));
+        <tizen_browser::base_ui::WebPageUI,tizen_browser::core::AbstractService>
+        (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.webpageui"));
 
     m_mainUI =
         std::dynamic_pointer_cast
@@ -273,8 +216,8 @@ void SimpleUI::connectUISignals()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
 
-    M_ASSERT(m_simpleURI.get());
-    m_simpleURI->uriChanged.connect(boost::bind(&SimpleUI::filterURL, this, _1));
+    M_ASSERT(m_webPageUI.get());
+    m_webPageUI->getURIEntry().uriChanged.connect(boost::bind(&SimpleUI::filterURL, this, _1));
 
     M_ASSERT(m_mainUI.get());
     m_mainUI->getDetailPopup().openURLInNewTab.connect(boost::bind(&SimpleUI::onOpenURLInNewTab, this, _1, _2));
@@ -314,13 +257,19 @@ void SimpleUI::loadModelServices()
         (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.sessionStorageService"));
 }
 
+void SimpleUI::initUIServices()
+{
+    m_webPageUI->init(m_window.get());
+    m_mainUI->init(m_webPageUI->getContent());
+}
+
 void SimpleUI::initModelServices()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
 
     M_ASSERT(m_webEngine);
-    M_ASSERT(m_mainLayout);
-    m_webEngine->init(m_mainLayout);
+    M_ASSERT(m_webPageUI->getContent());
+    m_webEngine->init(m_webPageUI->getContent());
 
     M_ASSERT(m_favoriteService);
     m_favoriteService->synchronizeBookmarks();
@@ -335,9 +284,9 @@ void SimpleUI::connectModelSignals()
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
 
     m_webEngine->uriChanged.connect(boost::bind(&SimpleUI::webEngineURLChanged, this, _1));
-    m_webEngine->uriChanged.connect(boost::bind(&SimpleURI::changeUri, m_simpleURI.get(), _1));
+    m_webEngine->uriChanged.connect(boost::bind(&URIEntry::changeUri, &m_webPageUI->getURIEntry(), _1));
     m_webEngine->uriOnTabChanged.connect(boost::bind(&SimpleUI::checkTabId,this,_1));
-    m_webEngine->webViewClicked.connect(boost::bind(&SimpleURI::clearFocus, m_simpleURI.get()));
+    m_webEngine->webViewClicked.connect(boost::bind(&URIEntry::clearFocus, &m_webPageUI->getURIEntry()));
     m_webEngine->backwardEnableChanged.connect(boost::bind(&SimpleUI::backEnable, this, _1));
     m_webEngine->forwardEnableChanged.connect(boost::bind(&SimpleUI::forwardEnable, this, _1));
     m_webEngine->loadStarted.connect(boost::bind(&SimpleUI::loadStarted, this));
@@ -353,56 +302,19 @@ void SimpleUI::connectModelSignals()
     m_favoriteService->bookmarkAdded.connect(boost::bind(&SimpleUI::onBookmarkAdded, this,_1));
     m_favoriteService->bookmarkDeleted.connect(boost::bind(&SimpleUI::onBookmarkRemoved, this, _1));
 
-    //m_historyService->historyEmpty.connect(boost::bind(&SimpleUI::disableHistoryButton, this, _1));
     m_historyService->historyAdded.connect(boost::bind(&SimpleUI::onHistoryAdded, this,_1));
     m_historyService->historyDeleted.connect(boost::bind(&SimpleUI::onHistoryRemoved, this,_1));
-    //TODO "clearHistoryGenlist" should be renamed to "onHistoryDeleteFinished"
-    //and "historyAllDeleted"should be renamed to historyDeleteFinished"
-    m_historyService->historyAllDeleted.connect(boost::bind(&MainUI::clearHistoryGenlist, m_mainUI.get()));
 
     m_platformInputManager->returnPressed.connect(boost::bind(&elm_exit));
     m_platformInputManager->backPressed.connect(boost::bind(&SimpleUI::onBackPressed, this));
 
 }
 
-//TODO: move it to WebUI
-void SimpleUI::loadThemes()
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    elm_theme_extension_add(nullptr, edjePath("SimpleUI/ErrorMessage.edj").c_str());
-
-    elm_theme_overlay_add(0, edjePath("SimpleUI/ScrollerDefault.edj").c_str());
-    elm_theme_overlay_add(0, edjePath("SimpleUI/Tooltip.edj").c_str());
-}
-
 void SimpleUI::createActions()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     ///\todo Add MulitStateAction. and convert m_stopLoading and m_reload actons to it?
 
-    m_back = sharedAction(new Action("Back"));
-    m_back->setToolTip("Previous");
-    m_back->setIcon("browser/toolbar_prev");
-
-    m_forward = sharedAction(new Action("Next"));
-    m_forward->setToolTip("Next");
-    m_forward->setIcon("browser/toolbar_next");
-
-    m_stopLoading = sharedAction(new Action("Stop"));
-    m_stopLoading->setToolTip("Stop");
-    m_stopLoading->setIcon("browser/toolbar_stop");
-
-    m_reload = sharedAction(new Action("Reload"));
-    m_reload->setToolTip("Reload");
-    m_reload->setIcon("browser/toolbar_reload");
-    m_tab = sharedAction(new Action("Tabs"));
-    m_tab->setToolTip("Tab page");
-    m_tab->setIcon("browser/toolbar_tab");
-
-    m_showMoreMenu = sharedAction(new Action("Settings"));
-    m_showMoreMenu->setToolTip("Settings");
-    m_showMoreMenu->setIcon("browser/toolbar_setting");
-
     m_settingPrivateBrowsing = sharedAction(new Action("Private browsing"));
     m_settingPrivateBrowsing->setToolTip("On exit from private mode all cookies, history, and stored data will be deleted");
     m_settingPrivateBrowsing->setCheckable(true);
@@ -436,48 +348,30 @@ void SimpleUI::createActions()
 
 void SimpleUI::connectActions()
 {
-    //left bar
-    m_back->triggered.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::back, m_webEngine.get()));
-    m_back->triggered.connect(boost::bind(&SimpleUI::updateBrowserView, this));
-    m_forward->triggered.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::forward, m_webEngine.get()));
-    m_stopLoading->triggered.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::stopLoading, m_webEngine.get()));
-    m_reload->triggered.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::reload, m_webEngine.get()));
-    m_reload->triggered.connect(boost::bind(&SimpleUI::updateBrowserView, this));
-
-    //right bar
-    m_tab->triggered.connect(boost::bind(&SimpleUI::showTabUI, this));
-    m_showMoreMenu->triggered.connect(boost::bind(&SimpleUI::showMoreMenu, this));
-
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     m_settingPrivateBrowsing->toggled.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, _1));
-}
 
-void SimpleUI::updateURIBarView()
-{
-       m_simpleURI->changeUri(m_webEngine->getURI());
-       leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
-       stopEnable(true);
-       reloadEnable(true);
-       hideProgressBar();
-}
+    //left bar
+    m_webPageUI->backPage.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::back, m_webEngine.get()));
+    m_webPageUI->backPage.connect(boost::bind(&SimpleUI::switchViewToWebPage, this));
+    m_webPageUI->forwardPage.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::forward, m_webEngine.get()));
+    m_webPageUI->stopLoadingPage.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::stopLoading, m_webEngine.get()));
+    m_webPageUI->reloadPage.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::reload, m_webEngine.get()));
+    m_webPageUI->reloadPage.connect(boost::bind(&SimpleUI::switchViewToWebPage, this));
 
-void SimpleUI::updateWebView()
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    evas_object_hide(elm_object_part_content_get(m_mainLayout, "web_view"));
-    elm_object_part_content_unset(m_mainLayout, "web_view");
-    elm_object_part_content_set(m_mainLayout, "web_view", m_webEngine->getLayout());
-    evas_object_show(m_webEngine->getLayout());
+    //right bar
+    m_webPageUI->showTabUI.connect(boost::bind(&SimpleUI::showTabUI, this));
+    m_webPageUI->showMoreMenu.connect(boost::bind(&SimpleUI::showMoreMenu, this));
 }
 
-void SimpleUI::updateBrowserView()
+void SimpleUI::switchViewToWebPage()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-       if(isHomePageActive())
-        hideMainUI();
-
-       updateWebView();
-
-       updateURIBarView();
+    M_ASSERT(m_webPageUI);
+    M_ASSERT(m_mainUI);
+    if(m_webPageUI->isHomePageActive())
+        m_mainUI->hide();
+    m_webPageUI->switchViewToWebPage(m_webEngine->getLayout(), m_webEngine->getURI());
 }
 
 void SimpleUI::switchToTab(const tizen_browser::basic_webengine::TabId& tabId)
@@ -493,42 +387,23 @@ void SimpleUI::switchToTab(const tizen_browser::basic_webengine::TabId& tabId)
        return;
     }
     BROWSER_LOGD("[%s:%d] swiching to web_view ", __PRETTY_FUNCTION__, __LINE__);
-    updateBrowserView();
-}
-
-bool SimpleUI::isHomePageActive()
-{
-    return m_isHomePageActive;
+    switchViewToWebPage();
 }
 
 bool SimpleUI::isErrorPageActive()
 {
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    return elm_object_part_content_get(m_mainLayout, "web_view") == m_errorLayout;
+    return m_webPageUI->isErrorPageActive();
 }
 
-void SimpleUI::switchViewToHomePage()
+void SimpleUI::switchViewToQuickAccess()
 {
-    BROWSER_LOGD("[%s:%d] isHomePageActive : %d", __PRETTY_FUNCTION__, __LINE__, m_isHomePageActive);
-    if(isHomePageActive())
-       return;
-
-    showMainUI();
-    filterURL(HomePageURL);
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if(m_webPageUI->isHomePageActive())
+        return;
 
+    m_webPageUI->switchViewToQuickAccess(m_mainUI->getContent());
     m_webEngine->disconnectCurrentWebViewSignals();
-
-    leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
-
-    stopEnable(false);
-    reloadEnable(false);
-    forwardEnable(false);
-    backEnable(false);
-    evas_object_hide(leftButtonBar->getContent());
-    elm_object_signal_emit(m_mainLayout, "shiftback_uri", "ui");
-    elm_object_signal_emit(m_simpleURI->getContent(), "shiftback_uribg", "ui");
-
-    hideProgressBar();
+    m_mainUI->showMostVisited(getMostVisitedItems());
 }
 
 void SimpleUI::checkTabId(const tizen_browser::basic_webengine::TabId& id){
@@ -560,7 +435,7 @@ void SimpleUI::closeTab(const tizen_browser::basic_webengine::TabId& id)
 
 void SimpleUI::bookmarkCheck()
 {
-    if (isHomePageActive())
+    if (m_webPageUI->isHomePageActive())
         return;
 
     if(m_favoriteService->bookmarkExists(m_webEngine->getURI())){
@@ -616,28 +491,19 @@ void SimpleUI::onClearHistoryClicked(const std::string&)
 void SimpleUI::onMostVisitedClicked(const std::string&)
 {
    BROWSER_LOGD("[%s]", __func__);
-   m_mainUI->clearHistoryGenlist();
-   m_mainUI->clearBookmarkGengrid();
-   m_mainUI->addHistoryItems(getMostVisitedItems());
-   m_mainUI->showHistory();
+   m_mainUI->showMostVisited(getMostVisitedItems());
 }
 
 void SimpleUI::onBookmarkButtonClicked(const std::string&)
 {
    BROWSER_LOGD("[%s]", __func__);
-   m_mainUI->clearBookmarkGengrid();
-   m_mainUI->clearHistoryGenlist();
-   m_mainUI->addBookmarkItems(getBookmarks());
-   m_mainUI->showBookmarks();
+   m_mainUI->showBookmarks(getBookmarks());
 }
 
 void SimpleUI::onBookmarkManagerButtonClicked(const std::string&)
 {
     BROWSER_LOGD("[%s]", __func__);
-    if(m_mainUI) {               // TODO: remove this section when naviframes will be available
-        m_mainUI->clearBookmarkGengrid();
-        m_mainUI->clearHistoryGenlist();
-    }
+    m_mainUI->hide();
 
     if(m_moreMenuUI) {               // TODO: remove this section when naviframes will be available
         m_moreMenuUI->clearItems();
@@ -696,28 +562,28 @@ void SimpleUI::setwvIMEStatus(bool status)
 void SimpleUI::onBackPressed()
 {
     BROWSER_LOGD("[%s]", __func__);
-    if (!m_simpleURI->hasFocus() && !m_wvIMEStatus && !isHomePageActive() && m_back->isEnabled())
+    if (!m_webPageUI->getURIEntry().hasFocus() && !m_wvIMEStatus && !m_webPageUI->isHomePageActive() && m_webPageUI->isBackButtonEnabled())
         m_webEngine->backButtonClicked();
 }
 
 void SimpleUI::backEnable(bool enable)
 {
-    m_back->setEnabled(enable);
+    m_webPageUI->setBackButtonEnabled(enable);
 }
 
 void SimpleUI::forwardEnable(bool enable)
 {
-    m_forward->setEnabled(enable);
+    m_webPageUI->setForwardButtonEnabled(enable);
 }
 
 void SimpleUI::reloadEnable(bool enable)
 {
-    m_reload->setEnabled(enable);
+    m_webPageUI->setReloadButtonEnabled(enable);
 }
 
 void SimpleUI::stopEnable(bool enable)
 {
-    m_stopLoading->setEnabled(enable);
+    m_webPageUI->setStopButtonEnabled(enable);
 }
 
 void SimpleUI::addBookmarkEnable(bool enable)
@@ -734,69 +600,42 @@ void SimpleUI::zoomEnable(bool enable)
 
 void SimpleUI::settingsButtonEnable(bool enable)
 {
-    m_showMoreMenu->setEnabled(enable);
+    m_webPageUI->setMoreMenuButtonEnabled(enable);
 }
 
 void SimpleUI::loadStarted()
 {
-    BROWSER_LOGD("Switching \"reload\" to \"stopLoading\".");
-    showProgressBar();
-    elm_object_signal_emit(m_simpleURI->getContent(), "shiftright_uribg", "ui");
-    elm_object_signal_emit(m_mainLayout, "shiftright_uri", "ui");
-    evas_object_show(leftButtonBar->getContent());
-    leftButtonBar->setActionForButton("refresh_stop_button", m_stopLoading);
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     addBookmarkEnable(false);
     if(!m_webEngine->isPrivateMode()){
         m_currentSession.updateItem(m_webEngine->currentTabId().toString(), m_webEngine->getURI());
     }
+    m_webPageUI->loadStarted();
 }
 
 void SimpleUI::progressChanged(double progress)
 {
-    if(progress == 1.0){
-        hideProgressBar();
-    } else {
-        elm_progressbar_value_set(m_progressBar,progress);
-    }
+    m_webPageUI->progressChanged(progress);
 }
 
 void SimpleUI::loadFinished()
 {
-    elm_object_signal_emit(m_mainLayout, "hide_progressbar_bg", "ui");
-    BROWSER_LOGD("Switching \"stopLoading\" to \"reload\".");
-
-    leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
 
     addBookmarkEnable(m_favoriteService->countBookmarksAndSubFolders() < m_favoritesLimit);
 
-    if(m_webEngine->isLoadError()){
-        loadError();
-    }
-
     if(!m_webEngine->isPrivateMode()){
         m_historyService->addHistoryItem(std::make_shared<tizen_browser::services::HistoryItem> (m_webEngine->getURI(),
                                                                                                 m_webEngine->getTitle(),
                                                                                                 m_webEngine->getFavicon()), m_webEngine->getSnapshotData(MainUI::MAX_THUMBNAIL_WIDTH, MainUI::MAX_THUMBNAIL_HEIGHT));
     }
+    m_webPageUI->loadFinished();
 }
 
 void SimpleUI::loadError()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    hideWebView();
-    elm_object_part_content_set(m_mainLayout, "web_view",m_errorLayout);
-    //evas_object_show(m_errorLayout);
-}
-
-void SimpleUI::setErrorButtons()
-{
-//  leftButtonBar->setActionForButton("bookmark_button", m_bookmark);
-    leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
-//  addBookmarkEnable(false);
-    stopEnable(false);
-    reloadEnable(true);
-    forwardEnable(false);
-    evas_object_hide(m_progressBar);
+    m_webPageUI->switchViewToErrorPage();
 }
 
 void SimpleUI::filterURL(const std::string& url)
@@ -807,7 +646,7 @@ void SimpleUI::filterURL(const std::string& url)
     //create some kind of std::man<std::string url, bool *(doSomethingWithUrl)()>
     //and then just map[url]() ? m_webEngine->setURI(url) : /*do nothing*/;;
     if(/*url.empty() ||*/ url == HomePageURL){
-        m_simpleURI->changeUri("");
+        m_webPageUI->getURIEntry().changeUri("");
     } else if (!url.empty()){
 
     //check if url is in favorites
@@ -815,19 +654,19 @@ void SimpleUI::filterURL(const std::string& url)
     //check if url is in blocked
 
     //no filtering
-        if (isHomePageActive())
+        if (m_webPageUI->isHomePageActive())
             openNewTab(url);
         else
             m_webEngine->setURI(url);
     }
-    m_simpleURI->clearFocus();
+    m_webPageUI->getURIEntry().clearFocus();
     //addBookmarkEnable(false);
 }
 
 void SimpleUI::webEngineURLChanged(const std::string url)
 {
     BROWSER_LOGD("webEngineURLChanged:%s", url.c_str());
-    m_simpleURI->clearFocus();
+    m_webPageUI->getURIEntry().clearFocus();
     bookmarkCheck();
 }
 
@@ -856,7 +695,7 @@ void SimpleUI::closeTabUI(const std::string& str)
 void SimpleUI::newTabClicked(const std::string& str)
 {
     BROWSER_LOGD("%s", __func__);
-    switchViewToHomePage();
+    switchViewToQuickAccess();
 }
 
 void SimpleUI::tabClicked(const tizen_browser::basic_webengine::TabId& tabId)
@@ -885,7 +724,7 @@ void SimpleUI::handleConfirmationRequest(basic_webengine::WebConfirmationPtr web
         {
         basic_webengine::AuthenticationConfirmationPtr auth = std::dynamic_pointer_cast<basic_webengine::AuthenticationConfirmation, basic_webengine::WebConfirmation>(webConfirmation);
 
-        Evas_Object *popup_content = elm_layout_add(m_mainLayout);
+        Evas_Object *popup_content = elm_layout_add(m_webPageUI->getContent());
         std::string edjFilePath = EDJE_DIR;
         edjFilePath.append("SimpleUI/AuthenticationPopup.edj");
         Eina_Bool layoutSetResult = elm_layout_file_set(popup_content, edjFilePath.c_str(), "authentication_popup");
@@ -961,36 +800,6 @@ void SimpleUI::authPopupButtonClicked(PopupButtons button, std::shared_ptr<Popup
     }
 }
 
-void SimpleUI::hideWebView()
-{
-    evas_object_hide(elm_object_part_content_get(m_mainLayout,"web_view"));
-    elm_object_part_content_unset(m_mainLayout, "web_view");
-}
-
-//TODO: move it to ViewController
-void SimpleUI::hideMainUI()
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    if(m_mainUI)
-        m_mainUI->hide();
-    m_mainUI = nullptr;
-    m_isHomePageActive = false;
-}
-
-void SimpleUI::showMainUI()
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    m_mainUI = std::dynamic_pointer_cast
-                <tizen_browser::base_ui::MainUI,tizen_browser::core::AbstractService>
-                (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.mainui"));
-    M_ASSERT(m_mainUI);
-    hideWebView();
-    m_mainUI->show(m_window.get());
-    m_mainUI->addHistoryItems(getMostVisitedItems());
-    m_mainUI->addBookmarkItems(getBookmarks());
-    m_isHomePageActive = true;
-}
-
 void SimpleUI::showHistoryUI(const std::string& str)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -1048,7 +857,7 @@ void SimpleUI::closeSettingsUI(const std::string& str)
 void SimpleUI::showMoreMenu()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    bool desktopMode = isHomePageActive() ? m_mainUI->isDesktopMode() : m_webEngine->isDesktopMode();
+    bool desktopMode = m_webPageUI->isHomePageActive() ? m_mainUI->isDesktopMode() : m_webEngine->isDesktopMode();
     if(!m_moreMenuUI){
         m_moreMenuUI =
                 std::dynamic_pointer_cast
@@ -1098,7 +907,7 @@ void SimpleUI::closeMoreMenu(const std::string& str)
 void SimpleUI::switchToMobileMode()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    if (!isHomePageActive()) {
+    if (!m_webPageUI->isHomePageActive()) {
         m_webEngine->switchToMobileMode();
         m_webEngine->reload();
     } else {
@@ -1109,7 +918,7 @@ void SimpleUI::switchToMobileMode()
 void SimpleUI::switchToDesktopMode()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    if (!isHomePageActive()) {
+    if (!m_webPageUI->isHomePageActive()) {
         m_webEngine->switchToDesktopMode();
         m_webEngine->reload();
     } else {
@@ -1162,18 +971,10 @@ void SimpleUI::closeBookmarkManagerMenu(const std::string& str)
     }
 
     if(m_mainUI) {
-        m_mainUI->addHistoryItems(getMostVisitedItems());
-        m_mainUI->showHistory();
+        m_mainUI->showBookmarks(getBookmarks());
     }
 }
 
-void SimpleUI::openLinkFromPopup(const std::string &uri)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    filterURL(uri);
-    hidePopup();
-}
-
 void SimpleUI::hideHistory()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -1284,21 +1085,18 @@ void SimpleUI::tabCreated()
         popup->buttonClicked.connect(boost::bind(&SimpleUI::tabLimitPopupButtonClicked, this, _1, _2));
         popup->show();
     }
-    elm_object_part_text_set(rightButtonBar->getContent(), "tabs_number", (boost::format("%1%") % tabs).str().c_str());
+    m_webPageUI->setTabsNumber(tabs);
 }
 
 void SimpleUI::updateView() {
     int tabs = m_webEngine->tabsCount();
     BROWSER_LOGD("[%s] Opened tabs: %d", __func__, tabs);
     if (tabs == 0) {
-        switchViewToHomePage();
-        elm_object_part_text_set(rightButtonBar->getContent(), "tabs_number", "");
-    } else {
-        if (!isHomePageActive()) {
-            updateBrowserView();
-        }
-        elm_object_part_text_set(rightButtonBar->getContent(), "tabs_number", (boost::format("%1%") % tabs).str().c_str());
+        switchViewToQuickAccess();
+    } else if (!m_webPageUI->isHomePageActive()) {
+        switchViewToWebPage();
     }
+    m_webPageUI->setTabsNumber(tabs);
 }
 
 void SimpleUI::tabClosed(const tizen_browser::basic_webengine::TabId& id) {
@@ -1332,35 +1130,11 @@ void SimpleUI::onNetworkConnected()
     }
 }
 
-void SimpleUI::showProgressBar()
-{
-    elm_object_signal_emit(m_mainLayout, "show_progressbar_bg", "ui");
-    elm_object_part_content_set(m_mainLayout,"progress_bar",m_progressBar);
-}
-
-void SimpleUI::hideProgressBar()
-{
-    elm_object_signal_emit(m_mainLayout, "hide_progressbar_bg", "ui");
-    elm_progressbar_value_set(m_progressBar,0.0);
-    elm_object_part_content_unset(m_mainLayout,"progress_bar");
-    evas_object_hide(m_progressBar);
-}
-
 void SimpleUI::searchWebPage(std::string &text, int flags)
 {
     m_webEngine->searchOnWebsite(text, flags);
 }
 
-void SimpleUI::favicon_clicked(void *data, Evas_Object *, const char *, const char *)
-{
-    BROWSER_LOGD("[%s],", __func__);
-    SimpleUI *self = reinterpret_cast<SimpleUI*>(data);
-    if (!self->isHomePageActive() && !self->isErrorPageActive())
-    {
-        self->m_simpleURI->clearFocus();
-    }
-}
-
 void SimpleUI::addToBookmarks(int folder_id)
 {
     BROWSER_LOGD("[%s,%d],", __func__, __LINE__);
index 9a8b7db5454025a742cef2167a8d7a87b2f0b672..5a9ff1fbd3c9f4b75a9383aa482e92bf750067b2 100644 (file)
 #include "service_macros.h"
 
 // components
+#include "WebPageUI.h"
 #include "AbstractWebEngine.h"
 #include "MoreMenuUI.h"
 #include "HistoryUI.h"
 #include "SettingsUI.h"
 #include "MainUI.h"
 #include "TabUI.h"
-#include "ButtonBar.h"
 #include "HistoryService.h"
 #include "BookmarkManagerUI.h"
-#include "SimpleURI.h"
 #include "PlatformInputManager.h"
 #include "SessionStorage.h"
 #include "SqlStorage.h"
@@ -74,13 +73,13 @@ public:
     void destroyUI();
 private:
     // setup functions
-    void loadThemes();
     void createActions();
     void connectActions();
     void loadUIServices();
     void connectUISignals();
     void loadModelServices();
     void initModelServices();
+    void initUIServices();
     void connectModelSignals();
     void restoreLastSession();
     Evas_Object* createWebLayout(Evas_Object* parent);
@@ -108,11 +107,8 @@ private:
     void bookmarkAdded();
     void bookmarkDeleted();
 
-    bool isHomePageActive();
-    void switchViewToHomePage();
-    void updateBrowserView();
-    void updateWebView();
-    void updateURIBarView();
+    void switchViewToQuickAccess();
+    void switchViewToWebPage();
     void updateView();
 
     void openNewTab(const std::string &uri, bool desktopMode = true);
@@ -150,20 +146,10 @@ private:
     void authPopupButtonClicked(PopupButtons button, std::shared_ptr<PopupData> popupData);
 
     void onActionTriggered(const Action& action);
-
-
     void setwvIMEStatus(bool status);
 
-    sharedAction m_back;
-    sharedAction m_forward;
-    sharedAction m_stopLoading;
-    sharedAction m_reload;
-    sharedAction m_bookmark;
-    sharedAction m_unbookmark;
-    sharedAction m_tab;
     sharedAction m_share;
     sharedAction m_zoom_in;
-    sharedAction m_showMoreMenu;
     sharedAction m_showBookmarkManagerUI;
     sharedAction m_settingPointerMode;
     sharedAction m_settingPrivateBrowsing;
@@ -229,18 +215,12 @@ private:
     void switchToDesktopMode();
     void showHistoryUI(const std::string& str);
     void closeHistoryUI(const std::string&);
-    void showMainUI();
-    void hideMainUI();
     void showURIBar();
     void hideURIBar();
-    void hideWebView();
     void hideSettingsMenu();
     void showSettingsUI(const std::string&);
     void closeSettingsUI(const std::string&);
 
-    void showProgressBar();
-    void hideProgressBar();
-
     void closeBookmarkManagerMenu(const std::string& str);
     void updateBookmarkManagerGenGrid(int folder_id);
     void showBookmarkManagerMenu();
@@ -263,7 +243,6 @@ private:
     void onDeleteDataButton(PopupButtons button, std::shared_ptr<PopupData> popupData);
     void onDeleteFavoriteButton(PopupButtons button, std::shared_ptr<PopupData> popupData);
     void tabLimitPopupButtonClicked(PopupButtons button, std::shared_ptr< PopupData > /*popupData*/);
-    void openLinkFromPopup(const std::string &);
     void disableHistoryButton(bool flag);
     int tabsCount();
 
@@ -278,16 +257,13 @@ private:
 
     std::string edjePath(const std::string &);
 
-    Evas_Object *m_mainLayout;
-    Evas_Object *m_progressBar;
     Evas_Object *m_popup;
     Evas_Object *m_entry;
     Evas_Object *m_errorLayout;
 
+    std::shared_ptr<WebPageUI> m_webPageUI;
     std::shared_ptr<basic_webengine::AbstractWebEngine<Evas_Object>>  m_webEngine;
-    std::shared_ptr<tizen_browser::base_ui::SimpleURI> m_simpleURI;
-    std::shared_ptr<ButtonBar> leftButtonBar;
-    std::shared_ptr<ButtonBar> rightButtonBar;
+//     std::shared_ptr<tizen_browser::base_ui::URIEntry> m_simpleURI;
     std::shared_ptr<tizen_browser::interfaces::AbstractFavoriteService> m_favoriteService;
     std::shared_ptr<tizen_browser::services::HistoryService> m_historyService;
     std::shared_ptr<tizen_browser::base_ui::MoreMenuUI> m_moreMenuUI;
@@ -301,7 +277,6 @@ private:
     tizen_browser::Session::Session m_currentSession;
     std::shared_ptr<BookmarksManager> m_bookmarks_manager;
     bool m_initialised;
-    bool m_isHomePageActive;
     int m_tabLimit;
     int m_favoritesLimit;
     bool m_wvIMEStatus;
@@ -315,8 +290,6 @@ private:
     SimplePopup* m_networkErrorPopup;
 
     void searchWebPage(std::string &text, int flags);
-    static void favicon_clicked(void *data, Evas_Object *obj, const char *emission, const char *source);
-
 };
 
 }
diff --git a/services/SimpleUI/edc/ErrorMessage.edc b/services/SimpleUI/edc/ErrorMessage.edc
deleted file mode 100644 (file)
index d644951..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-
-collections{
-    images {
-        image: "web_browsing_icon_error.png" COMP;
-    }
-    styles {
-        style { name: "mssage_style";
-            base: "font=Sans font_size=35 color=#d3d3d3 wrap=word align=0.5";
-        }
-        style { name: "mssage_hint_style";
-            base: "font=Sans font_size=24 color=#868686 wrap=word align=0.5";
-        }
-    }
-    group{ name: "error_message";
-        parts{
-            part{ name: "message_background";
-                type: RECT;
-                mouse_events: 1;
-                description{
-                    state: "default" 0.0;
-                    visible: 1;
-                    rel1.relative: 0 0;
-                    rel2.relative: 1 1;
-                    color: 42 50 64 255;
-                }
-                description{
-                    state: "visibleError" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            part{ name: "error_message_background";
-                type:RECT;
-                description{
-                    state: "default" 0.0;
-                    visible: 1;
-                    min: 1582 730;
-                    max: 1582 730;
-                    fixed: 1 1;
-                    align: 0.5 0.5;
-                    color: 30 38 50 153;
-                }
-                description{
-                    state: "visibleError" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            part{ name: "err_ico";
-                type: IMAGE;
-                description{
-                    state: "default" 0.0;
-                    visible: 1;
-                    min: 140 140;
-                    max:140 140;
-                    fixed: 1 1;
-                    align: 0.5 0;
-                    rel1{
-                        relative: 0 0;
-                        offset:0 163;
-                        to: "error_message_background";
-                    }
-                    rel2{
-                        relative: 1 1;
-                        to: "error_message_background";
-                        }
-                    image{
-                        normal: "web_browsing_icon_error.png";
-                    }
-                }
-                description{
-                    state: "visibleError" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            part{ name: "error_text";
-                type: TEXTBLOCK;
-                description{
-                    state: "default" 0.0;
-                    visible: 1;
-                    fixed: 1 1;
-                    min: 1502 96;
-                    max: 1502 96;
-                    //color: 211 211 211 255;
-                    align: 0.5 0;
-                    rel1{
-                        relative: 0 1;
-                        to_x: "error_message_background";
-                        to_y: "err_ico";
-                    }
-                    rel2{
-                        relative: 1 1;
-                        to: "error_message_background";
-                    }
-                    text{
-                        style: "mssage_style";
-                        text: "Server not found.<br/>Please check the followings:";
-                        //min: 0 0;
-                        //max: 1 1;
-                        //align: 1 0;
-                        //size: 35;
-                    }
-                }
-                description{
-                    state: "visibleError" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            part{ name: "error_hint";
-                type: TEXTBLOCK;
-                description{
-                    state: "default" 0.0;
-                    visible: 1;
-                    fixed: 1 1;
-                    min: 1502 117;
-                    max: 1502 117;
-                    color: 134 134 134 255;
-                    align: 0.5 0;
-                    rel1{
-                        relative: 0 1;
-                        to_x: "error_message_background";
-                        to_y: "error_text";
-                    }
-                    rel2{
-                        relative: 1 1;
-                        to: "error_message_background";
-                    }
-                    text{
-                        max: 0 1;
-                        style: "mssage_hint_style";
-                        text: "Check for any typing error in URL. <br/>"
-                        "Check your network settings.<br/>"
-                        "Try again later.<br/>"
-                        "Click refresh to reload.";
-                    }
-                }
-                description{
-                    state: "visibleError" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-        }//parts
-        programs{
-            program{ name: "show_error";
-                signal: "show_error";
-                source: "model";
-                action: STATE_SET "visibleError" 0.0;
-                target: "message_background";
-                target: "error_message_background";
-                target: "err_ico";
-                target: "error_text";
-                target: "error_hint";
-            }
-            program{ name: "hide_error";
-                signal: "hide_error";
-                source: "model";
-                action: STATE_SET "default" 0.0;
-                target: "message_background";
-                target: "error_message_background";
-                target: "err_ico";
-                target: "error_text";
-                target: "error_hint";
-            }
-        }//programs
-    }
-}
diff --git a/services/SimpleUI/edc/ImageButton.edc b/services/SimpleUI/edc/ImageButton.edc
deleted file mode 100644 (file)
index 6b7170d..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-#define __CONCAT1(X,Y)          X##Y
-#define __CONCAT(X,Y)           __CONCAT1(X,Y)
-
-#define FOUR_STATE_IMAGE_BUTTON(CLASS_NAME, W, H, IMG_NORMAL)       \
-    group {                                                         \
-        name: __CONCAT("elm/button/base/", CLASS_NAME);             \
-        min: W H;                                                   \
-        max: W H;                                                   \
-        data { item: "focus_highlight" "off"; }                     \
-        images {                                                    \
-            image: IMG_NORMAL COMP;                                 \
-            image: "round_rectangle_4X4.png" COMP;                  \
-        }                                                           \
-        parts {                                                     \
-            part { name: high_layer;                                \
-                scale:1;                                            \
-                type : IMAGE;                                       \
-                repeat_events: 1;                                   \
-                description {                                       \
-                    state: "default" 0.0;                           \
-                    visible: 0;                                     \
-                    color: 69 149 255 255;                          \
-                    rel1 { to: "bg"; relative: 0 0; }               \
-                    rel2 { to: "bg"; relative: 1 1; }               \
-                }                                                   \
-                description { state: "highlight" 0.0;               \
-                    inherit: "default" 0.0;                         \
-                    visible: 1;                                     \
-                    image.normal: "round_rectangle_4X4.png";        \
-                    image.border: 4 4 4 4;                          \
-                    image.border_scale: 1;                          \
-                    image.middle: 1;                                \
-                }                                                   \
-                description { state: "disabled" 0.0;                \
-                    inherit: "highlight" 0.0;                       \
-                    visible: 1;                                     \
-                    color: 69 149 255 102;                          \
-                }                                                   \
-            }                                                       \
-            part {                                                  \
-                name: "bg";                                         \
-                scale: 1;                                           \
-                type: IMAGE;                                        \
-                description { state: "default" 0.0;                 \
-                    min: W H;                                       \
-                    max: W H;                                       \
-                    fixed: 1 1;                                     \
-                    align: 0 0;                                     \
-                    image.normal: IMG_NORMAL;                       \
-                    color: 255 255 255 153;                         \
-                }                                                   \
-                description { state: "disabled" 0.0;                \
-                    inherit: "default" 0.0;                         \
-                    color: 255 255 255 51;                          \
-                }                                                   \
-                description { state: "highlight" 0.0;               \
-                    inherit: "default" 0.0;                         \
-                    color: 255 255 255 255;                         \
-                }                                                   \
-            }                                                       \
-            part { name: "over2";                                   \
-                type: RECT;                                         \
-                scale:1;                                            \
-                mouse_events: 1;                                    \
-                repeat_events: 1;                                   \
-                ignore_flags: ON_HOLD;                              \
-                description { state: "default" 0.0;                 \
-                   color: 0 0 0 0;                                  \
-                   rel1 { relative: 0 0; to: "bg"; }                \
-                   rel2 { relative: 1 1; to: "bg"; }                \
-                }                                                   \
-            }                                                       \
-            part { name: "over3";                                   \
-                scale:1;                                            \
-                type: RECT;                                         \
-                mouse_events: 1;                                    \
-                repeat_events: 1;                                   \
-                description { state: "default" 0.0;                 \
-                   color: 0 0 0 0;                                  \
-                   rel1 { relative: 0 0; to: "bg"; }                \
-                   rel2 { relative: 1 1; to: "bg"; }                \
-                }                                                   \
-            }                                                       \
-            part { name: "disabler";                                \
-                scale:1;                                            \
-                type: RECT;                                         \
-                repeat_events: 0;                                   \
-                mouse_events: 1;                                    \
-                description { state: "default" 0.0;                 \
-                    color: 0 0 0 0;                                 \
-                    visible: 0;                                     \
-                    rel1 { relative: 0 0; to: "bg"; }               \
-                    rel2 { relative: 1 1; to: "bg"; }               \
-                }                                                   \
-                description { state: "disabled" 0.0;                \
-                    inherit: "default" 0.0;                         \
-                    visible: 1;                                     \
-                }                                                   \
-            }                                                       \
-            part {                                                  \
-                name: "elm.swallow.content";                        \
-                scale:1;                                            \
-                type: SWALLOW;                                      \
-                description { state: "default" 0.0;                 \
-                    visible: 0;                                     \
-                }                                                   \
-            }                                                       \
-            part {                                                  \
-                name: "elm.swallow.text";                           \
-                scale: 1;                                           \
-                type: TEXT;                                         \
-                description { state: "default" 0.0;                 \
-                    visible: 0;                                     \
-                    text {                                          \
-                        min: 0 0;                                   \
-                    }                                               \
-                }                                                   \
-            }                                                       \
-            part {                                                  \
-                name: "elm.swallow.end";                            \
-                scale: 1;                                           \
-                type: SWALLOW;                                      \
-                description { state: "default" 0.0;                 \
-                    visible: 0;                                     \
-                }                                                   \
-            }                                                       \
-        }                                                           \
-        programs {                                                  \
-            program {                                               \
-                name: "disable";                                    \
-                signal: "elm,state,disabled";                       \
-                source: "elm";                                      \
-                action: STATE_SET "disabled" 0.0;                   \
-                target: "bg";                                       \
-                target: "disabler";                                 \
-            }                                                       \
-            program {                                               \
-                name: "enable";                                     \
-                signal: "elm,state,enabled";                        \
-                source: "elm";                                      \
-                action: STATE_SET "default" 0.0;                    \
-                target: "bg";                                       \
-                target: "disabler";                                 \
-            }                                                       \
-            program {                                               \
-                name: "mouse_down";                                 \
-                signal: "mouse,down,1";                             \
-                source: "over2";                                    \
-                script {                                            \
-                    emit("elm,action,press", "");                   \
-                }                                                   \
-            }                                                       \
-            program {                                               \
-                name: "mouse_up";                                   \
-                signal: "mouse,up,1";                               \
-                source: "over2";                                    \
-                script {                                            \
-                    emit("elm,action,unpress", "");                 \
-                }                                                   \
-            }                                                       \
-            program {                                               \
-                name: "mouse_click";                                \
-                signal: "mouse,clicked,1";                          \
-                source: "over2";                                    \
-                script {                                            \
-                    emit("elm,action,click", "");                   \
-                }                                                   \
-            }                                                       \
-            program {                                               \
-                name: "mouse_in_disabled";                          \
-                signal: "mouse,in";                                 \
-                source: "disabler";                                 \
-                action: STATE_SET "disabled" 0.0;                   \
-                target: "high_layer";                               \
-                target: "bg";                                       \
-            }                                                       \
-            program {                                               \
-                name: "mouse_out_disabled";                         \
-                signal: "mouse,out";                                \
-                source: "disabler";                                 \
-                action: STATE_SET "default" 0.0;                    \
-                target: "high_layer";                               \
-            }                                                       \
-            program {                                               \
-                name: "focused";                                    \
-                signal: "elm,action,focus";                         \
-                source: "elm";                                      \
-                action: STATE_SET "highlight" 0.0;                  \
-                target: "high_layer";                               \
-                target: "bg";                                       \
-            }                                                       \
-            program {                                               \
-                name: "unfocused";                                  \
-                signal: "elm,action,unfocus";                       \
-                source: "elm";                                      \
-                action: STATE_SET "default" 0.0;                    \
-                target: "high_layer";                               \
-                target: "bg";                                       \
-            }                                                       \
-        }                                                           \
-    }
diff --git a/services/SimpleUI/edc/LeftButtonBar.edc b/services/SimpleUI/edc/LeftButtonBar.edc
deleted file mode 100644 (file)
index 5de8ab2..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#include "ImageButton.edc"
-#include "Spacer.edc"
-
-collections {
-
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_prev", 82, 102, "btn_bar_back_nor.png")
-
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_next", 82, 102, "btn_bar_forward_nor.png")
-
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_reload", 82, 102, "btn_bar_reload_nor.png")
-
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_stop", 82, 102, "btn_bar_stop_nor.png")
-
-    group {
-        name: "left_button_bar";
-
-        parts {
-
-            part { name: "prev_button";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    min: 70 70;
-                    max: 70 70;
-                    rel1 { relative: 0.0 0.0; }
-                    rel2 { relative: 0.0 0.0; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-
-            ADD_SPACER("spacer_1", "prev_button", 10, 70)
-
-            part { name: "next_button";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    min: 70 70;
-                    max: 70 70;
-                    rel1 { relative: 1.0 0.0; to: "spacer_1"; }
-                    rel2 { relative: 0.0 0.0; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-
-            ADD_SPACER("spacer_2", "next_button", 10, 70)
-
-            part { name: "refresh_stop_button";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    min: 70 70;
-                    max: 70 70;
-                    rel1 { relative: 1.0 0.0; to: "spacer_2"; }
-                    rel2 { relative: 0.0 0.0; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-
-        }
-    }
-}
diff --git a/services/SimpleUI/edc/MainLayout.edc b/services/SimpleUI/edc/MainLayout.edc
deleted file mode 100644 (file)
index aedfdbd..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-#define URI_LENGTH 1720
-#define URI_LENGTH_SHORT 1460
-#define URI_WIDTH 82
-#include "Spacer.edc"
-#define DEBUG_RECT_OVER(over_part, r, g, b)                         \
-    part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__));   \
-                                                                    \
-scale:1;                                                            \
-        type : RECT;                                                \
-        repeat_events: 1;                                           \
-        description {                                               \
-            state: "default" 0.0;                                   \
-            visible: 1;                                             \
-            color: r g b 255;                                 \
-            rel1 { to: over_part; relative: 0 0; }                  \
-            rel2 { to: over_part; relative: 1 1; }                  \
-        }                                                           \
-    }
-collections {
-    group {
-        name: "main_layout";
-        images {
-            image: "web_shadow.png" COMP;
-        }
-        parts {
-            part { name: "uri_bar_bg";
-                type : RECT;
-                scale: 1;
-                description { state: "default" 0.0;
-                    visible: 1;
-                    fixed: 1 1;
-                    align: 0 0;
-                    min: 1920 104;
-                    max: 1920 104;
-                    color: 255 255 255 255;
-                    rel1 { relative: 0.0 0.0; }
-                    rel2 { relative: 1.0 0.0; }
-                }
-            }
-            ADD_SPACER_OVER("left_spacer", "uri_bar_bg", 7, 104)
-            part { name: "uri_bar_buttons_left";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0 0.5;
-                    min: 246 102;
-                    max: 246 102;
-                    fixed: 1 1;
-                    rel1 { relative: 1.0 1.0; to: "left_spacer"; }
-                    rel2 { relative: 0.0 0.0; to: "left_spacer"; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            ADD_SPACER("left_buttons_spacer", "uri_bar_buttons_left", 0.5, 102)
-            part { name: "uri_entry";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.5;
-                    min: URI_LENGTH URI_WIDTH;
-                    max: URI_LENGTH URI_WIDTH;
-                    fixed: 1 1;
-                    rel1 { relative: 1.0 0.5; to: "left_spacer"; }
-                    rel2 { relative: 1.0 0.5; to: "left_spacer"; }
-                }
-                description {
-                    state: "moveright" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                    min: URI_LENGTH_SHORT URI_WIDTH;
-                    max: URI_LENGTH_SHORT URI_WIDTH;
-                    rel1 { relative: 1.0 0.5; to: "left_buttons_spacer"; }
-                    rel2 { relative: 1.0 0.5; to: "left_buttons_spacer"; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            ADD_SPACER("right_buttons_spacer", "uri_entry", 26, 102)
-            part { name: "uri_bar_buttons_right";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.5;
-                    min: 164 102;
-                    max: 164 102;
-                    fixed: 1 1;
-                    rel1 { relative: 1.0 0.5; to: "right_buttons_spacer"; }
-                    rel2 { relative: 1.0 0.5; to: "right_buttons_spacer"; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            ADD_SPACER("right_spacer", "uri_bar_buttons_right", 74, 102)
-            part { name: "web_view";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    fixed: 0 0;
-                    rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; }
-                    rel2 { relative: 1.0 1.0; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-             }
-             part { name: "shadow";
-                type: IMAGE;
-                scale: 1;
-                repeat_events: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    fixed: 0 0;
-                    min: 1920 14;
-                    max: 1920 14;
-                    image.normal: "web_shadow.png";
-                    rel1 { relative: 0.0 0.0; to: "web_view"; }
-                    rel2 { relative: 1.0 1.0; }
-                }
-             }
-             part { name: "progress_bar";
-                type: SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    fixed: 0 0;
-                    min: 1920 2;
-                    max: 1920 2;
-                    rel1 {
-                        relative: 0.0 0.0;
-                        offset: -12 -10;
-                        to: "web_view";
-                       }
-                    rel2 { relative: 1.0 1.0; }
-                }
-             }
-             part { name: "progress_bar_light_bg";
-                 type: RECT;
-                 repeat_events: 1;
-                 description { state: "default" 0.0;
-                     fixed: 1 1;
-                     min: 0 8;
-                     max: 1920 8;
-                     align: 0 0;
-                     visible: 0;
-                     rel1.to: "web_view";
-                     rel1.relative: 0.0 0.0;
-                     rel2.relative: 1.0 0.0;
-                     color: 69 143 255 55;
-                }
-                description {state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-             }
-             part{ name: "web_title_bar";
-                type: SWALLOW;
-                scale: 1;
-                description { state: "default" 0.0;
-                    min: 1920 87;
-                    max: 1920 87;
-                    fixed: 1 1;
-                    align: 0 1;
-                    rel1 { to: "web_view"; relative: 0.0 1.0; }
-                    rel2 { to: "web_view"; relative: 1.0 1.0; }
-                }
-            }
-
-
-    part {name: "popup_bg";
-        type: RECT;
-        scale: 1;
-        mouse_events: 1;
-        description {state: "default" 0.0;
-        visible: 0;
-        min: 1920 1080;
-        fixed: 1 1;
-        color: 100 100 100 128;
-        rel1 {relative: 0.0 0.0; }
-                rel2 {relative: 1.0 1.0; }
-        }
-        description {state: "visible" 0.0;
-        inherit: "default" 0.0;
-        visible: 1;
-    }
-         part { name: "popup";
-             type: SWALLOW;
-             scale: 1;
-             description { state: "default" 0.0;
-                 visible: 0;
-                 min: 0 0;
-                 max: 700 800;
-                 align: 0.5 0.5;
-                 rel1 { relative: 0.0 0.0; to: "web_view";}
-                 rel2 { relative: 1.0 1.0; to: "web_view";}
-                 fixed: 1 1;
-             }
-             description { state: "visible" 0.0;
-                 inherit: "default" 0.0;
-                 visible: 1;
-                 max: 1920 1080;
-             }
-         }
-    }
-}
-    programs {
-    program { name: "shiftright_uribar";
-        signal: "shiftright_uri";
-        source: "ui";
-        action: STATE_SET "moveright" 0.0;
-        target: "uri_entry";
-    }
-    program { name: "shiftback_uribar";
-        signal: "shiftback_uri";
-        source: "ui";
-        action: STATE_SET "default" 0.0;
-        target: "uri_entry";
-    }
-    program { name: "hide_progress";
-        signal: "hide_progressbar_bg";
-        source: "ui";
-        action: STATE_SET "default" 0.0;
-        target: "progress_bar_light_bg";
-    }
-    program { name: "show_progress";
-        signal: "show_progressbar_bg";
-        source: "ui";
-        action: STATE_SET "visible" 0.0;
-        target: "progress_bar_light_bg";
-    }
-    program {name: "show_popup";
-    signal: "elm,state,show"; source: "elm";
-    action: STATE_SET "visible" 0.0;
-    transition: LINEAR 0.0;
-    target: "popup";
-    target: "popup_bg";
-        }
-    program {name: "hide_popup";
-    signal: "elm,state,hide"; source: "elm";
-    action: STATE_SET "default" 0.0;
-    transition: LINEAR 0.0;
-    target: "popup";
-    target: "popup_bg";
-        }
-    }
-}
-}
diff --git a/services/SimpleUI/edc/RightButtonBar.edc b/services/SimpleUI/edc/RightButtonBar.edc
deleted file mode 100644 (file)
index 164289e..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "ImageButton.edc"
-#include "Spacer.edc"
-collections {
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_tab", 82, 102, "btn_bar_manager_nor.png")
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_setting", 82, 102, "btn_bar_more_nor.png")
-    group {
-        name: "right_button_bar";
-        parts {
-            part { name: "tab_button";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    fixed: 1 1;
-                    align: 0.0 0.0;
-                    min: 70 70;
-                    max: 70 70;
-                    rel1 { relative: 0.0 0.0; }
-                    rel2 { relative: 0.0 0.0; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-            part { name: "tabs_number";
-                type: TEXT;
-                scale: 1;
-                repeat_events: 1;
-                description{
-                    state: "default" 0.0;
-                    visible: 1;
-                    fixed: 1 1;
-                    align: 0.0 0.0;
-                    min: 70 70;
-                    max: 70 70;
-                    color: 86 86 86 255;
-                    rel1 { relative: 0.0 0.0; to: "tab_button"; offset: 5 13; }
-                    rel2 { relative: 1.0 1.0; to: "tab_button"; }
-                    text {
-                        text: "";
-                        font: "Tizen:style=Bold";
-                        size: 19;
-                        align: 0.5 0.5;
-                    }
-                }
-            }
-            ADD_SPACER("spacer_1", "tab_button", 10, 70)
-            part { name: "setting_button";
-                type : SWALLOW;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    fixed: 1 1;
-                    align: 0.0 0.0;
-                    min: 70 70;
-                    max: 70 70;
-                    fixed: 1 1;
-                    rel1 { relative: 1.0 0.0; to: "spacer_1"; }
-                    rel2 { relative: 0.0 0.0; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-            }
-        }
-    }
-}
diff --git a/services/SimpleUI/edc/ScrollerDefault.edc b/services/SimpleUI/edc/ScrollerDefault.edc
deleted file mode 100644 (file)
index 472b8fb..0000000
+++ /dev/null
@@ -1,502 +0,0 @@
-collections {
-group { name: "elm/scroller/base/default";
-
-   alias: "elm/list/base/default";
-   alias: "elm/genlist/base/default";
-   alias: "elm/gengrid/base/default";
-   alias: "elm/scroller/base/map_bubble";
-   alias: "elm/genscroller/base/default";
-
-   data {
-      item: "focus_highlight" "on";
-   }
-
-   script {
-      public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
-      public timer0(val) {
-         new v;
-         v = get_int(sbvis_v);
-         if (v) {
-            v = get_int(sbalways_v);
-            if (!v) {
-               emit("do-hide-vbar", "");
-               set_int(sbvis_v, 0);
-            }
-         }
-         v = get_int(sbvis_h);
-         if (v) {
-            v = get_int(sbalways_h);
-            if (!v) {
-               emit("do-hide-hbar", "");
-               set_int(sbvis_h, 0);
-            }
-         }
-         set_int(sbvis_timer, 0);
-         return 0;
-      }
-   }
-   images {
-      image: "bt_sm_base2.png" COMP;
-      image: "scrollbar_vertical.png" COMP;
-      image: "bt_sm_shine.png" COMP;
-      image: "bt_sm_hilight.png" COMP;
-      image: "web_shadow.png" COMP;
-      image: "web_shadow_from_bottom.png" COMP;
-   }
-   parts {
-      part { name: "bg";
-         type: RECT;
-         description { state: "default" 0.0;
-            color: 255 255 255 0;
-         }
-      }
-      part { name: "clipper";
-         type: RECT;
-         mouse_events: 0;
-         description { state: "default" 0.0;
-            rel1.to: "bg";
-            rel2.to: "bg";
-         }
-      }
-      part { name: "elm.swallow.content";
-         clip_to: "clipper";
-         type: SWALLOW;
-         mouse_events: 1;
-         repeat_events: 1;
-         description { state: "default" 0.0;
-            rel1.to: "bg";
-            rel2.to: "bg";
-         }
-      }
-      part { name: "shadow_top";
-                type: IMAGE;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 0;
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    min: 0 63;
-                    max: -1 63;
-                    image.normal: "web_shadow.png";
-                    rel1 { relative: 0.0 0.0; to: "elm.swallow.content"; }
-                    rel2 { relative: 1.0 0.0; to: "elm.swallow.content"; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-             }
-             part { name: "shadow_bottom";
-                type: IMAGE;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 0;
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    min: 0 63;
-                    max: -1 63;
-                    image.normal: "web_shadow_from_bottom.png";
-                    rel1 { relative: 0.0 1.0; to: "elm.swallow.content"; offset: 0 -63; }
-                    rel2 { relative: 1.0 1.0; to: "elm.swallow.content"; offset: 0 -63; }
-                }
-                description {
-                    state: "hidden" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 0;
-                }
-                description {
-                    state: "visible" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                }
-             }
-      part { name: "sb_vbar_clip_master";
-         type: RECT;
-         mouse_events: 0;
-         description { state: "default" 0.0;
-         }
-         description { state: "hidden" 0.0;
-            visible: 0;
-            color: 255 255 255 0;
-         }
-      }
-      part { name: "sb_vbar_clip";
-         clip_to: "sb_vbar_clip_master";
-         type: RECT;
-         mouse_events: 0;
-         description { state: "default" 0.0;
-         }
-         description { state: "hidden" 0.0;
-            visible: 0;
-            color: 255 255 255 0;
-         }
-      }
-      part { name: "sb_vbar";
-         type: RECT;
-         mouse_events: 0;
-         description { state: "default" 0.0;
-            fixed: 1 1;
-            visible: 0;
-            min: 10 17;
-            align: 1.0 0.0;
-            rel1 {
-               relative: 1.0 0.0;
-               offset:   -70 2;
-               to_y:     "elm.swallow.content";
-               to_x:     "elm.swallow.content";
-            }
-            rel2 {
-               relative: 1.0 0.0;
-               offset:   -70 -1;
-               to_y:     "sb_hbar";
-               to_x:     "elm.swallow.content";
-            }
-         }
-      }
-      part { name: "elm.dragable.vbar";
-         clip_to: "sb_vbar_clip";
-         mouse_events: 0;
-         dragable {
-            x: 0 0 0;
-            y: 1 1 0;
-            confine: "sb_vbar";
-         }
-         description { state: "default" 0.0;
-            fixed: 1 1;
-            min: 8 45;
-            max: 10 99999;
-            rel1 {
-               relative: 0.5  0.5;
-               offset:   0    0;
-               to: "sb_vbar";
-            }
-            rel2 {
-               relative: 0.5  0.5;
-               offset:   0    0;
-               to: "sb_vbar";
-            }
-            image {
-               normal: "scrollbar_vertical.png";
-               //border: 6 6 6 6;
-               border: 0 0 4 4;
-               middle: SOLID;
-            }
-            image.border_scale: 1;
-            color: 0 0 0 191;
-         }
-      }
-      part { name: "sb_hbar_clip_master";
-         type: RECT;
-         mouse_events: 0;
-         description { state: "default" 0.0;
-         }
-         description { state: "hidden" 0.0;
-            visible: 0;
-            color: 255 255 255 0;
-         }
-      }
-      part { name: "sb_hbar_clip";
-         clip_to: "sb_hbar_clip_master";
-         type: RECT;
-         mouse_events: 0;
-         description { state: "default" 0.0;
-         }
-         description { state: "hidden" 0.0;
-            visible: 0;
-            color: 255 255 255 0;
-         }
-      }
-      part { name: "sb_hbar";
-         type: RECT;
-         mouse_events: 0;
-         description { state: "default" 0.0;
-            fixed: 1 1;
-            visible: 0;
-            min: 17 10;
-            align: 0.0 1.0;
-            rel1 {
-               relative: 0.0 1.0;
-               offset:   2 0;
-               to_x:     "elm.swallow.content";
-               to_y:     "elm.swallow.content";
-            }
-            rel2 {
-               relative: 0.0 1.0;
-               offset:   -1 -1;
-               to_x:     "sb_vbar";
-               to_y:     "elm.swallow.content";
-            }
-         }
-      }
-      part { name: "elm.dragable.hbar";
-         clip_to: "sb_hbar_clip";
-         mouse_events: 0;
-         dragable {
-            x: 1 1 0;
-            y: 0 0 0;
-            confine: "sb_hbar";
-         }
-         description { state: "default" 0.0;
-            fixed: 1 1;
-            min: 17 10;
-            max: 99999 10;
-            rel1 {
-               relative: 0.5  0.5;
-               offset:   0    0;
-               to: "sb_hbar";
-            }
-            rel2 {
-               relative: 0.5  0.5;
-               offset:   0    0;
-               to: "sb_hbar";
-            }
-            image {
-               normal: "bt_sm_base2.png";
-               border: 4 4 4 4;
-               middle: SOLID;
-            }
-         }
-      }
-      part { name: "sb_hbar_over1";
-         clip_to: "sb_hbar_clip";
-         mouse_events: 0;
-         description { state: "default" 0.0;
-            rel1.to: "elm.dragable.hbar";
-            rel2.relative: 1.0 0.5;
-            rel2.to: "elm.dragable.hbar";
-            image {
-               normal: "bt_sm_hilight.png";
-               border: 4 4 4 0;
-            }
-         }
-      }
-      part { name: "sb_hbar_over2";
-         clip_to: "sb_hbar_clip";
-         mouse_events: 0;
-         description { state: "default" 0.0;
-            rel1.to: "elm.dragable.hbar";
-            rel2.to: "elm.dragable.hbar";
-            image {
-               normal: "bt_sm_shine.png";
-               border: 4 4 4 0;
-            }
-         }
-      }
-      part { name: "disabler";
-         type: RECT;
-         description { state: "default" 0.0;
-            rel1.to: "clipper";
-            rel2.to: "clipper";
-            color: 0 0 0 0;
-            visible: 0;
-         }
-         description { state: "disabled" 0.0;
-            inherit: "default" 0.0;
-            visible: 1;
-            color: 128 128 128 128;
-         }
-      }
-   }
-   programs {
-      program { name: "load";
-         signal: "load";
-         source: "";
-         script {
-            set_state(PART:"sb_hbar_clip", "hidden", 0.0);
-            set_state(PART:"sb_vbar_clip", "hidden", 0.0);
-            set_int(sbvis_h, 0);
-            set_int(sbvis_v, 0);
-            set_int(sbalways_v, 0);
-            set_int(sbalways_h, 0);
-            set_int(sbvis_timer, 0);
-         }
-      }
-
-      program { name: "vbar_show";
-         signal: "elm,action,show,vbar";
-         source: "elm";
-         action:  STATE_SET "default" 0.0;
-         target: "sb_vbar_clip_master";
-      }
-      program { name: "vbar_hide";
-         signal: "elm,action,hide,vbar";
-         source: "elm";
-         action:  STATE_SET "hidden" 0.0;
-         target: "sb_vbar_clip_master";
-      }
-      program { name: "vbar_show_always";
-         signal: "elm,action,show_always,vbar";
-         source: "elm";
-         script {
-            new v;
-            v = get_int(sbvis_v);
-            v |= get_int(sbalways_v);
-            if (!v) {
-               set_int(sbalways_v, 1);
-               emit("do-show-vbar", "");
-               set_int(sbvis_v, 1);
-            }
-         }
-      }
-      program { name: "vbar_show_notalways";
-         signal: "elm,action,show_notalways,vbar";
-         source: "elm";
-         script {
-            new v;
-            v = get_int(sbalways_v);
-            if (v) {
-               set_int(sbalways_v, 0);
-               v = get_int(sbvis_v);
-               if (!v) {
-                  emit("do-hide-vbar", "");
-                  set_int(sbvis_v, 0);
-               }
-            }
-         }
-      }
-      program { name: "sb_vbar_show";
-         signal: "do-show-vbar";
-         source: "";
-         action:  STATE_SET "default" 0.0;
-         transition: LINEAR 0.5;
-         target: "sb_vbar_clip";
-      }
-      program { name: "sb_vbar_hide";
-         signal: "do-hide-vbar";
-         source: "";
-         action:  STATE_SET "hidden" 0.0;
-         transition: LINEAR 0.5;
-         target: "sb_vbar_clip";
-      }
-
-      program { name: "hbar_show";
-         signal: "elm,action,show,hbar";
-         source: "elm";
-         action:  STATE_SET "default" 0.0;
-         target: "sb_hbar_clip_master";
-      }
-      program { name: "hbar_hide";
-         signal: "elm,action,hide,hbar";
-         source: "elm";
-         action:  STATE_SET "hidden" 0.0;
-         target: "sb_hbar_clip_master";
-      }
-      program { name: "hbar_show_always";
-         signal: "elm,action,show_always,hbar";
-         source: "elm";
-         script {
-            new v;
-            v = get_int(sbvis_h);
-            v |= get_int(sbalways_h);
-            if (!v) {
-               set_int(sbalways_h, 1);
-               emit("do-show-hbar", "");
-               set_int(sbvis_h, 1);
-            }
-         }
-      }
-      program { name: "hbar_show_notalways";
-         signal: "elm,action,show_notalways,hbar";
-         source: "elm";
-         script {
-            new v;
-            v = get_int(sbalways_h);
-            if (v) {
-               set_int(sbalways_h, 0);
-               v = get_int(sbvis_h);
-               if (!v) {
-                  emit("do-hide-hbar", "");
-                  set_int(sbvis_h, 0);
-               }
-            }
-         }
-      }
-      program { name: "sb_hbar_show";
-         signal: "do-show-hbar";
-         source: "";
-         action:  STATE_SET "default" 0.0;
-         transition: LINEAR 0.5;
-         target: "sb_hbar_clip";
-      }
-      program { name: "sb_hbar_hide";
-         signal: "do-hide-hbar";
-         source: "";
-         action:  STATE_SET "hidden" 0.0;
-         transition: LINEAR 0.5;
-         target: "sb_hbar_clip";
-      }
-
-      program { name: "scroll";
-         signal: "elm,action,scroll";
-         source: "elm";
-         script {
-            new v;
-            v = get_int(sbvis_v);
-            v |= get_int(sbalways_v);
-            if (!v) {
-               emit("do-show-vbar", "");
-               set_int(sbvis_v, 1);
-            }
-            v = get_int(sbvis_h);
-            v |= get_int(sbalways_h);
-            if (!v) {
-               emit("do-show-hbar", "");
-               set_int(sbvis_h, 1);
-            }
-            v = get_int(sbvis_timer);
-            if (v > 0) cancel_timer(v);
-            v = timer(4.5, "timer0", 0);
-            set_int(sbvis_timer, v);
-         }
-      }
-      program { name: "disable";
-         signal: "elm,state,disabled";
-         source: "elm";
-         action: STATE_SET "disabled" 0.0;
-         target: "disabler";
-      }
-      program { name: "enable";
-         signal: "elm,state,enabled";
-         source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "disabler";
-      }
-      program { name: "show_top_shadow";
-         signal: "show,top,shadow";
-         source: "";
-         transition: LINEAR 0.1;
-         action: STATE_SET "visible" 0.0;
-         target: "shadow_top";
-      }
-      program { name: "hide_top_shadow";
-         signal: "hide,top,shadow";
-         source: "";
-         transition: LINEAR 0.1;
-         action: STATE_SET "hidden" 0.0;
-         target: "shadow_top";
-      }
-      program { name: "show_bottom_shadow";
-         signal: "show,bottom,shadow";
-         source: "";
-         transition: LINEAR 0.1;
-         action: STATE_SET "visible" 0.0;
-         target: "shadow_bottom";
-      }
-      program { name: "hide_bottom_shadow";
-         signal: "hide,bottom,shadow";
-         source: "";
-         transition: LINEAR 0.1;
-         action: STATE_SET "hidden" 0.0;
-         target: "shadow_bottom";
-      }
-   }
-}
-}
diff --git a/services/SimpleUI/edc/Spacer.edc b/services/SimpleUI/edc/Spacer.edc
deleted file mode 100644 (file)
index a1c5d9c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#define ADD_SPACER(NAME, RELATIVE_TO, WIDTH, HEIGHT)                \
-part {  name: NAME;                                                 \
-        type: SPACER;                                               \
-        scale: 1;                                                   \
-        description {                                               \
-            state: "default" 0.0;                                   \
-            rel1 { relative: 1.0 0.0; to: RELATIVE_TO; }            \
-            rel2 { relative: 1.0 1.0; to: RELATIVE_TO; offset: WIDTH 0; }\
-            fixed: 1 1;                                             \
-            align: 0.5 0.5;                                         \
-            min: WIDTH HEIGHT;                                      \
-            max: WIDTH HEIGHT;                                      \
-            }                                                       \
-    }
-
-#define ADD_SPACER_OVER(NAME, RELATIVE_TO, WIDTH, HEIGHT)           \
-part {  name: NAME;                                                 \
-        type: SPACER;                                               \
-        scale: 1;                                                   \
-        description {                                               \
-            state: "default" 0.0;                                   \
-            rel1 { relative: 0.0 0.0; to: RELATIVE_TO; }            \
-            rel2 { relative: 1.0 1.0; to: RELATIVE_TO; }            \
-            fixed: 1 1;                                             \
-            align: 0 0;                                             \
-            min: WIDTH HEIGHT;                                      \
-            max: WIDTH HEIGHT;                                      \
-            }                                                       \
-    }
diff --git a/services/SimpleUI/edc/webview.edc b/services/SimpleUI/edc/webview.edc
deleted file mode 100644 (file)
index 0602899..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#include "ImageButton.edc"
-#include "Spacer.edc"
-collections {
-
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_history", 70, 70, "web_ico_history.png")
-FOUR_STATE_IMAGE_BUTTON("browser/toolbar_bookmark", 70, 70, "web_ico_favorite_on.png")
-
-  group {
-        name: "web_view_bar";
-        parts {
-            part { name: "most_visited_button";
-                type :RECT;
-                scale: 1;
-                description {
-                    
-                state: "default" 0.0;
-                    visible: 1;
-                    fixed :1 1;
-                    align: 0.5 0.5;
-                    min: 70 70;
-                    max: 70 70;
-
-
-
-               rel1 {
-
-                  relative: 1.0 1.0;
-
-                  offset: 150 150;
-
-               }
-
-               rel2 {
-
-                  relative: 0.9 0.8;
-
-                  offset: 150 150;
-
-               }
-}
-
-}
-       
-                   
-part { name: "visited_bookmarks";
-                type :RECT;
-                scale: 1;
-                description {
-
-                 state: "default" 0.0;
-                    visible: 1;
-
-                    align: 0.5 0.5;
-                    min: 70 70;
-                    max: 70 70;
-
-       fixed :1 1;
-
-
-                rel1 {
-
-                  relative: 1.0 1.0;
-
-                  offset: 150 150;
-
-               }
-
-               rel2 {
-
-                  relative: 0.9 0.8;
-
-                  offset: 150 150;
-
-               }
-}
-
-}
-          
-        
-
-
-
-
-
-
-  
-                
-            }
-        }
- }
diff --git a/services/SimpleUI/images/btn_bar_back_nor.png b/services/SimpleUI/images/btn_bar_back_nor.png
deleted file mode 100644 (file)
index e4e7da9..0000000
Binary files a/services/SimpleUI/images/btn_bar_back_nor.png and /dev/null differ
diff --git a/services/SimpleUI/images/btn_bar_forward_nor.png b/services/SimpleUI/images/btn_bar_forward_nor.png
deleted file mode 100644 (file)
index ef0b78d..0000000
Binary files a/services/SimpleUI/images/btn_bar_forward_nor.png and /dev/null differ
diff --git a/services/SimpleUI/images/btn_bar_manager_nor.png b/services/SimpleUI/images/btn_bar_manager_nor.png
deleted file mode 100644 (file)
index 3a96d3c..0000000
Binary files a/services/SimpleUI/images/btn_bar_manager_nor.png and /dev/null differ
diff --git a/services/SimpleUI/images/btn_bar_more_nor.png b/services/SimpleUI/images/btn_bar_more_nor.png
deleted file mode 100644 (file)
index f51cb54..0000000
Binary files a/services/SimpleUI/images/btn_bar_more_nor.png and /dev/null differ
diff --git a/services/SimpleUI/images/btn_bar_reload_nor.png b/services/SimpleUI/images/btn_bar_reload_nor.png
deleted file mode 100644 (file)
index 7f840cb..0000000
Binary files a/services/SimpleUI/images/btn_bar_reload_nor.png and /dev/null differ
diff --git a/services/SimpleUI/images/btn_bar_stop_nor.png b/services/SimpleUI/images/btn_bar_stop_nor.png
deleted file mode 100644 (file)
index c5cdc11..0000000
Binary files a/services/SimpleUI/images/btn_bar_stop_nor.png and /dev/null differ
diff --git a/services/SimpleUI/images/btn_bar_vertical_settings.png b/services/SimpleUI/images/btn_bar_vertical_settings.png
deleted file mode 100644 (file)
index 64488c3..0000000
Binary files a/services/SimpleUI/images/btn_bar_vertical_settings.png and /dev/null differ
diff --git a/services/SimpleUI/images/round_rectangle_4X4.png b/services/SimpleUI/images/round_rectangle_4X4.png
deleted file mode 100644 (file)
index 5a1f51d..0000000
Binary files a/services/SimpleUI/images/round_rectangle_4X4.png and /dev/null differ
diff --git a/services/SimpleUI/images/web_browsing_icon_error.png b/services/SimpleUI/images/web_browsing_icon_error.png
deleted file mode 100644 (file)
index 3afcd75..0000000
Binary files a/services/SimpleUI/images/web_browsing_icon_error.png and /dev/null differ
diff --git a/services/SimpleUI/images/web_shadow.png b/services/SimpleUI/images/web_shadow.png
deleted file mode 100644 (file)
index f9018b0..0000000
Binary files a/services/SimpleUI/images/web_shadow.png and /dev/null differ
diff --git a/services/SimpleURI/CMakeLists.txt b/services/SimpleURI/CMakeLists.txt
deleted file mode 100644 (file)
index 82200f8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-project(SimpleURI)
-
-set(SimpleURI_SRCS
-    SimpleURI.cpp
-    )
-
-set(SimpleURI_HEADERS
-    SimpleURI.h
-    )
-
-include(Coreheaders)
-include(EFLHelpers)
-
-add_library(${PROJECT_NAME} SHARED ${SimpleURI_SRCS})
-
-if(TIZEN_BUILD)
-    target_link_libraries(${PROJECT_NAME} ${pkgs_LDFLAGS})
-    target_link_libraries(${PROJECT_NAME} boost_regex)
-endif(TIZEN_BUILD)
-
-install(TARGETS ${PROJECT_NAME}
-            LIBRARY DESTINATION services
-            ARCHIVE DESTINATION services/static)
-
-EDJ_TARGET(URIEntry.edj
-    ${CMAKE_CURRENT_SOURCE_DIR}/edc/URIEntry.edc
-    ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/services/SimpleURI/SimpleURI.cpp b/services/SimpleURI/SimpleURI.cpp
deleted file mode 100644 (file)
index 2c5b9ba..0000000
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <Elementary.h>
-#include <Evas.h>
-#include "SimpleURI.h"
-#include "ServiceManager.h"
-#include "BrowserLogger.h"
-#include "MenuButton.h"
-#include <algorithm>
-#include <boost/regex.hpp>
-
-namespace tizen_browser{
-namespace base_ui{
-
-EXPORT_SERVICE(SimpleURI, "org.tizen.browser.simpleuri")
-
-const std::string keynameSelect = "Select";
-const std::string keynameClear = "Clear";
-const std::string keynameKP_Enter = "KP_Enter";
-const std::string keynameReturn = "Return";
-const std::string keynameEsc = "XF86Back";
-
-SimpleURI::SimpleURI()
-    : m_entry(NULL)
-    , m_favicon(0)
-    , m_entry_layout(NULL)
-    , m_entrySelectedAllFirst(false)
-{
-    std::string edjFilePath = EDJE_DIR;
-    edjFilePath.append("SimpleURI/URIEntry.edj");
-    elm_theme_extension_add(NULL, edjFilePath.c_str());
-}
-
-SimpleURI::~SimpleURI() 
-{}
-
-Evas_Object * SimpleURI::getContent(Evas_Object *main_layout) 
-{
-    if(!m_entry_layout) {
-        m_entry_layout = elm_layout_add(main_layout);
-        std::string edjFilePath = EDJE_DIR;
-        edjFilePath.append("SimpleURI/URIEntry.edj");
-        Eina_Bool layoutSetResult = elm_layout_file_set(m_entry_layout, edjFilePath.c_str(), "uri_entry_layout");
-        if(!layoutSetResult)
-            throw std::runtime_error("Layout file not found: " + edjFilePath);
-
-        m_entry = elm_entry_add(m_entry_layout);
-        elm_object_style_set(m_entry, "uri_entry");
-
-        elm_entry_single_line_set(m_entry, EINA_TRUE);
-        elm_entry_scrollable_set(m_entry, EINA_TRUE);
-        elm_entry_input_panel_layout_set(m_entry, ELM_INPUT_PANEL_LAYOUT_URL);
-
-#if PLATFORM(TIZEN)
-        elm_object_translatable_part_text_set(m_entry, "elm.guide", "Search words, web address");
-#else
-        elm_object_part_text_set(m_entry, "elm.guide", "Search words, web address");
-#endif
-
-        evas_object_smart_callback_add(m_entry, "activated", SimpleURI::activated, this);
-        evas_object_smart_callback_add(m_entry, "aborted", SimpleURI::aborted, this);
-        evas_object_smart_callback_add(m_entry, "preedit,changed", SimpleURI::preeditChange, this);
-        evas_object_smart_callback_add(m_entry, "changed,user", SimpleURI::changedUser, this);
-        evas_object_smart_callback_add(m_entry, "focused", SimpleURI::focused, this);
-        evas_object_smart_callback_add(m_entry, "unfocused", SimpleURI::unfocused, this);
-        evas_object_smart_callback_add(m_entry, "clicked", _uriEntryClicked, this);
-        evas_object_event_callback_priority_add(m_entry, EVAS_CALLBACK_KEY_DOWN, 2*EVAS_CALLBACK_PRIORITY_BEFORE, SimpleURI::fixed_entry_key_down_handler, this);
-
-        elm_object_part_content_set(m_entry_layout, "uri_entry_swallow", m_entry);
-
-        m_entryBtn = elm_button_add(m_entry_layout);
-
-        evas_object_event_callback_add(m_entryBtn, EVAS_CALLBACK_MOUSE_IN, __cb_mouse_in, this);
-        evas_object_smart_callback_add(m_entryBtn, "focused", SimpleURI::focusedBtn, this);
-        evas_object_smart_callback_add(m_entryBtn, "unfocused", SimpleURI::unfocusedBtn, this);
-
-        elm_object_style_set(m_entryBtn, "entry_btn");
-        evas_object_smart_callback_add(m_entryBtn, "clicked", _uriEntryBtnClicked, this);
-
-        elm_object_part_content_set(m_entry_layout, "uri_entry_btn", m_entryBtn);
-    }
-    return m_entry_layout;
-}
-
-void SimpleURI::changeUri(const std::string newUri)
-{
-    BROWSER_LOGD("%s: newUri=%s", __func__, newUri.c_str());
-    elm_entry_entry_set(m_entry, elm_entry_utf8_to_markup(newUri.c_str()));
-}
-
-void SimpleURI::setFavIcon(std::shared_ptr< tizen_browser::tools::BrowserImage > favicon)
-{
-    BROWSER_LOGD("[%s:%d] faviconType:%d ", __PRETTY_FUNCTION__, __LINE__, favicon->imageType);
-    if(favicon->imageType != tools::BrowserImage::ImageTypeNoImage){
-        m_favicon = tizen_browser::tools::EflTools::getEvasImage(favicon, m_entry_layout);
-        evas_object_image_fill_set(m_favicon, 0, 0, 36, 36);
-        evas_object_resize(m_favicon, 36, 36);
-        elm_object_part_content_set(m_entry_layout, "fav_icon", m_favicon);
-        setCurrentFavIcon();
-    } else {
-        setDocIcon();
-    }
-}
-
-void SimpleURI::setCurrentFavIcon()
-{
-    m_currentIconType = IconTypeFav;
-    elm_object_signal_emit(m_entry_layout, "show_favicon", "model");
-}
-
-void SimpleURI::setSearchIcon()
-{
-    m_currentIconType = IconTypeSearch;
-    elm_object_signal_emit(m_entry_layout, "set_search_icon", "model");
-}
-
-void SimpleURI::setDocIcon()
-{
-    m_currentIconType = IconTypeDoc;
-    elm_object_signal_emit(m_entry_layout, "set_doc_icon", "model");
-}
-
-SimpleURI::IconType SimpleURI::getCurrentIconTyep()
-{
-    return m_currentIconType;
-}
-
-void SimpleURI::selectWholeText()
-{
-    m_oryginalEntryText = elm_entry_markup_to_utf8(elm_entry_entry_get(m_entry));
-    if (!m_entrySelectedAllFirst && !m_oryginalEntryText.empty()) {
-        elm_entry_select_all(m_entry);
-        elm_entry_cursor_end_set(m_entry);
-        m_entrySelectedAllFirst = true;
-    }
-}
-
-void SimpleURI::_uriEntryClicked(void *data, Evas_Object * /* obj */, void * /* event_info */)
-{
-    BROWSER_LOGD("%s", __func__);
-    SimpleURI * self = static_cast<SimpleURI*>(data);
-    self->selectWholeText();
-}
-
-void SimpleURI::_uriEntryBtnClicked(void *data, Evas_Object */*obj*/, void */*event_info*/)
-{
-    SimpleURI * self = static_cast<SimpleURI*>(data);
-    elm_object_focus_set(self->m_entry, EINA_TRUE);
-    self->selectWholeText();
-
-    elm_object_signal_emit(self->m_entry_layout, "mouse,in", "over");
-}
-
-void SimpleURI::activated(void * /* data */, Evas_Object * /* obj */, void */*event_info*/)
-{
-    BROWSER_LOGD("%s", __func__);
-}
-
-void SimpleURI::aborted(void *data, Evas_Object * /* obj */, void */*event_info*/)
-{
-    BROWSER_LOGD("%s", __func__);
-    SimpleURI *self = reinterpret_cast<SimpleURI*>(data);
-    self->editingCanceled();
-}
-
-void SimpleURI::preeditChange(void * /* data */, Evas_Object * /* obj */, void */*event_info*/)
-{
-    BROWSER_LOGD("%s", __func__);
-}
-
-void SimpleURI::changedUser(void *data, Evas_Object * /* obj */, void */*event_info*/)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    SimpleURI *self = reinterpret_cast<SimpleURI*>(data);
-    std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_entry)));
-    if( (entry.find("http://")==0 )
-           || (entry.find("https://")==0)
-           || (entry.find(".") != std::string::npos)){
-        self->setDocIcon();
-    }else {//if(entry.find(" ") != std::string::npos){
-        self->setSearchIcon();
-    }
-}
-
-void SimpleURI::unfocused(void * data, Evas_Object *, void *)
-{
-    BROWSER_LOGD("%s", __func__);
-    SimpleURI * self = static_cast<SimpleURI *>(data);
-    self->m_entrySelectedAllFirst = false;
-
-    elm_object_signal_emit(self->m_entry_layout, "mouse,out", "over");
-}
-
-void SimpleURI::focused(void* data, Evas_Object* /* obj */, void* /* event_info */)
-{
-    SimpleURI * self = static_cast<SimpleURI*>(data);
-    elm_object_signal_emit(self->m_entry_layout, "mouse,in", "over");
-    BROWSER_LOGD("%s", __func__);
-}
-
-void SimpleURI::fixed_entry_key_down_handler(void* data, Evas* /*e*/, Evas_Object* /*obj*/, void* event_info)
-{
-    BROWSER_LOGD("%s", __func__);
-    Evas_Event_Key_Down *ev = static_cast<Evas_Event_Key_Down *>(event_info);
-    if (!data || !ev || !ev->keyname)
-        return;
-    SimpleURI * self = static_cast<SimpleURI*>(data);
-
-    if (keynameClear == ev->keyname) {
-        elm_entry_entry_set(self->m_entry, "");
-        return;
-    }
-    if (   keynameSelect == ev->keyname
-        || keynameReturn == ev->keyname
-        || keynameKP_Enter == ev->keyname) {
-        self->editingCompleted();
-        return;
-    }
-    if( keynameEsc == ev->keyname){
-        self->editingCanceled();
-        elm_object_focus_set(self->m_entryBtn, EINA_TRUE);
-        return;
-    }
-}
-
-void SimpleURI::editingCompleted()
-{
-    BROWSER_LOGD("%s", __func__);
-
-    char * text = elm_entry_markup_to_utf8(elm_entry_entry_get(m_entry));
-    std::string userString(text);
-    free(text);
-
-    elm_entry_input_panel_hide(m_entry);
-    uriChanged(rewriteURI(userString));
-}
-
-std::string SimpleURI::rewriteURI(const std::string& url)
-{
-    BROWSER_LOGD("%s: %s", __PRETTY_FUNCTION__, url.c_str());
-    boost::regex urlRegex(R"(^(https?|ftp)://[^\s/$.?#].[^\s]*$)");
-
-    if(!url.empty() && url != "about:blank" && url != "about:home")
-        if(boost::regex_match(url, urlRegex)) 
-            return url;
-        else if(boost::regex_match( std::string("http://") + url, urlRegex) &&  url.find(".") != std::string::npos) 
-            return std::string("http://") + url;
-        else 
-        {
-            std::string searchString("http://www.google.com/search?q=");
-            searchString += url;
-            std::replace( searchString.begin(), searchString.end(), ' ', '+');
-            BROWSER_LOGD("[%s:%d] Search string: %s", __PRETTY_FUNCTION__, __LINE__, searchString.c_str());
-            return searchString;
-        }
-
-    return url;
-}
-
-
-void SimpleURI::editingCanceled()
-{
-    BROWSER_LOGD("[%s:%d] oryinal URL: %s ", __PRETTY_FUNCTION__, __LINE__, m_oryginalEntryText.c_str());
-    if(!m_oryginalEntryText.empty()){
-        elm_entry_entry_set(m_entry, elm_entry_utf8_to_markup(m_oryginalEntryText.c_str()));
-        m_oryginalEntryText="";
-    }
-    elm_entry_input_panel_hide(m_entry);
-    setCurrentFavIcon();
-}
-
-void SimpleURI::AddAction(sharedAction action)
-{
-    m_actions.push_back(action);
-}
-
-std::list<sharedAction> SimpleURI::actions() const
-{
-    return m_actions;
-}
-
-void SimpleURI::clearFocus()
-{
-    elm_object_focus_set(m_entry, EINA_FALSE);
-}
-
-void SimpleURI::setFocus()
-{
-    elm_object_focus_set(m_entryBtn, EINA_TRUE);
-}
-
-bool SimpleURI::hasFocus() const
-{
-    return elm_object_focus_get(m_entry)==EINA_TRUE ? true : false;
-}
-
-void SimpleURI::__cb_mouse_in(void */*data*/, Evas */*e*/, Evas_Object *obj, void */*event_info*/)
-{
-    elm_object_focus_set(obj, EINA_TRUE);
-}
-
-void SimpleURI::__cb_mouse_out(void */*data*/, Evas */*e*/, Evas_Object *obj, void */*event_info*/)
-{
-    elm_object_focus_set(obj, EINA_FALSE);
-}
-
-void SimpleURI::focusedBtn(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
-    SimpleURI * self = static_cast<SimpleURI*>(data);
-    elm_object_signal_emit(self->m_entry_layout, "mouse,in", "over");
-}
-
-void SimpleURI::unfocusedBtn(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
-    SimpleURI * self = static_cast<SimpleURI*>(data);
-    elm_object_signal_emit(self->m_entry_layout, "mouse,out", "over");
-}
-
-void SimpleURI::setDisabled(bool disabled)
-{
-    if (disabled) {
-        clearFocus();
-    }
-    elm_object_disabled_set(getContent(), disabled ? EINA_TRUE : EINA_FALSE);
-}
-
-}
-}
\ No newline at end of file
diff --git a/services/SimpleURI/SimpleURI.h b/services/SimpleURI/SimpleURI.h
deleted file mode 100644 (file)
index e28abed..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SIMPLEURI_H
-#define SIMPLEURI_H
-
-#include <Evas.h>
-#include <boost/signals2/signal.hpp>
-#include "memory.h"
-
-#include "AbstractUIComponent.h"
-#include "AbstractService.h"
-#include "ServiceFactory.h"
-#include "service_macros.h"
-#include "BasicUI/Action.h"
-#include "BrowserImage.h"
-#include "EflTools.h"
-
-
-namespace tizen_browser{
-namespace base_ui{
-
-class BROWSER_EXPORT SimpleURI
-        : public tizen_browser::core::AbstractService
-{
-public:
-    enum IconType{
-        IconTypeSearch
-       ,IconTypeDoc
-       ,IconTypeFav
-    };
-    SimpleURI();
-    ~SimpleURI();
-    Evas_Object *getContent(Evas_Object *main_layout);
-    virtual std::string getName();
-
-    Evas_Object * getContent() { return m_entry_layout;};
-
-    void changeUri(const std::string);
-    boost::signals2::signal<void (const std::string &)> uriChanged;
-
-    void setFavIcon(std::shared_ptr<tizen_browser::tools::BrowserImage> favicon);
-    void setCurrentFavIcon();
-    void setSearchIcon();
-    void setDocIcon();
-    IconType getCurrentIconTyep();
-    /**
-     * \brief Adds Action to URI bar.
-     *
-     * All Actions will be displayed before URI entry.
-     */
-    void AddAction(sharedAction action);
-
-    /**
-     * \brief returns list of stored actions
-     */
-    std::list<sharedAction> actions() const;
-
-    /**
-     * \brief Sets Focus to URI entry.
-     */
-    void setFocus();
-
-    /**
-     * @brief Remove focus form URI
-     */
-    void clearFocus();
-
-    /**
-     * @brief check if URI is focused
-     */
-    bool hasFocus() const;
-
-    void setDisabled(bool disabled);
-
-private:
-    static void activated(void *data, Evas_Object *obj, void *event_info);
-    static void aborted(void *data, Evas_Object *obj, void *event_info);
-    static void preeditChange(void *data, Evas_Object *obj, void *event_info);
-    static void changedUser(void *data, Evas_Object *obj, void *event_info);
-    static void focused(void *data, Evas_Object *obj, void *event_info);
-    static void unfocused(void *data, Evas_Object *obj, void *event_info);
-    static void fixed_entry_key_down_handler(void *data, Evas *e, Evas_Object *obj, void *event_info);
-    static void _uriEntryBtnClicked(void *data, Evas_Object *obj, void *event_info);
-
-    void editingCompleted();
-    void editingCanceled();
-
-    void selectWholeText();
-
-    /**
-     * \brief Rewrites URI to support search and prefixing http:// if needed
-     */
-    std::string rewriteURI(const std::string& url);
-
-    static void _uriEntryClicked(void *data, Evas_Object *obj, void *event_info);
-
-    static void __cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
-    static void __cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
-    static void focusedBtn(void *data, Evas_Object *obj, void *event_info);
-    static void unfocusedBtn(void *data, Evas_Object *obj, void *event_info);
-
-private:
-    IconType m_currentIconType;
-    std::list<sharedAction> m_actions;
-    Evas_Object *m_entry;
-    Evas_Object *m_favicon;
-    Evas_Object *m_entry_layout;
-    Evas_Object *m_entryBtn;
-    bool m_entrySelectedAllFirst;
-    std::string m_oryginalEntryText;
-    bool m_searchTextEntered;
-};
-
-
-}
-}
-
-#endif // SIMPLEURI_H
diff --git a/services/SimpleURI/edc/URIEntry.edc b/services/SimpleURI/edc/URIEntry.edc
deleted file mode 100644 (file)
index 1ec64f6..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-#define URI_INPUTBOX_LENGTH 1720
-#define URI_INPUTBOX_LENGTH_SMALL 1460
-#define URI_INPUTBOX_WIDTH 82
-collections {
-group { name: "elm/entry/selection/browser_entry";
-    parts {
-        part { name: "bg";
-            scale:1;
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-                color: 255 255 255 255;
-            }
-        }
-    }
-}
-group { name: "elm/entry/cursor/browser_entry";
- parts {
-        part { name: "bg";
-            scale:1;
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-                color: 22 120 237 255;
-                min: 2 36;
-                max: 2 36;
-                visible: 0;
-            }
-            description {
-                state: "focused" 0.0;
-                inherit: "default" 0.0;
-                visible: 1;
-            }
-        }
-    }
-    programs {
-        program { name: "focused";
-            signal: "elm,action,focus";
-            source: "elm";
-            action: STATE_SET "focused" 0.0;
-            target: "bg";
-        }
-        program { name: "unfocused";
-            signal: "elm,action,unfocus";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "bg";
-        }
-    }
-}
-group {
-    name: "elm/entry/base-single/uri_entry";
-    styles {
-        style {
-            name: "browser-entry-uri-style-unselected";
-            base: "font=Sans:style=SVD_Medium font_size="42" wrap=none color=#969696";
-        }
-        style {
-            name: "browser-entry-uri-style-selected";
-            base: "font=Sans:style=SVD_Medium font_size="42" wrap=none color=#4088d3";
-        }
-    }
-    data {
-        item: focus_highlight "off";
-    }
-    parts {
-
-    part { name: "bg";
-            scale:1;
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-                color: 255 255 255 255;
-            }
-        }
-
-    part {
-            name: "elm.guide";
-            scale:1;
-            type: TEXTBLOCK;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-                rel1.relative: 0.0 0.0;
-                rel2.relative: 1.0 1.0;
-                align: 0.0 0.0;
-                text {
-                    style: "browser-entry-uri-style-unselected";
-                    min: 0 1;
-                }
-            }
-            description { state: "hidden" 0.0;
-                inherit: "default" 0.0;
-                visible: 0;
-            }
-        }
-            part { name: "label.text.clip";
-            scale:1;
-            type: RECT;
-            description {
-                state: "default" 0.0;
-            }
-        }
-        part {
-            name: "elm.text";
-            scale:1;
-            multiline: 0;
-            entry_mode: EDITABLE;
-            select_mode: DEFAULT;
-            cursor_mode: BEFORE;
-            type: TEXTBLOCK;
-            clip_to: "label.text.clip";
-            source: "elm/entry/selection/browser_entry";
-            source4: "elm/entry/cursor/browser_entry";
-            description { state: "default" 0.0;
-                rel1.relative: 0.0 0.0;
-                rel2.relative: 1.0 1.0;
-                align: 0.0 0.0;
-                text {
-                    style: "browser-entry-uri-style-selected";
-                    min: 0 1;
-                }
-            }
-        }
-    }
-    programs {
-        program { name: "focus";
-            signal: "load";
-            source: "";
-            action: FOCUS_SET;
-            target: "elm.text";
-        }
-        program { name: "gdisabled";
-            signal: "elm,guide,disabled";
-            source: "elm";
-            action: STATE_SET "hidden" 0.0;
-            target: "elm.guide";
-        }
-        program { name: "genabled";
-            signal: "elm,guide,enabled";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "elm.guide";
-        }
-    }
-}//group
-
-group {
-       name: "elm/button/base/entry_btn";
-       parts {
-           part {
-               name: "bg";
-               type: RECT;
-               description { state: "default" 0.0;
-                    color: 0 0 0 0;
-                   visible: 1;
-               }
-           }
-       }
-       programs {
-            program {
-                name: "mouse_click";
-                signal: "mouse,clicked,1";
-                source: "bg";
-                script {
-                    emit("elm,action,click", "");
-                }
-            }
-       }
-   }
-
-
-    group {
-        name: "uri_entry_layout";
-        parts {
-            part {
-                name: "spacer_1";
-                type: SPACER;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    rel1 { relative: 0.0 0.0; }
-                    rel2 { relative: 0.0 0.0; offset: 15 0; }
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    min: 1 102;
-                    max: 1 102;
-                }
-            }
-            part { name: "uri_entry_swallow";
-                    type : SWALLOW;
-                    scale: 1;
-                    description {
-                        state: "default" 0.0;
-                        visible: 1;
-                       color: 255 255 255 255;
-                        align: 0.0 0.0;
-                        min: URI_INPUTBOX_LENGTH URI_INPUTBOX_WIDTH;
-                        max: URI_INPUTBOX_LENGTH URI_INPUTBOX_WIDTH;
-                        fixed: 1 1;
-                        rel1 { relative: 1 0; to: "spacer_1"; }
-                        rel2 { relative: 1 1; to: "spacer_1"; }
-                    }
-                    description {
-                    state: "moveright" 0.0;
-                    inherit: "default" 0.0;
-                    visible: 1;
-                    min: URI_INPUTBOX_LENGTH_SMALL URI_INPUTBOX_WIDTH;
-                    max: URI_INPUTBOX_LENGTH_SMALL URI_INPUTBOX_WIDTH;
-                  }
-                    description {
-                        state: "hidden" 0.0;
-                        inherit: "default" 0.0;
-                        visible: 0;
-                    }
-                    description {
-                        state: "visible" 0.0;
-                        inherit: "default" 0.0;
-                        visible: 1;
-                    }
-            }
-            part { name: "over";
-                type: RECT;
-                mouse_events: 1;
-                repeat_events: 1;
-                description {
-                    state: "default" 0.0;
-                    color: 0 0 0 0;
-                    rel1 { relative: 0 0; to: "spacer_1"; }
-                    rel2 { relative: 1 1; to: "spacer_1"; }
-                }
-            }
-            part { name: "uri_entry_btn";
-               type: SWALLOW;
-               mouse_events: 1;
-               repeat_events: 1;
-               description {
-                   state: "default" 0.0;
-                    visible: 1;
-                    rel1.to: "uri_entry_swallow";
-                    rel2.to: "uri_entry_swallow";
-               }
-          }
-        }
-        programs {
-           program { name: "shiftright_uribarbg";
-               signal: "shiftright_uribg";
-               source: "ui";
-               action: STATE_SET "moveright" 0.0;
-               target: "uri_entry_swallow";
-           } 
-           program { name: "shiftback_uribarbg";
-               signal: "shiftback_uribg";
-               source: "ui";
-               action: STATE_SET "default" 0.0;
-               target: "uri_entry_swallow";
-           } 
-            program {
-                name: "mouse_in_entry";
-                source: "over";
-                signal: "mouse,in";
-                action: STATE_SET "focused" 0.0;
-                target: "spacer_1";
-            }
-            program {
-                name: "mouse_out_entry";
-                source: "over";
-                signal: "mouse,out";
-                action: STATE_SET "default" 0.0;
-                target: "spacer_1";
-            }
-        }
-    }
-}
diff --git a/services/SimpleURI/images/ico_search.png b/services/SimpleURI/images/ico_search.png
deleted file mode 100644 (file)
index 4ff6042..0000000
Binary files a/services/SimpleURI/images/ico_search.png and /dev/null differ
diff --git a/services/SimpleURI/images/ico_url.png b/services/SimpleURI/images/ico_url.png
deleted file mode 100755 (executable)
index 95eaba2..0000000
Binary files a/services/SimpleURI/images/ico_url.png and /dev/null differ
diff --git a/services/SimpleURI/images/search_searchbar_bg_foc.png b/services/SimpleURI/images/search_searchbar_bg_foc.png
deleted file mode 100644 (file)
index cb5d15f..0000000
Binary files a/services/SimpleURI/images/search_searchbar_bg_foc.png and /dev/null differ
diff --git a/services/SimpleURI/images/search_searchbar_bg_nor.png b/services/SimpleURI/images/search_searchbar_bg_nor.png
deleted file mode 100644 (file)
index ad1a285..0000000
Binary files a/services/SimpleURI/images/search_searchbar_bg_nor.png and /dev/null differ
diff --git a/services/WebPageUI/ButtonBar.cpp b/services/WebPageUI/ButtonBar.cpp
new file mode 100644 (file)
index 0000000..925202f
--- /dev/null
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include <iostream>
+#include "BrowserLogger.h"
+
+#include "Config.h"
+#include "ButtonBar.h"
+
+namespace tizen_browser {
+namespace base_ui {
+
+double ButtonBar::tooltipHideTimeout = 0.;
+double ButtonBar::tooltipShowDelay = 0.;
+Ecore_Timer* ButtonBar::m_tooltipHideTimer = NULL;
+Ecore_Timer* ButtonBar::m_tooltipShowTimer = NULL;
+
+ButtonBar::ButtonBar(Evas_Object* parent, const std::string& edjFile, const std::string& groupName)
+{
+    config::DefaultConfig config;
+    config.load("");
+    ButtonBar::tooltipHideTimeout =  boost::any_cast <double> (config.get("TOOLTIP_HIDE_TIMEOUT"));
+
+    std::string edjFilePath = EDJE_DIR;
+    edjFilePath.append(edjFile);
+    elm_theme_extension_add(NULL, edjFilePath.c_str());
+    m_layout = elm_layout_add(parent);
+    Eina_Bool layoutSetResult = elm_layout_file_set(m_layout, edjFilePath.c_str(), groupName.c_str());
+    if (!layoutSetResult)
+        throw std::runtime_error("Layout file not found: " + edjFilePath);
+    evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(m_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    evas_object_show(m_layout);
+}
+ButtonBar::~ButtonBar()
+{
+
+    if (ButtonBar::m_tooltipShowTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
+        ButtonBar::m_tooltipShowTimer = NULL;
+    }
+    if (ButtonBar::m_tooltipHideTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
+        ButtonBar::m_tooltipHideTimer = NULL;
+    }
+}
+
+void ButtonBar::addAction(sharedAction action, const std::string& buttonName)
+{
+    ActionButton actionButton;
+    std::shared_ptr<EAction> eAction = std::make_shared<EAction>(action);
+    actionButton.eAction = eAction;
+    Evas_Object* button = elm_button_add(m_layout);
+
+    evas_object_event_callback_add(button, EVAS_CALLBACK_MOUSE_IN, __cb_mouse_in, NULL);
+    evas_object_event_callback_add(button, EVAS_CALLBACK_MOUSE_OUT, __cb_mouse_out, NULL);
+    evas_object_smart_callback_add(button, "focused", __cb_focus_in, NULL);
+    evas_object_smart_callback_add(button, "unfocused", __cb_focus_out, NULL);
+
+
+    elm_object_style_set(button, action->getIcon().c_str());
+    elm_object_disabled_set(button, action->isEnabled() ? EINA_FALSE : EINA_TRUE);
+    evas_object_smart_callback_add(button, "clicked", EAction::callbackFunction, eAction.get());
+    evas_object_show(button);
+    if (action->isEnabled()) {
+        elm_object_tooltip_text_set(button, eAction->getAction()->getToolTip().c_str());
+        elm_object_tooltip_orient_set(button, ELM_TOOLTIP_ORIENT_BOTTOM);
+        elm_object_tooltip_style_set(button, "browserTip");
+    }
+
+    elm_object_part_content_set(m_layout, buttonName.c_str(), button);
+
+    actionButton.button = button;
+    m_buttonsMap[buttonName] = actionButton;
+    m_actionsMap[buttonName] = action;
+    registerEnabledChangedCallback(action, buttonName);
+}
+
+void ButtonBar::registerEnabledChangedCallback(sharedAction action, const std::string& buttonName)
+{
+    action->enabledChanged.connect(boost::bind(&ButtonBar::onEnabledChanged, this, buttonName, action));
+}
+
+void ButtonBar::onEnabledChanged(const std::string& buttonName, sharedAction action)
+{
+    // if action match action assigned to button, refresh button
+    if (m_actionsMap[buttonName] == action) {
+        refreshButton(buttonName);
+    }
+
+}
+
+void ButtonBar::setActionForButton(const std::string& buttonName, sharedAction newAction)
+{
+    ActionButton actionButton;
+    Evas_Object* button = m_buttonsMap[buttonName].button;
+    std::shared_ptr<EAction> eAction = std::make_shared<EAction>(newAction);
+
+    elm_object_style_set(button, newAction->getIcon().c_str());
+
+    evas_object_smart_callback_del(button, "clicked", EAction::callbackFunction);
+    evas_object_smart_callback_add(button, "clicked", EAction::callbackFunction, eAction.get());
+
+
+    if (elm_object_focus_get(button)) {
+        elm_object_signal_emit(button, "elm,action,focus", "elm");
+    }
+
+    m_buttonsMap[buttonName].eAction = eAction;
+    m_actionsMap[buttonName] = newAction;
+
+    refreshButton(buttonName);
+
+}
+
+void ButtonBar::refreshButton(const std::string& buttonName)
+{
+    Evas_Object* button = m_buttonsMap[buttonName].button;
+    if (m_actionsMap[buttonName]->isEnabled()) {
+        elm_object_disabled_set(button, EINA_FALSE);
+        elm_object_tooltip_text_set(button, m_actionsMap[buttonName]->getToolTip().c_str());
+        elm_object_tooltip_orient_set(button, ELM_TOOLTIP_ORIENT_BOTTOM);
+        elm_object_tooltip_style_set(button, "browserTip");
+    } else {
+        elm_object_disabled_set(button, EINA_TRUE);
+        elm_object_tooltip_unset(button);
+    }
+}
+
+Evas_Object* ButtonBar::getContent()
+{
+    return m_layout;
+}
+
+Evas_Object* ButtonBar::getButton(const std::string& buttonName)
+{
+    return m_buttonsMap[buttonName].button;
+}
+
+void ButtonBar::clearFocus()
+{
+    for (auto it = m_buttonsMap.begin(); it != m_buttonsMap.end(); it++) {
+        elm_object_focus_set((*it).second.button, EINA_FALSE);
+    }
+}
+
+void ButtonBar::setDisabled(bool disabled)
+{
+    if (disabled) {
+        clearFocus();
+    }
+    elm_object_disabled_set(getContent(), disabled ? EINA_TRUE : EINA_FALSE);
+}
+
+void ButtonBar::__cb_focus_in(void*, Evas_Object* obj, void*)
+{
+    //BROWSER_LOGD("[%s:%d] %d", __PRETTY_FUNCTION__, __LINE__, reinterpret_cast<int>(obj));
+    if (ButtonBar::m_tooltipHideTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
+        ButtonBar::m_tooltipHideTimer = NULL;
+    }
+    if (ButtonBar::m_tooltipShowTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
+        ButtonBar::m_tooltipShowTimer = NULL;
+    }
+    ButtonBar::m_tooltipHideTimer = ecore_timer_add(ButtonBar::tooltipHideTimeout, ButtonBar::__cb_tooltip_hide_timeout, obj);
+    //emulate native behaviour
+    //tooltip works better with some delay
+    ButtonBar::m_tooltipShowTimer = ecore_timer_add(elm_config_tooltip_delay_get(), ButtonBar::__cb_tooltip_show_delay, obj);
+}
+
+void ButtonBar::__cb_focus_out(void*, Evas_Object* obj, void*)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (ButtonBar::m_tooltipHideTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
+        ButtonBar::m_tooltipHideTimer = NULL;
+    }
+    if (ButtonBar::m_tooltipShowTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
+        ButtonBar::m_tooltipShowTimer = NULL;
+    }
+    elm_object_tooltip_hide(obj);
+}
+
+void ButtonBar::__cb_mouse_in(void* /*data*/, Evas* /*e*/, Evas_Object* obj, void* /*event_info*/)
+{
+    //BROWSER_LOGD("[%s:%d] %d", __PRETTY_FUNCTION__, __LINE__, reinterpret_cast<int>(obj));
+    elm_object_focus_set(obj, EINA_TRUE);
+}
+
+void ButtonBar::__cb_mouse_out(void* /*data*/, Evas* /*e*/, Evas_Object* obj, void* /*event_info*/)
+{
+    elm_object_focus_set(obj, EINA_FALSE);
+}
+
+Eina_Bool ButtonBar::__cb_tooltip_hide_timeout(void* data)
+{
+    Evas_Object* button = static_cast<Evas_Object*>(data);
+
+    if (ButtonBar::m_tooltipHideTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipHideTimer);
+        ButtonBar::m_tooltipHideTimer = NULL;
+    }
+
+    elm_object_tooltip_hide(button);
+    return ECORE_CALLBACK_CANCEL;
+}
+
+Eina_Bool ButtonBar::__cb_tooltip_show_delay(void* data)
+{
+    Evas_Object* button = static_cast<Evas_Object*>(data);
+
+    if (ButtonBar::m_tooltipShowTimer) {
+        ecore_timer_del(ButtonBar::m_tooltipShowTimer);
+        ButtonBar::m_tooltipShowTimer = NULL;
+    }
+
+    elm_object_tooltip_show(button);
+    return ECORE_CALLBACK_CANCEL;
+}
+
+}
+}
diff --git a/services/WebPageUI/ButtonBar.h b/services/WebPageUI/ButtonBar.h
new file mode 100644 (file)
index 0000000..08c96d1
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef BUTTONBAR_H
+#define BUTTONBAR_H
+
+#include <Evas.h>
+#include <list>
+#include <Ecore.h>
+
+#include "Action.h"
+#include "EAction.h"
+
+namespace tizen_browser {
+namespace base_ui {
+
+class ButtonBar {
+public:
+
+    struct ActionButton {
+        Evas_Object* button;
+        std::shared_ptr<EAction> eAction;
+    };
+
+    ButtonBar(Evas_Object* parent, const std::string& edjFile, const std::string& groupName);
+    ~ButtonBar();
+    void addAction(sharedAction action, const std::string& buttonName);
+    void setActionForButton(const std::string& buttonName, sharedAction newAction);
+    /**
+     * @brief register callback, used internally by addAction,
+     *        should be called externally for all actions that will be assigned to button
+     * @param action - action that will be used with buttonName
+     * @param buttonName - name of button used in ButtonBar
+     */
+    void registerEnabledChangedCallback(sharedAction action, const std::string& buttonName);
+
+    Evas_Object* getContent();
+    Evas_Object* getButton(const std::string& buttonName);
+    void clearFocus();
+    void setDisabled(bool disabled);
+
+private:
+    //map button name to current action assigned to button
+    std::map<std::string, sharedAction> m_actionsMap;
+    //map button name to struct ActionButton which contains Evas_Object of button
+    std::map<std::string, ActionButton> m_buttonsMap;
+    Evas_Object* m_layout;
+    void refreshButton(const std::string& buttonName);
+    void onEnabledChanged(const std::string& buttonName, sharedAction action);
+    static Ecore_Timer* m_tooltipHideTimer;
+    static Ecore_Timer* m_tooltipShowTimer;
+
+    static double tooltipHideTimeout;
+    static double tooltipShowDelay;
+
+    static void __cb_mouse_in(void* data, Evas* e, Evas_Object* obj, void* event_info);
+    static void __cb_mouse_out(void* data, Evas* e, Evas_Object* obj, void* event_info);
+    static void __cb_focus_in(void* data, Evas_Object* obj, void* event_info);
+    static void __cb_focus_out(void* data, Evas_Object* obj, void* event_info);
+    static Eina_Bool __cb_tooltip_hide_timeout(void* data);
+    static Eina_Bool __cb_tooltip_show_delay(void* data);
+
+};
+
+}
+
+}
+
+#endif // BUTTONBAR_H
diff --git a/services/WebPageUI/CMakeLists.txt b/services/WebPageUI/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b9ac365
--- /dev/null
@@ -0,0 +1,68 @@
+project(WebPageUI)
+
+set(WebPageUI_SRCS
+    WebPageUI.cpp
+    ButtonBar.cpp
+    URIEntry.cpp
+    )
+
+set(WebPageUI_HEADERS
+    WebPageUI.h
+    ButtonBar.h
+    URIEntry.h
+    )
+
+include(Coreheaders)
+include(EFLHelpers)
+include(EWebKitHelpers)
+
+include_directories(${CMAKE_BINARY_DIR})
+include_directories(${CMAKE_SOURCE_DIR})
+include_directories(${CMAKE_SOURCE_DIR}/services)
+include_directories(${CMAKE_SOURCE_DIR}/services/WebEngineService)
+include_directories(${CMAKE_SOURCE_DIR}/services/WebEngineService/src)
+include_directories(${CMAKE_SOURCE_DIR}/services/MoreMenuUI)
+include_directories(${CMAKE_SOURCE_DIR}/services/MainUI)
+include_directories(${CMAKE_SOURCE_DIR}/services/SettingsUI)
+include_directories(${CMAKE_SOURCE_DIR}/services/TabUI)
+
+
+include(FindPkgConfig)
+
+pkg_check_modules(capi_net QUIET capi-network-connection)
+
+add_library(${PROJECT_NAME} SHARED ${WebPageUI_SRCS})
+
+add_dependencies(${PROJECT_NAME} MoreMenuUI)
+add_dependencies(${PROJECT_NAME} MainUI)
+add_dependencies(${PROJECT_NAME} TabUI)
+target_link_libraries(${PROJECT_NAME} MoreMenuUI)
+target_link_libraries(${PROJECT_NAME} MainUI)
+target_link_libraries(${PROJECT_NAME} TabUI)
+target_link_libraries(${PROJECT_NAME} ${EFL_LDFLAGS})
+
+IF (${capi_net_FOUND})
+    target_link_libraries(${PROJECT_NAME} ${capi_net_LDFLAGS})
+ENDIF (${capi_net_FOUND})
+
+install(TARGETS ${PROJECT_NAME}
+            LIBRARY DESTINATION services
+            ARCHIVE DESTINATION services/static)
+
+include(EDCCompile)
+
+#please do not add edc/ directory
+set(edcFiles
+    WebPageUI.edc
+    ErrorMessage.edc
+    LeftButtonBar.edc
+    RightButtonBar.edc
+    URIEntry.edc
+    )
+
+foreach(edec ${edcFiles})
+    string(REPLACE ".edc" ".edj" target_name ${edec})
+    EDJ_TARGET(${target_name}
+               ${CMAKE_CURRENT_SOURCE_DIR}/edc/${edec}
+               ${CMAKE_CURRENT_BINARY_DIR})
+endforeach(edec)
diff --git a/services/WebPageUI/URIEntry.cpp b/services/WebPageUI/URIEntry.cpp
new file mode 100644 (file)
index 0000000..cc3fadb
--- /dev/null
@@ -0,0 +1,349 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include <Evas.h>
+#include "URIEntry.h"
+#include "BrowserLogger.h"
+#include "MenuButton.h"
+#include <algorithm>
+#include <boost/regex.hpp>
+#include "BrowserAssert.h"
+
+namespace tizen_browser {
+namespace base_ui {
+
+const std::string keynameSelect = "Select";
+const std::string keynameClear = "Clear";
+const std::string keynameKP_Enter = "KP_Enter";
+const std::string keynameReturn = "Return";
+const std::string keynameEsc = "XF86Back";
+
+URIEntry::URIEntry()
+    : m_parent(nullptr)
+    , m_entry(NULL)
+    , m_favicon(0)
+    , m_entry_layout(NULL)
+    , m_entrySelectedAllFirst(false)
+{
+    std::string edjFilePath = EDJE_DIR;
+    edjFilePath.append("WebPageUI/URIEntry.edj");
+    elm_theme_extension_add(NULL, edjFilePath.c_str());
+}
+
+URIEntry::~URIEntry()
+{}
+
+void URIEntry::init(Evas_Object* parent)
+{
+    m_parent = parent;
+}
+
+Evas_Object* URIEntry::getContent()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    M_ASSERT(m_parent);
+
+    if (!m_entry_layout) {
+        m_entry_layout = elm_layout_add(m_parent);
+        std::string edjFilePath = EDJE_DIR;
+        edjFilePath.append("WebPageUI/URIEntry.edj");
+        Eina_Bool layoutSetResult = elm_layout_file_set(m_entry_layout, edjFilePath.c_str(), "uri_entry_layout");
+        if (!layoutSetResult)
+            throw std::runtime_error("Layout file not found: " + edjFilePath);
+
+        m_entry = elm_entry_add(m_entry_layout);
+        elm_object_style_set(m_entry, "uri_entry");
+
+        elm_entry_single_line_set(m_entry, EINA_TRUE);
+        elm_entry_scrollable_set(m_entry, EINA_TRUE);
+        elm_entry_input_panel_layout_set(m_entry, ELM_INPUT_PANEL_LAYOUT_URL);
+
+#if PLATFORM(TIZEN)
+        elm_object_translatable_part_text_set(m_entry, "elm.guide", "Search words, web address");
+#else
+        elm_object_part_text_set(m_entry, "elm.guide", "Search words, web address");
+#endif
+
+        evas_object_smart_callback_add(m_entry, "activated", URIEntry::activated, this);
+        evas_object_smart_callback_add(m_entry, "aborted", URIEntry::aborted, this);
+        evas_object_smart_callback_add(m_entry, "preedit,changed", URIEntry::preeditChange, this);
+        evas_object_smart_callback_add(m_entry, "changed,user", URIEntry::changedUser, this);
+        evas_object_smart_callback_add(m_entry, "focused", URIEntry::focused, this);
+        evas_object_smart_callback_add(m_entry, "unfocused", URIEntry::unfocused, this);
+        evas_object_smart_callback_add(m_entry, "clicked", _uriEntryClicked, this);
+        evas_object_event_callback_priority_add(m_entry, EVAS_CALLBACK_KEY_DOWN, 2 * EVAS_CALLBACK_PRIORITY_BEFORE, URIEntry::fixed_entry_key_down_handler, this);
+
+        elm_object_part_content_set(m_entry_layout, "uri_entry_swallow", m_entry);
+
+        m_entryBtn = elm_button_add(m_entry_layout);
+
+        evas_object_event_callback_add(m_entryBtn, EVAS_CALLBACK_MOUSE_IN, __cb_mouse_in, this);
+        evas_object_smart_callback_add(m_entryBtn, "focused", URIEntry::focusedBtn, this);
+        evas_object_smart_callback_add(m_entryBtn, "unfocused", URIEntry::unfocusedBtn, this);
+
+        elm_object_style_set(m_entryBtn, "entry_btn");
+        evas_object_smart_callback_add(m_entryBtn, "clicked", _uriEntryBtnClicked, this);
+
+        elm_object_part_content_set(m_entry_layout, "uri_entry_btn", m_entryBtn);
+    }
+    return m_entry_layout;
+}
+
+void URIEntry::changeUri(const std::string newUri)
+{
+    BROWSER_LOGD("%s: newUri=%s", __func__, newUri.c_str());
+    elm_entry_entry_set(m_entry, elm_entry_utf8_to_markup(newUri.c_str()));
+}
+
+void URIEntry::setFavIcon(std::shared_ptr< tizen_browser::tools::BrowserImage > favicon)
+{
+    BROWSER_LOGD("[%s:%d] faviconType:%d ", __PRETTY_FUNCTION__, __LINE__, favicon->imageType);
+    if (favicon->imageType != tools::BrowserImage::ImageTypeNoImage) {
+        m_favicon = tizen_browser::tools::EflTools::getEvasImage(favicon, m_entry_layout);
+        evas_object_image_fill_set(m_favicon, 0, 0, 36, 36);
+        evas_object_resize(m_favicon, 36, 36);
+        elm_object_part_content_set(m_entry_layout, "fav_icon", m_favicon);
+        setCurrentFavIcon();
+    } else {
+        setDocIcon();
+    }
+}
+
+void URIEntry::setCurrentFavIcon()
+{
+    m_currentIconType = IconTypeFav;
+    elm_object_signal_emit(m_entry_layout, "show_favicon", "model");
+}
+
+void URIEntry::setSearchIcon()
+{
+    m_currentIconType = IconTypeSearch;
+    elm_object_signal_emit(m_entry_layout, "set_search_icon", "model");
+}
+
+void URIEntry::setDocIcon()
+{
+    m_currentIconType = IconTypeDoc;
+    elm_object_signal_emit(m_entry_layout, "set_doc_icon", "model");
+}
+
+URIEntry::IconType URIEntry::getCurrentIconTyep()
+{
+    return m_currentIconType;
+}
+
+void URIEntry::selectWholeText()
+{
+    m_oryginalEntryText = elm_entry_markup_to_utf8(elm_entry_entry_get(m_entry));
+    if (!m_entrySelectedAllFirst && !m_oryginalEntryText.empty()) {
+        elm_entry_select_all(m_entry);
+        elm_entry_cursor_end_set(m_entry);
+        m_entrySelectedAllFirst = true;
+    }
+}
+
+void URIEntry::_uriEntryClicked(void* data, Evas_Object* /* obj */, void* /* event_info */)
+{
+    BROWSER_LOGD("%s", __func__);
+    URIEntry* self = static_cast<URIEntry*>(data);
+    self->selectWholeText();
+}
+
+void URIEntry::_uriEntryBtnClicked(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
+{
+    URIEntry* self = static_cast<URIEntry*>(data);
+    elm_object_focus_set(self->m_entry, EINA_TRUE);
+    self->selectWholeText();
+
+    elm_object_signal_emit(self->m_entry_layout, "mouse,in", "over");
+}
+
+void URIEntry::activated(void* /* data */, Evas_Object* /* obj */, void* /*event_info*/)
+{
+    BROWSER_LOGD("%s", __func__);
+}
+
+void URIEntry::aborted(void* data, Evas_Object* /* obj */, void* /*event_info*/)
+{
+    BROWSER_LOGD("%s", __func__);
+    URIEntry* self = reinterpret_cast<URIEntry*>(data);
+    self->editingCanceled();
+}
+
+void URIEntry::preeditChange(void* /* data */, Evas_Object* /* obj */, void* /*event_info*/)
+{
+    BROWSER_LOGD("%s", __func__);
+}
+
+void URIEntry::changedUser(void* data, Evas_Object* /* obj */, void* /*event_info*/)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    URIEntry* self = reinterpret_cast<URIEntry*>(data);
+    std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_entry)));
+    if ((entry.find("http://") == 0)
+            || (entry.find("https://") == 0)
+            || (entry.find(".") != std::string::npos)) {
+        self->setDocIcon();
+    } else {//if(entry.find(" ") != std::string::npos){
+        self->setSearchIcon();
+    }
+}
+
+void URIEntry::unfocused(void* data, Evas_Object*, void*)
+{
+    BROWSER_LOGD("%s", __func__);
+    URIEntry* self = static_cast<URIEntry*>(data);
+    self->m_entrySelectedAllFirst = false;
+
+    elm_object_signal_emit(self->m_entry_layout, "mouse,out", "over");
+}
+
+void URIEntry::focused(void* data, Evas_Object* /* obj */, void* /* event_info */)
+{
+    URIEntry* self = static_cast<URIEntry*>(data);
+    elm_object_signal_emit(self->m_entry_layout, "mouse,in", "over");
+    BROWSER_LOGD("%s", __func__);
+}
+
+void URIEntry::fixed_entry_key_down_handler(void* data, Evas* /*e*/, Evas_Object* /*obj*/, void* event_info)
+{
+    BROWSER_LOGD("%s", __func__);
+    Evas_Event_Key_Down* ev = static_cast<Evas_Event_Key_Down*>(event_info);
+    if (!data || !ev || !ev->keyname)
+        return;
+    URIEntry* self = static_cast<URIEntry*>(data);
+
+    if (keynameClear == ev->keyname) {
+        elm_entry_entry_set(self->m_entry, "");
+        return;
+    }
+    if (keynameSelect == ev->keyname
+            || keynameReturn == ev->keyname
+            || keynameKP_Enter == ev->keyname) {
+        self->editingCompleted();
+        return;
+    }
+    if (keynameEsc == ev->keyname) {
+        self->editingCanceled();
+        elm_object_focus_set(self->m_entryBtn, EINA_TRUE);
+        return;
+    }
+}
+
+void URIEntry::editingCompleted()
+{
+    BROWSER_LOGD("%s", __func__);
+
+    char* text = elm_entry_markup_to_utf8(elm_entry_entry_get(m_entry));
+    std::string userString(text);
+    free(text);
+
+    elm_entry_input_panel_hide(m_entry);
+    uriChanged(rewriteURI(userString));
+}
+
+std::string URIEntry::rewriteURI(const std::string& url)
+{
+    BROWSER_LOGD("%s: %s", __PRETTY_FUNCTION__, url.c_str());
+    boost::regex urlRegex(R"(^(https?|ftp)://[^\s/$.?#].[^\s]*$)");
+
+    if (!url.empty() && url != "about:blank" && url != "about:home") {
+        if (boost::regex_match(url, urlRegex))
+            return url;
+        else if (boost::regex_match(std::string("http://") + url, urlRegex) &&  url.find(".") != std::string::npos)
+            return std::string("http://") + url;
+        else {
+            std::string searchString("http://www.google.com/search?q=");
+            searchString += url;
+            std::replace(searchString.begin(), searchString.end(), ' ', '+');
+            BROWSER_LOGD("[%s:%d] Search string: %s", __PRETTY_FUNCTION__, __LINE__, searchString.c_str());
+            return searchString;
+        }
+    }
+
+    return url;
+}
+
+
+void URIEntry::editingCanceled()
+{
+    BROWSER_LOGD("[%s:%d] oryinal URL: %s ", __PRETTY_FUNCTION__, __LINE__, m_oryginalEntryText.c_str());
+    if (!m_oryginalEntryText.empty()) {
+        elm_entry_entry_set(m_entry, elm_entry_utf8_to_markup(m_oryginalEntryText.c_str()));
+        m_oryginalEntryText = "";
+    }
+    elm_entry_input_panel_hide(m_entry);
+    setCurrentFavIcon();
+}
+
+void URIEntry::AddAction(sharedAction action)
+{
+    m_actions.push_back(action);
+}
+
+std::list<sharedAction> URIEntry::actions() const
+{
+    return m_actions;
+}
+
+void URIEntry::clearFocus()
+{
+    elm_object_focus_set(m_entry, EINA_FALSE);
+}
+
+void URIEntry::setFocus()
+{
+    elm_object_focus_set(m_entryBtn, EINA_TRUE);
+}
+
+bool URIEntry::hasFocus() const
+{
+    return elm_object_focus_get(m_entry) == EINA_TRUE ? true : false;
+}
+
+void URIEntry::__cb_mouse_in(void* /*data*/, Evas* /*e*/, Evas_Object* obj, void* /*event_info*/)
+{
+    elm_object_focus_set(obj, EINA_TRUE);
+}
+
+void URIEntry::__cb_mouse_out(void* /*data*/, Evas* /*e*/, Evas_Object* obj, void* /*event_info*/)
+{
+    elm_object_focus_set(obj, EINA_FALSE);
+}
+
+void URIEntry::focusedBtn(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
+{
+    URIEntry* self = static_cast<URIEntry*>(data);
+    elm_object_signal_emit(self->m_entry_layout, "mouse,in", "over");
+}
+
+void URIEntry::unfocusedBtn(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
+{
+    URIEntry* self = static_cast<URIEntry*>(data);
+    elm_object_signal_emit(self->m_entry_layout, "mouse,out", "over");
+}
+
+void URIEntry::setDisabled(bool disabled)
+{
+    if (disabled) {
+        clearFocus();
+    }
+    elm_object_disabled_set(getContent(), disabled ? EINA_TRUE : EINA_FALSE);
+}
+
+}
+}
\ No newline at end of file
diff --git a/services/WebPageUI/URIEntry.h b/services/WebPageUI/URIEntry.h
new file mode 100644 (file)
index 0000000..691701e
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef URIENTRY_H
+#define URIENTRY_H
+
+#include <Evas.h>
+#include <boost/signals2/signal.hpp>
+#include "memory.h"
+
+#include "BasicUI/Action.h"
+#include "BrowserImage.h"
+#include "EflTools.h"
+
+
+namespace tizen_browser {
+namespace base_ui {
+
+class URIEntry {
+public:
+    enum IconType {
+        IconTypeSearch
+        , IconTypeDoc
+        , IconTypeFav
+    };
+    URIEntry();
+    ~URIEntry();
+    void init(Evas_Object* parent);
+    Evas_Object* getContent();
+
+
+    void changeUri(const std::string);
+    boost::signals2::signal<void (const std::string&)> uriChanged;
+
+    void setFavIcon(std::shared_ptr<tizen_browser::tools::BrowserImage> favicon);
+    void setCurrentFavIcon();
+    void setSearchIcon();
+    void setDocIcon();
+    IconType getCurrentIconTyep();
+    /**
+     * \brief Adds Action to URI bar.
+     *
+     * All Actions will be displayed before URI entry.
+     */
+    void AddAction(sharedAction action);
+
+    /**
+     * \brief returns list of stored actions
+     */
+    std::list<sharedAction> actions() const;
+
+    /**
+     * \brief Sets Focus to URI entry.
+     */
+    void setFocus();
+
+    /**
+     * @brief Remove focus form URI
+     */
+    void clearFocus();
+
+    /**
+     * @brief check if URI is focused
+     */
+    bool hasFocus() const;
+
+    void setDisabled(bool disabled);
+
+private:
+    static void activated(void* data, Evas_Object* obj, void* event_info);
+    static void aborted(void* data, Evas_Object* obj, void* event_info);
+    static void preeditChange(void* data, Evas_Object* obj, void* event_info);
+    static void changedUser(void* data, Evas_Object* obj, void* event_info);
+    static void focused(void* data, Evas_Object* obj, void* event_info);
+    static void unfocused(void* data, Evas_Object* obj, void* event_info);
+    static void fixed_entry_key_down_handler(void* data, Evas* e, Evas_Object* obj, void* event_info);
+    static void _uriEntryBtnClicked(void* data, Evas_Object* obj, void* event_info);
+
+    void editingCompleted();
+    void editingCanceled();
+
+    void selectWholeText();
+
+    /**
+     * \brief Rewrites URI to support search and prefixing http:// if needed
+     */
+    std::string rewriteURI(const std::string& url);
+
+    static void _uriEntryClicked(void* data, Evas_Object* obj, void* event_info);
+
+    static void __cb_mouse_in(void* data, Evas* e, Evas_Object* obj, void* event_info);
+    static void __cb_mouse_out(void* data, Evas* e, Evas_Object* obj, void* event_info);
+    static void focusedBtn(void* data, Evas_Object* obj, void* event_info);
+    static void unfocusedBtn(void* data, Evas_Object* obj, void* event_info);
+
+private:
+    Evas_Object* m_parent;
+    IconType m_currentIconType;
+    std::list<sharedAction> m_actions;
+    Evas_Object* m_entry;
+    Evas_Object* m_favicon;
+    Evas_Object* m_entry_layout;
+    Evas_Object* m_entryBtn;
+    bool m_entrySelectedAllFirst;
+    std::string m_oryginalEntryText;
+    bool m_searchTextEntered;
+};
+
+
+}
+}
+
+#endif // URIENTRY_H
diff --git a/services/WebPageUI/WebPageUI.cpp b/services/WebPageUI/WebPageUI.cpp
new file mode 100644 (file)
index 0000000..0982bf3
--- /dev/null
@@ -0,0 +1,307 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include <memory>
+#include <boost/format.hpp>
+#include "WebPageUI.h"
+#include "BrowserLogger.h"
+#include "ServiceManager.h"
+#include "BrowserAssert.h"
+
+namespace tizen_browser {
+namespace base_ui {
+
+EXPORT_SERVICE(WebPageUI, "org.tizen.browser.webpageui")
+
+WebPageUI::WebPageUI()
+    : m_parent(nullptr)
+    , m_mainLayout(nullptr)
+    , m_errorLayout(nullptr)
+    , m_progressBar(nullptr)
+    , m_URIEntry(new URIEntry())
+    , m_homePageActive(false)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+WebPageUI::~WebPageUI()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+void WebPageUI::init(Evas_Object* parent)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    M_ASSERT(parent);
+    m_parent = parent;
+}
+
+Evas_Object* WebPageUI::getContent()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    M_ASSERT(m_parent);
+    if (!m_mainLayout) {
+        createLayout();
+    }
+    return m_mainLayout;
+}
+
+void WebPageUI::showUI()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+void WebPageUI::hideUI()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+void WebPageUI::loadStarted()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    showProgressBar();
+    elm_object_signal_emit(m_URIEntry->getContent(), "shiftright_uribg", "ui");
+    elm_object_signal_emit(m_mainLayout, "shiftright_uri", "ui");
+    m_leftButtonBar->setActionForButton("refresh_stop_button", m_stopLoading);
+}
+
+void WebPageUI::progressChanged(double progress)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (progress == 1.0) {
+        hideProgressBar();
+    } else {
+        elm_progressbar_value_set(m_progressBar, progress);
+    }
+}
+
+void WebPageUI::loadFinished()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    elm_object_signal_emit(m_mainLayout, "hide_progressbar_bg", "ui");
+    m_leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
+}
+
+bool WebPageUI::isErrorPageActive()
+{
+    return elm_object_part_content_get(m_mainLayout, "web_view") == m_errorLayout;
+}
+
+void WebPageUI::setMainContent(Evas_Object* content)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    M_ASSERT(content);
+    hideWebView();
+    elm_object_part_content_set(m_mainLayout, "web_view", content);
+    evas_object_show(content);
+}
+
+void WebPageUI::switchViewToErrorPage()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_homePageActive = false;
+    setMainContent(m_errorLayout);
+    evas_object_show(m_leftButtonBar->getContent());
+    setErrorButtons();
+}
+
+void WebPageUI::switchViewToWebPage(Evas_Object* content, const std::string uri)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_homePageActive = false;
+    setMainContent(content);
+    evas_object_show(m_leftButtonBar->getContent());
+    updateURIBar(uri);
+}
+
+void WebPageUI::switchViewToQuickAccess(Evas_Object* content)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_homePageActive = true;
+    setMainContent(content);
+
+    m_URIEntry->changeUri("");
+    m_leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
+    evas_object_hide(m_leftButtonBar->getContent());
+    elm_object_signal_emit(m_mainLayout, "shiftback_uri", "ui");
+    elm_object_signal_emit(m_URIEntry->getContent(), "shiftback_uribg", "ui");
+    hideProgressBar();
+}
+
+void WebPageUI::faviconClicked(void* data, Evas_Object*, const char*, const char*)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    WebPageUI* self = reinterpret_cast<WebPageUI*>(data);
+    if (!self->isHomePageActive() && !self->isErrorPageActive()) {
+        self->getURIEntry().clearFocus();
+    }
+}
+
+void WebPageUI::setTabsNumber(int tabs)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (tabs == 0) {
+        elm_object_part_text_set(m_rightButtonBar->getContent(), "tabs_number", "");
+    } else {
+        elm_object_part_text_set(m_rightButtonBar->getContent(), "tabs_number", (boost::format("%1%") % tabs).str().c_str());
+    }
+}
+
+void WebPageUI::createLayout()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    M_ASSERT(m_parent);
+    // create web layout
+    m_mainLayout = elm_layout_add(m_parent);
+    evas_object_size_hint_weight_set(m_mainLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_layout_file_set(m_mainLayout, edjePath("WebPageUI/WebPageUI.edj").c_str(), "main_layout");
+
+    createErrorLayout();
+    createActions();
+
+    // left buttons
+    m_leftButtonBar = std::unique_ptr<ButtonBar>(new ButtonBar(m_mainLayout, "WebPageUI/LeftButtonBar.edj", "left_button_bar"));
+    m_leftButtonBar->addAction(m_back, "prev_button");
+    m_leftButtonBar->addAction(m_forward, "next_button");
+    m_leftButtonBar->addAction(m_reload, "refresh_stop_button");
+
+    //register action that will be used later by buttons"
+    m_leftButtonBar->registerEnabledChangedCallback(m_stopLoading, "refresh_stop_button");
+
+    // right buttons
+    m_rightButtonBar = std::unique_ptr<ButtonBar>(new ButtonBar(m_mainLayout, "WebPageUI/RightButtonBar.edj", "right_button_bar"));
+    m_rightButtonBar->addAction(m_tab, "tab_button");
+    m_rightButtonBar->addAction(m_showMoreMenu, "setting_button");
+
+    // progress bar
+    m_progressBar = elm_progressbar_add(m_mainLayout);
+    elm_object_style_set(m_progressBar, "play_buffer");
+
+    //URL bar (Evas Object is shipped by URIEntry object)
+    m_URIEntry->init(m_mainLayout);
+    elm_object_part_content_set(m_mainLayout, "uri_entry", m_URIEntry->getContent());
+    elm_object_part_content_set(m_mainLayout, "uri_bar_buttons_left", m_leftButtonBar->getContent());
+    elm_object_part_content_set(m_mainLayout, "uri_bar_buttons_right", m_rightButtonBar->getContent());
+
+    elm_layout_signal_callback_add(m_URIEntry->getContent(), "slide_websearch", "elm", faviconClicked, this);
+
+    connectActions();
+}
+
+void WebPageUI::createErrorLayout()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_errorLayout =  elm_layout_add(m_mainLayout);
+    evas_object_size_hint_weight_set(m_errorLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(m_errorLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_layout_file_set(m_errorLayout, edjePath("WebPageUI/ErrorMessage.edj").c_str(), "error_message");
+}
+
+void WebPageUI::createActions()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_back = sharedAction(new Action("Back"));
+    m_back->setToolTip("Previous");
+    m_back->setIcon("browser/toolbar_prev");
+
+    m_forward = sharedAction(new Action("Next"));
+    m_forward->setToolTip("Next");
+    m_forward->setIcon("browser/toolbar_next");
+
+    m_stopLoading = sharedAction(new Action("Stop"));
+    m_stopLoading->setToolTip("Stop");
+    m_stopLoading->setIcon("browser/toolbar_stop");
+
+    m_reload = sharedAction(new Action("Reload"));
+    m_reload->setToolTip("Reload");
+    m_reload->setIcon("browser/toolbar_reload");
+    m_tab = sharedAction(new Action("Tabs"));
+    m_tab->setToolTip("Tab page");
+    m_tab->setIcon("browser/toolbar_tab");
+
+    m_showMoreMenu = sharedAction(new Action("Settings"));
+    m_showMoreMenu->setToolTip("Settings");
+    m_showMoreMenu->setIcon("browser/toolbar_setting");
+}
+
+void WebPageUI::connectActions()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    //left bar
+    m_back->triggered.connect(boost::bind(&WebPageUI::backPageConnect, this));
+    m_forward->triggered.connect(boost::bind(&WebPageUI::forwardPageConnect, this));
+    m_stopLoading->triggered.connect(boost::bind(&WebPageUI::stopLoadingPageConnect, this));
+    m_reload->triggered.connect(boost::bind(&WebPageUI::reloadPageConnect, this));
+
+    //right bar
+    m_tab->triggered.connect(boost::bind(&WebPageUI::showTabUIConnect, this));
+    m_showMoreMenu->triggered.connect(boost::bind(&WebPageUI::showMoreMenuConnect, this));
+}
+
+void WebPageUI::showProgressBar()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    elm_object_signal_emit(m_mainLayout, "show_progressbar_bg", "ui");
+    elm_object_part_content_set(m_mainLayout, "progress_bar", m_progressBar);
+}
+
+void WebPageUI::hideProgressBar()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    elm_object_signal_emit(m_mainLayout, "hide_progressbar_bg", "ui");
+    elm_progressbar_value_set(m_progressBar, 0.0);
+    elm_object_part_content_unset(m_mainLayout, "progress_bar");
+    evas_object_hide(m_progressBar);
+}
+
+void WebPageUI::hideWebView()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    evas_object_hide(elm_object_part_content_get(m_mainLayout, "web_view"));
+    elm_object_part_content_unset(m_mainLayout, "web_view");
+}
+
+void WebPageUI::setErrorButtons()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
+    m_stopLoading->setEnabled(false);
+    m_reload->setEnabled(true);
+    m_forward->setEnabled(false);
+    evas_object_hide(m_progressBar);
+}
+
+void WebPageUI::updateURIBar(const std::string& uri)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_URIEntry->changeUri(uri);
+    m_leftButtonBar->setActionForButton("refresh_stop_button", m_reload);
+
+    m_stopLoading->setEnabled(true);
+    m_reload->setEnabled(true);
+    hideProgressBar();
+}
+
+std::string WebPageUI::edjePath(const std::string& file)
+{
+    return std::string(EDJE_DIR) + file;
+}
+
+
+
+}   // namespace tizen_browser
+}   // namespace base_ui
\ No newline at end of file
diff --git a/services/WebPageUI/WebPageUI.h b/services/WebPageUI/WebPageUI.h
new file mode 100644 (file)
index 0000000..0e77b6c
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WEBPAGEUI_H
+#define WEBPAGEUI_H
+
+#include <Evas.h>
+#include <boost/signals2/signal.hpp>
+#include "AbstractService.h"
+#include "AbstractUIComponent.h"
+#include "ServiceFactory.h"
+#include "service_macros.h"
+#include "ButtonBar.h"
+#include "URIEntry.h"
+
+namespace tizen_browser {
+namespace base_ui {
+
+class BROWSER_EXPORT WebPageUI : public tizen_browser::core::AbstractService, public tizen_browser::interfaces::AbstractUIComponent {
+public:
+    WebPageUI();
+    virtual ~WebPageUI();
+    virtual std::string getName();
+    virtual void init(Evas_Object* parent);
+    virtual Evas_Object* getContent();
+    virtual void showUI();
+    virtual void hideUI();
+    void loadStarted();
+    void progressChanged(double progress);
+    void loadFinished();
+    bool isErrorPageActive();
+    bool isHomePageActive() { return m_homePageActive; }
+    void switchViewToErrorPage();
+    void switchViewToWebPage(Evas_Object* content, const std::string uri);
+    void switchViewToQuickAccess(Evas_Object* content);
+    URIEntry& getURIEntry() const { return *m_URIEntry.get(); }
+    bool isBackButtonEnabled() { return m_back->isEnabled(); }
+    void setTabsNumber(int tabs);
+    void setBackButtonEnabled(bool enabled) { m_back->setEnabled(enabled); }
+    void setForwardButtonEnabled(bool enabled) { m_forward->setEnabled(enabled); }
+    void setReloadButtonEnabled(bool enabled) { m_reload->setEnabled(enabled); }
+    void setStopButtonEnabled(bool enabled) { m_stopLoading->setEnabled(enabled); }
+    void setMoreMenuButtonEnabled(bool enabled) { m_showMoreMenu->setEnabled(enabled); }
+
+    boost::signals2::signal<void ()> backPage;
+    boost::signals2::signal<void ()> forwardPage;
+    boost::signals2::signal<void ()> stopLoadingPage;
+    boost::signals2::signal<void ()> reloadPage;
+    boost::signals2::signal<void ()> showTabUI;
+    boost::signals2::signal<void ()> showMoreMenu;
+
+    static void faviconClicked(void* data, Evas_Object* obj, const char* emission, const char* source);
+private:
+    void createLayout();
+    void createErrorLayout();
+    void createActions();
+    void connectActions();
+    void showProgressBar();
+    void hideProgressBar();
+    void hideWebView();
+    void setErrorButtons();
+    void setMainContent(Evas_Object* content);
+    void updateURIBar(const std::string& uri);
+    std::string edjePath(const std::string& file);
+
+    // wrappers to call singal as a reaction to other signal
+    void backPageConnect() { backPage(); }
+    void forwardPageConnect() { forwardPage(); }
+    void stopLoadingPageConnect() { stopLoadingPage(); }
+    void reloadPageConnect() { reloadPage(); }
+    void showTabUIConnect() { showTabUI(); }
+    void showMoreMenuConnect() { showMoreMenu(); }
+
+    Evas_Object* m_parent;
+    Evas_Object* m_mainLayout;
+    Evas_Object* m_errorLayout;
+    Evas_Object* m_progressBar;
+    std::unique_ptr<ButtonBar> m_leftButtonBar;
+    std::unique_ptr<ButtonBar> m_rightButtonBar;
+    std::unique_ptr<URIEntry> m_URIEntry;
+    bool m_homePageActive;
+
+    sharedAction m_back;
+    sharedAction m_forward;
+    sharedAction m_stopLoading;
+    sharedAction m_reload;
+    sharedAction m_tab;
+    sharedAction m_showMoreMenu;
+};
+
+
+}   // namespace tizen_browser
+}   // namespace base_ui
+
+#endif // WEBPAGEUI_H
diff --git a/services/WebPageUI/edc/ErrorMessage.edc b/services/WebPageUI/edc/ErrorMessage.edc
new file mode 100644 (file)
index 0000000..04cf932
--- /dev/null
@@ -0,0 +1,179 @@
+
+collections {
+    images {
+        image: "web_browsing_icon_error.png" COMP;
+    }
+    styles {
+        style {
+            name: "mssage_style";
+            base: "font=Sans font_size=35 color=#d3d3d3 wrap=word align=0.5";
+        }
+        style {
+            name: "mssage_hint_style";
+            base: "font=Sans font_size=24 color=#868686 wrap=word align=0.5";
+        }
+    }
+    group{
+        name: "error_message";
+        parts{
+            part{
+                name: "message_background";
+                type: RECT;
+                mouse_events: 1;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    rel1.relative: 0 0;
+                    rel2.relative: 1 1;
+                    color: 42 50 64 255;
+                }
+                description{
+                    state: "visibleError" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+            }
+            part{
+                name: "error_message_background";
+                type:RECT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    min: 1582 730;
+                    max: 1582 730;
+                    fixed: 1 1;
+                align: 0.5 0.5;
+                color: 30 38 50 153;
+            }
+            description{
+                state: "visibleError" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part{
+            name: "err_ico";
+            type: IMAGE;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                min: 140 140;
+                max:140 140;
+                fixed: 1 1;
+                align: 0.5 0;
+                rel1{
+                    relative: 0 0;
+                    offset:0 163;
+                    to: "error_message_background";
+                }
+                rel2{
+                    relative: 1 1;
+                    to: "error_message_background";
+                }
+                image{
+                    normal: "web_browsing_icon_error.png";
+                }
+            }
+            description{
+                state: "visibleError" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part{
+            name: "error_text";
+            type: TEXTBLOCK;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                min: 1502 96;
+                max: 1502 96;
+                //color: 211 211 211 255;
+                align: 0.5 0;
+                rel1{
+                    relative: 0 1;
+                    to_x: "error_message_background";
+                    to_y: "err_ico";
+                }
+                rel2{
+                    relative: 1 1;
+                    to: "error_message_background";
+                }
+                text{
+                    style: "mssage_style";
+                    text: "Server not found.<br/>Please check the followings:";
+                    //min: 0 0;
+                    //max: 1 1;
+                    //align: 1 0;
+                    //size: 35;
+                }
+            }
+            description{
+                state: "visibleError" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part{
+            name: "error_hint";
+            type: TEXTBLOCK;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                min: 1502 117;
+                max: 1502 117;
+                color: 134 134 134 255;
+                align: 0.5 0;
+                rel1{
+                    relative: 0 1;
+                    to_x: "error_message_background";
+                    to_y: "error_text";
+                }
+                rel2{
+                    relative: 1 1;
+                    to: "error_message_background";
+                }
+                text{
+                    max: 0 1;
+                    style: "mssage_hint_style";
+                    text: "Check for any typing error in URL. <br/>"
+                    "Check your network settings.<br/>"
+                    "Try again later.<br/>"
+                    "Click refresh to reload.";
+                }
+            }
+            description{
+                state: "visibleError" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+    }//parts
+    programs{
+        program{
+            name: "show_error";
+            signal: "show_error";
+            source: "model";
+            action: STATE_SET "visibleError" 0.0;
+            target: "message_background";
+            target: "error_message_background";
+            target: "err_ico";
+            target: "error_text";
+            target: "error_hint";
+        }
+        program{
+            name: "hide_error";
+            signal: "hide_error";
+            source: "model";
+            action: STATE_SET "default" 0.0;
+            target: "message_background";
+            target: "error_message_background";
+            target: "err_ico";
+            target: "error_text";
+            target: "error_hint";
+        }
+    }//programs
+}
+}
diff --git a/services/WebPageUI/edc/ImageButton.edc b/services/WebPageUI/edc/ImageButton.edc
new file mode 100644 (file)
index 0000000..6b7170d
--- /dev/null
@@ -0,0 +1,201 @@
+#define __CONCAT1(X,Y)          X##Y
+#define __CONCAT(X,Y)           __CONCAT1(X,Y)
+
+#define FOUR_STATE_IMAGE_BUTTON(CLASS_NAME, W, H, IMG_NORMAL)       \
+    group {                                                         \
+        name: __CONCAT("elm/button/base/", CLASS_NAME);             \
+        min: W H;                                                   \
+        max: W H;                                                   \
+        data { item: "focus_highlight" "off"; }                     \
+        images {                                                    \
+            image: IMG_NORMAL COMP;                                 \
+            image: "round_rectangle_4X4.png" COMP;                  \
+        }                                                           \
+        parts {                                                     \
+            part { name: high_layer;                                \
+                scale:1;                                            \
+                type : IMAGE;                                       \
+                repeat_events: 1;                                   \
+                description {                                       \
+                    state: "default" 0.0;                           \
+                    visible: 0;                                     \
+                    color: 69 149 255 255;                          \
+                    rel1 { to: "bg"; relative: 0 0; }               \
+                    rel2 { to: "bg"; relative: 1 1; }               \
+                }                                                   \
+                description { state: "highlight" 0.0;               \
+                    inherit: "default" 0.0;                         \
+                    visible: 1;                                     \
+                    image.normal: "round_rectangle_4X4.png";        \
+                    image.border: 4 4 4 4;                          \
+                    image.border_scale: 1;                          \
+                    image.middle: 1;                                \
+                }                                                   \
+                description { state: "disabled" 0.0;                \
+                    inherit: "highlight" 0.0;                       \
+                    visible: 1;                                     \
+                    color: 69 149 255 102;                          \
+                }                                                   \
+            }                                                       \
+            part {                                                  \
+                name: "bg";                                         \
+                scale: 1;                                           \
+                type: IMAGE;                                        \
+                description { state: "default" 0.0;                 \
+                    min: W H;                                       \
+                    max: W H;                                       \
+                    fixed: 1 1;                                     \
+                    align: 0 0;                                     \
+                    image.normal: IMG_NORMAL;                       \
+                    color: 255 255 255 153;                         \
+                }                                                   \
+                description { state: "disabled" 0.0;                \
+                    inherit: "default" 0.0;                         \
+                    color: 255 255 255 51;                          \
+                }                                                   \
+                description { state: "highlight" 0.0;               \
+                    inherit: "default" 0.0;                         \
+                    color: 255 255 255 255;                         \
+                }                                                   \
+            }                                                       \
+            part { name: "over2";                                   \
+                type: RECT;                                         \
+                scale:1;                                            \
+                mouse_events: 1;                                    \
+                repeat_events: 1;                                   \
+                ignore_flags: ON_HOLD;                              \
+                description { state: "default" 0.0;                 \
+                   color: 0 0 0 0;                                  \
+                   rel1 { relative: 0 0; to: "bg"; }                \
+                   rel2 { relative: 1 1; to: "bg"; }                \
+                }                                                   \
+            }                                                       \
+            part { name: "over3";                                   \
+                scale:1;                                            \
+                type: RECT;                                         \
+                mouse_events: 1;                                    \
+                repeat_events: 1;                                   \
+                description { state: "default" 0.0;                 \
+                   color: 0 0 0 0;                                  \
+                   rel1 { relative: 0 0; to: "bg"; }                \
+                   rel2 { relative: 1 1; to: "bg"; }                \
+                }                                                   \
+            }                                                       \
+            part { name: "disabler";                                \
+                scale:1;                                            \
+                type: RECT;                                         \
+                repeat_events: 0;                                   \
+                mouse_events: 1;                                    \
+                description { state: "default" 0.0;                 \
+                    color: 0 0 0 0;                                 \
+                    visible: 0;                                     \
+                    rel1 { relative: 0 0; to: "bg"; }               \
+                    rel2 { relative: 1 1; to: "bg"; }               \
+                }                                                   \
+                description { state: "disabled" 0.0;                \
+                    inherit: "default" 0.0;                         \
+                    visible: 1;                                     \
+                }                                                   \
+            }                                                       \
+            part {                                                  \
+                name: "elm.swallow.content";                        \
+                scale:1;                                            \
+                type: SWALLOW;                                      \
+                description { state: "default" 0.0;                 \
+                    visible: 0;                                     \
+                }                                                   \
+            }                                                       \
+            part {                                                  \
+                name: "elm.swallow.text";                           \
+                scale: 1;                                           \
+                type: TEXT;                                         \
+                description { state: "default" 0.0;                 \
+                    visible: 0;                                     \
+                    text {                                          \
+                        min: 0 0;                                   \
+                    }                                               \
+                }                                                   \
+            }                                                       \
+            part {                                                  \
+                name: "elm.swallow.end";                            \
+                scale: 1;                                           \
+                type: SWALLOW;                                      \
+                description { state: "default" 0.0;                 \
+                    visible: 0;                                     \
+                }                                                   \
+            }                                                       \
+        }                                                           \
+        programs {                                                  \
+            program {                                               \
+                name: "disable";                                    \
+                signal: "elm,state,disabled";                       \
+                source: "elm";                                      \
+                action: STATE_SET "disabled" 0.0;                   \
+                target: "bg";                                       \
+                target: "disabler";                                 \
+            }                                                       \
+            program {                                               \
+                name: "enable";                                     \
+                signal: "elm,state,enabled";                        \
+                source: "elm";                                      \
+                action: STATE_SET "default" 0.0;                    \
+                target: "bg";                                       \
+                target: "disabler";                                 \
+            }                                                       \
+            program {                                               \
+                name: "mouse_down";                                 \
+                signal: "mouse,down,1";                             \
+                source: "over2";                                    \
+                script {                                            \
+                    emit("elm,action,press", "");                   \
+                }                                                   \
+            }                                                       \
+            program {                                               \
+                name: "mouse_up";                                   \
+                signal: "mouse,up,1";                               \
+                source: "over2";                                    \
+                script {                                            \
+                    emit("elm,action,unpress", "");                 \
+                }                                                   \
+            }                                                       \
+            program {                                               \
+                name: "mouse_click";                                \
+                signal: "mouse,clicked,1";                          \
+                source: "over2";                                    \
+                script {                                            \
+                    emit("elm,action,click", "");                   \
+                }                                                   \
+            }                                                       \
+            program {                                               \
+                name: "mouse_in_disabled";                          \
+                signal: "mouse,in";                                 \
+                source: "disabler";                                 \
+                action: STATE_SET "disabled" 0.0;                   \
+                target: "high_layer";                               \
+                target: "bg";                                       \
+            }                                                       \
+            program {                                               \
+                name: "mouse_out_disabled";                         \
+                signal: "mouse,out";                                \
+                source: "disabler";                                 \
+                action: STATE_SET "default" 0.0;                    \
+                target: "high_layer";                               \
+            }                                                       \
+            program {                                               \
+                name: "focused";                                    \
+                signal: "elm,action,focus";                         \
+                source: "elm";                                      \
+                action: STATE_SET "highlight" 0.0;                  \
+                target: "high_layer";                               \
+                target: "bg";                                       \
+            }                                                       \
+            program {                                               \
+                name: "unfocused";                                  \
+                signal: "elm,action,unfocus";                       \
+                source: "elm";                                      \
+                action: STATE_SET "default" 0.0;                    \
+                target: "high_layer";                               \
+                target: "bg";                                       \
+            }                                                       \
+        }                                                           \
+    }
diff --git a/services/WebPageUI/edc/LeftButtonBar.edc b/services/WebPageUI/edc/LeftButtonBar.edc
new file mode 100644 (file)
index 0000000..08c714a
--- /dev/null
@@ -0,0 +1,103 @@
+#include "ImageButton.edc"
+#include "Spacer.edc"
+
+collections {
+
+    FOUR_STATE_IMAGE_BUTTON("browser/toolbar_prev", 82, 102, "btn_bar_back_nor.png")
+
+    FOUR_STATE_IMAGE_BUTTON("browser/toolbar_next", 82, 102, "btn_bar_forward_nor.png")
+
+    FOUR_STATE_IMAGE_BUTTON("browser/toolbar_reload", 82, 102, "btn_bar_reload_nor.png")
+
+    FOUR_STATE_IMAGE_BUTTON("browser/toolbar_stop", 82, 102, "btn_bar_stop_nor.png")
+
+    group {
+        name: "left_button_bar";
+
+        parts {
+
+            part {
+                name: "prev_button";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.0 0.0;
+                    fixed: 1 1;
+                min: 70 70;
+                max: 70 70;
+                rel1 { relative: 0.0 0.0; }
+                rel2 { relative: 0.0 0.0; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+
+        ADD_SPACER("spacer_1", "prev_button", 10, 70)
+
+            part {
+                name: "next_button";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.0 0.0;
+                    fixed: 1 1;
+                min: 70 70;
+                max: 70 70;
+                rel1 { relative: 1.0 0.0; to: "spacer_1"; }
+                rel2 { relative: 0.0 0.0; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+
+        ADD_SPACER("spacer_2", "next_button", 10, 70)
+
+            part {
+                name: "refresh_stop_button";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.0 0.0;
+                    fixed: 1 1;
+                min: 70 70;
+                max: 70 70;
+                rel1 { relative: 1.0 0.0; to: "spacer_2"; }
+                rel2 { relative: 0.0 0.0; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+
+    }
+}
+}
diff --git a/services/WebPageUI/edc/RightButtonBar.edc b/services/WebPageUI/edc/RightButtonBar.edc
new file mode 100644 (file)
index 0000000..242bd94
--- /dev/null
@@ -0,0 +1,86 @@
+#include "ImageButton.edc"
+#include "Spacer.edc"
+collections {
+    FOUR_STATE_IMAGE_BUTTON("browser/toolbar_tab", 82, 102, "btn_bar_manager_nor.png")
+    FOUR_STATE_IMAGE_BUTTON("browser/toolbar_setting", 82, 102, "btn_bar_more_nor.png")
+    group {
+        name: "right_button_bar";
+        parts {
+            part {
+                name: "tab_button";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                align: 0.0 0.0;
+                min: 70 70;
+                max: 70 70;
+                rel1 { relative: 0.0 0.0; }
+                rel2 { relative: 0.0 0.0; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part {
+            name: "tabs_number";
+            type: TEXT;
+            scale: 1;
+            repeat_events: 1;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                align: 0.0 0.0;
+                min: 70 70;
+                max: 70 70;
+                color: 86 86 86 255;
+                rel1 { relative: 0.0 0.0; to: "tab_button"; offset: 5 13; }
+                rel2 { relative: 1.0 1.0; to: "tab_button"; }
+                text {
+                    text: "";
+                    font: "Tizen:style=Bold";
+                    size: 19;
+                    align: 0.5 0.5;
+                }
+            }
+        }
+        ADD_SPACER("spacer_1", "tab_button", 10, 70)
+            part {
+                name: "setting_button";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                align: 0.0 0.0;
+                min: 70 70;
+                max: 70 70;
+                fixed: 1 1;
+                rel1 { relative: 1.0 0.0; to: "spacer_1"; }
+                rel2 { relative: 0.0 0.0; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+    }
+}
+}
diff --git a/services/WebPageUI/edc/Spacer.edc b/services/WebPageUI/edc/Spacer.edc
new file mode 100644 (file)
index 0000000..a1c5d9c
--- /dev/null
@@ -0,0 +1,29 @@
+#define ADD_SPACER(NAME, RELATIVE_TO, WIDTH, HEIGHT)                \
+part {  name: NAME;                                                 \
+        type: SPACER;                                               \
+        scale: 1;                                                   \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            rel1 { relative: 1.0 0.0; to: RELATIVE_TO; }            \
+            rel2 { relative: 1.0 1.0; to: RELATIVE_TO; offset: WIDTH 0; }\
+            fixed: 1 1;                                             \
+            align: 0.5 0.5;                                         \
+            min: WIDTH HEIGHT;                                      \
+            max: WIDTH HEIGHT;                                      \
+            }                                                       \
+    }
+
+#define ADD_SPACER_OVER(NAME, RELATIVE_TO, WIDTH, HEIGHT)           \
+part {  name: NAME;                                                 \
+        type: SPACER;                                               \
+        scale: 1;                                                   \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            rel1 { relative: 0.0 0.0; to: RELATIVE_TO; }            \
+            rel2 { relative: 1.0 1.0; to: RELATIVE_TO; }            \
+            fixed: 1 1;                                             \
+            align: 0 0;                                             \
+            min: WIDTH HEIGHT;                                      \
+            max: WIDTH HEIGHT;                                      \
+            }                                                       \
+    }
diff --git a/services/WebPageUI/edc/URIEntry.edc b/services/WebPageUI/edc/URIEntry.edc
new file mode 100644 (file)
index 0000000..f3f1da0
--- /dev/null
@@ -0,0 +1,296 @@
+#define URI_INPUTBOX_LENGTH 1720
+#define URI_INPUTBOX_LENGTH_SMALL 1460
+#define URI_INPUTBOX_WIDTH 82
+collections {
+    group {
+        name: "elm/entry/selection/browser_entry";
+        parts {
+            part {
+                name: "bg";
+                scale:1;
+                type: RECT;
+                mouse_events: 0;
+                description {
+                    state: "default" 0.0;
+                    color: 255 255 255 255;
+                }
+            }
+        }
+    }
+    group {
+        name: "elm/entry/cursor/browser_entry";
+        parts {
+            part {
+                name: "bg";
+                scale:1;
+                type: RECT;
+                mouse_events: 0;
+                description {
+                    state: "default" 0.0;
+                    color: 22 120 237 255;
+                    min: 2 36;
+                    max: 2 36;
+                    visible: 0;
+                }
+                description {
+                    state: "focused" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+            }
+        }
+        programs {
+            program {
+                name: "focused";
+                signal: "elm,action,focus";
+                source: "elm";
+                action: STATE_SET "focused" 0.0;
+                target: "bg";
+            }
+            program {
+                name: "unfocused";
+                signal: "elm,action,unfocus";
+                source: "elm";
+                action: STATE_SET "default" 0.0;
+                target: "bg";
+            }
+        }
+    }
+    group {
+        name: "elm/entry/base-single/uri_entry";
+        styles {
+            style {
+                name: "browser-entry-uri-style-unselected";
+                base: "font=Sans:style=SVD_Medium font_size="42" wrap=none color=#969696";
+            }
+            style {
+                name: "browser-entry-uri-style-selected";
+                base: "font=Sans:style=SVD_Medium font_size="42" wrap=none color=#4088d3";
+            }
+        }
+        data {
+            item: focus_highlight "off";
+        }
+        parts {
+
+            part {
+                name: "bg";
+                scale:1;
+                type: RECT;
+                mouse_events: 0;
+                description {
+                    state: "default" 0.0;
+                    color: 255 255 255 255;
+                }
+            }
+
+            part {
+                name: "elm.guide";
+                scale:1;
+                type: TEXTBLOCK;
+                mouse_events: 0;
+                description {
+                    state: "default" 0.0;
+                    rel1.relative: 0.0 0.0;
+                    rel2.relative: 1.0 1.0;
+                    align: 0.0 0.0;
+                    text {
+                        style: "browser-entry-uri-style-unselected";
+                        min: 0 1;
+                    }
+                }
+                description {
+                    state: "hidden" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 0;
+                }
+            }
+            part {
+                name: "label.text.clip";
+                scale:1;
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                }
+            }
+            part {
+                name: "elm.text";
+                scale:1;
+                multiline: 0;
+                entry_mode: EDITABLE;
+                select_mode: DEFAULT;
+                cursor_mode: BEFORE;
+                type: TEXTBLOCK;
+                clip_to: "label.text.clip";
+                source: "elm/entry/selection/browser_entry";
+                source4: "elm/entry/cursor/browser_entry";
+                description {
+                    state: "default" 0.0;
+                    rel1.relative: 0.0 0.0;
+                    rel2.relative: 1.0 1.0;
+                    align: 0.0 0.0;
+                    text {
+                        style: "browser-entry-uri-style-selected";
+                        min: 0 1;
+                    }
+                }
+            }
+        }
+        programs {
+            program {
+                name: "focus";
+                signal: "load";
+                source: "";
+                action: FOCUS_SET;
+                target: "elm.text";
+            }
+            program {
+                name: "gdisabled";
+                signal: "elm,guide,disabled";
+                source: "elm";
+                action: STATE_SET "hidden" 0.0;
+                target: "elm.guide";
+            }
+            program {
+                name: "genabled";
+                signal: "elm,guide,enabled";
+                source: "elm";
+                action: STATE_SET "default" 0.0;
+                target: "elm.guide";
+            }
+        }
+    }//group
+
+    group {
+        name: "elm/button/base/entry_btn";
+        parts {
+            part {
+                name: "bg";
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    color: 0 0 0 0;
+                    visible: 1;
+                }
+            }
+        }
+        programs {
+            program {
+                name: "mouse_click";
+                signal: "mouse,clicked,1";
+                source: "bg";
+                script {
+                    emit("elm,action,click", "");
+                }
+            }
+        }
+    }
+
+
+    group {
+        name: "uri_entry_layout";
+        parts {
+            part {
+                name: "spacer_1";
+                type: SPACER;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    rel1 { relative: 0.0 0.0; }
+                    rel2 { relative: 0.0 0.0; offset: 15 0; }
+                    align: 0.0 0.0;
+                    fixed: 1 1;
+                min: 1 102;
+                max: 1 102;
+            }
+        }
+        part {
+            name: "uri_entry_swallow";
+            type : SWALLOW;
+            scale: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                color: 255 255 255 255;
+                align: 0.0 0.0;
+                min: URI_INPUTBOX_LENGTH URI_INPUTBOX_WIDTH;
+                max: URI_INPUTBOX_LENGTH URI_INPUTBOX_WIDTH;
+                fixed: 1 1;
+                rel1 { relative: 1 0; to: "spacer_1"; }
+                rel2 { relative: 1 1; to: "spacer_1"; }
+            }
+            description {
+                state: "moveright" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+                min: URI_INPUTBOX_LENGTH_SMALL URI_INPUTBOX_WIDTH;
+                max: URI_INPUTBOX_LENGTH_SMALL URI_INPUTBOX_WIDTH;
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part {
+            name: "over";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description {
+                state: "default" 0.0;
+                color: 0 0 0 0;
+                rel1 { relative: 0 0; to: "spacer_1"; }
+                rel2 { relative: 1 1; to: "spacer_1"; }
+            }
+        }
+        part {
+            name: "uri_entry_btn";
+            type: SWALLOW;
+            mouse_events: 1;
+            repeat_events: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                rel1.to: "uri_entry_swallow";
+                rel2.to: "uri_entry_swallow";
+            }
+        }
+    }
+    programs {
+        program {
+            name: "shiftright_uribarbg";
+            signal: "shiftright_uribg";
+            source: "ui";
+            action: STATE_SET "moveright" 0.0;
+            target: "uri_entry_swallow";
+        }
+        program {
+            name: "shiftback_uribarbg";
+            signal: "shiftback_uribg";
+            source: "ui";
+            action: STATE_SET "default" 0.0;
+            target: "uri_entry_swallow";
+        }
+        program {
+            name: "mouse_in_entry";
+            source: "over";
+            signal: "mouse,in";
+            action: STATE_SET "focused" 0.0;
+            target: "spacer_1";
+        }
+        program {
+            name: "mouse_out_entry";
+            source: "over";
+            signal: "mouse,out";
+            action: STATE_SET "default" 0.0;
+            target: "spacer_1";
+        }
+    }
+}
+}
diff --git a/services/WebPageUI/edc/WebPageUI.edc b/services/WebPageUI/edc/WebPageUI.edc
new file mode 100644 (file)
index 0000000..a2de43b
--- /dev/null
@@ -0,0 +1,318 @@
+#define URI_LENGTH 1720
+#define URI_LENGTH_SHORT 1460
+#define URI_WIDTH 82
+#include "Spacer.edc"
+#define DEBUG_RECT_OVER(over_part, r, g, b)                         \
+    part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__));   \
+                                                                    \
+scale:1;                                                            \
+        type : RECT;                                                \
+        repeat_events: 1;                                           \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            visible: 1;                                             \
+            color: r g b 255;                                 \
+            rel1 { to: over_part; relative: 0 0; }                  \
+            rel2 { to: over_part; relative: 1 1; }                  \
+        }                                                           \
+    }
+collections {
+    group {
+        name: "main_layout";
+        images {
+            image: "web_shadow.png" COMP;
+        }
+        parts {
+            part {
+                name: "uri_bar_bg";
+                type : RECT;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                align: 0 0;
+                min: 1920 104;
+                max: 1920 104;
+                color: 255 255 255 255;
+                rel1 { relative: 0.0 0.0; }
+                rel2 { relative: 1.0 0.0; }
+            }
+        }
+        ADD_SPACER_OVER("left_spacer", "uri_bar_bg", 7, 104)
+            part {
+                name: "uri_bar_buttons_left";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0 0.5;
+                    min: 246 102;
+                    max: 246 102;
+                    fixed: 1 1;
+                rel1 { relative: 1.0 1.0; to: "left_spacer"; }
+                rel2 { relative: 0.0 0.0; to: "left_spacer"; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        ADD_SPACER("left_buttons_spacer", "uri_bar_buttons_left", 0.5, 102)
+            part {
+                name: "uri_entry";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.0 0.5;
+                    min: URI_LENGTH URI_WIDTH;
+                    max: URI_LENGTH URI_WIDTH;
+                    fixed: 1 1;
+                rel1 { relative: 1.0 0.5; to: "left_spacer"; }
+                rel2 { relative: 1.0 0.5; to: "left_spacer"; }
+            }
+            description {
+                state: "moveright" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+                min: URI_LENGTH_SHORT URI_WIDTH;
+                max: URI_LENGTH_SHORT URI_WIDTH;
+                rel1 { relative: 1.0 0.5; to: "left_buttons_spacer"; }
+                rel2 { relative: 1.0 0.5; to: "left_buttons_spacer"; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        ADD_SPACER("right_buttons_spacer", "uri_entry", 26, 102)
+            part {
+                name: "uri_bar_buttons_right";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.0 0.5;
+                    min: 164 102;
+                    max: 164 102;
+                    fixed: 1 1;
+                rel1 { relative: 1.0 0.5; to: "right_buttons_spacer"; }
+                rel2 { relative: 1.0 0.5; to: "right_buttons_spacer"; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        ADD_SPACER("right_spacer", "uri_bar_buttons_right", 74, 102)
+            part {
+                name: "web_view";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.0 0.0;
+                    fixed: 0 0;
+                rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; }
+                rel2 { relative: 1.0 1.0; }
+            }
+            description {
+                state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part {
+            name: "shadow";
+            type: IMAGE;
+            scale: 1;
+            repeat_events: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                align: 0.0 0.0;
+                fixed: 0 0;
+                min: 1920 14;
+                max: 1920 14;
+                image.normal: "web_shadow.png";
+                rel1 { relative: 0.0 0.0; to: "web_view"; }
+                rel2 { relative: 1.0 1.0; }
+            }
+        }
+        part {
+            name: "progress_bar";
+            type: SWALLOW;
+            scale: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                align: 0.0 0.0;
+                fixed: 0 0;
+                min: 1920 2;
+                max: 1920 2;
+                rel1 {
+                    relative: 0.0 0.0;
+                    offset: -12 -10;
+                    to: "web_view";
+                }
+                rel2 { relative: 1.0 1.0; }
+            }
+        }
+        part {
+            name: "progress_bar_light_bg";
+            type: RECT;
+            repeat_events: 1;
+            description {
+                state: "default" 0.0;
+                fixed: 1 1;
+                min: 0 8;
+                max: 1920 8;
+                align: 0 0;
+                visible: 0;
+                rel1.to: "web_view";
+                rel1.relative: 0.0 0.0;
+                rel2.relative: 1.0 0.0;
+                color: 69 143 255 55;
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+        part{
+            name: "web_title_bar";
+            type: SWALLOW;
+            scale: 1;
+            description {
+                state: "default" 0.0;
+                min: 1920 87;
+                max: 1920 87;
+                fixed: 1 1;
+                align: 0 1;
+                rel1 { to: "web_view"; relative: 0.0 1.0; }
+                rel2 { to: "web_view"; relative: 1.0 1.0; }
+            }
+        }
+
+
+        part {
+            name: "popup_bg";
+            type: RECT;
+            scale: 1;
+            mouse_events: 1;
+            description {
+                state: "default" 0.0;
+                visible: 0;
+                min: 1920 1080;
+                fixed: 1 1;
+                color: 100 100 100 128;
+                rel1 {relative: 0.0 0.0; }
+                rel2 {relative: 1.0 1.0; }
+            }
+            description {
+                state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+            part {
+                name: "popup";
+                type: SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 0;
+                    min: 0 0;
+                    max: 700 800;
+                    align: 0.5 0.5;
+                    rel1 { relative: 0.0 0.0; to: "web_view";}
+                    rel2 { relative: 1.0 1.0; to: "web_view";}
+                    fixed: 1 1;
+                }
+                description {
+                    state: "visible" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                    max: 1920 1080;
+                }
+            }
+        }
+    }
+    programs {
+        program {
+            name: "shiftright_uribar";
+            signal: "shiftright_uri";
+            source: "ui";
+            action: STATE_SET "moveright" 0.0;
+            target: "uri_entry";
+        }
+        program {
+            name: "shiftback_uribar";
+            signal: "shiftback_uri";
+            source: "ui";
+            action: STATE_SET "default" 0.0;
+            target: "uri_entry";
+        }
+        program {
+            name: "hide_progress";
+            signal: "hide_progressbar_bg";
+            source: "ui";
+            action: STATE_SET "default" 0.0;
+            target: "progress_bar_light_bg";
+        }
+        program {
+            name: "show_progress";
+            signal: "show_progressbar_bg";
+            source: "ui";
+            action: STATE_SET "visible" 0.0;
+            target: "progress_bar_light_bg";
+        }
+        program {
+            name: "show_popup";
+            signal: "elm,state,show";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            transition: LINEAR 0.0;
+            target: "popup";
+            target: "popup_bg";
+        }
+        program {
+            name: "hide_popup";
+            signal: "elm,state,hide";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            transition: LINEAR 0.0;
+            target: "popup";
+            target: "popup_bg";
+        }
+    }
+}
+}
diff --git a/services/WebPageUI/images/btn_bar_back_nor.png b/services/WebPageUI/images/btn_bar_back_nor.png
new file mode 100644 (file)
index 0000000..e4e7da9
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_back_nor.png differ
diff --git a/services/WebPageUI/images/btn_bar_forward_nor.png b/services/WebPageUI/images/btn_bar_forward_nor.png
new file mode 100644 (file)
index 0000000..ef0b78d
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_forward_nor.png differ
diff --git a/services/WebPageUI/images/btn_bar_manager_nor.png b/services/WebPageUI/images/btn_bar_manager_nor.png
new file mode 100644 (file)
index 0000000..3a96d3c
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_manager_nor.png differ
diff --git a/services/WebPageUI/images/btn_bar_more_nor.png b/services/WebPageUI/images/btn_bar_more_nor.png
new file mode 100644 (file)
index 0000000..f51cb54
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_more_nor.png differ
diff --git a/services/WebPageUI/images/btn_bar_reload_nor.png b/services/WebPageUI/images/btn_bar_reload_nor.png
new file mode 100644 (file)
index 0000000..7f840cb
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_reload_nor.png differ
diff --git a/services/WebPageUI/images/btn_bar_stop_nor.png b/services/WebPageUI/images/btn_bar_stop_nor.png
new file mode 100644 (file)
index 0000000..c5cdc11
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_stop_nor.png differ
diff --git a/services/WebPageUI/images/btn_bar_vertical_settings.png b/services/WebPageUI/images/btn_bar_vertical_settings.png
new file mode 100644 (file)
index 0000000..64488c3
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_vertical_settings.png differ
diff --git a/services/WebPageUI/images/round_rectangle_4X4.png b/services/WebPageUI/images/round_rectangle_4X4.png
new file mode 100644 (file)
index 0000000..5a1f51d
Binary files /dev/null and b/services/WebPageUI/images/round_rectangle_4X4.png differ
diff --git a/services/WebPageUI/images/web_browsing_icon_error.png b/services/WebPageUI/images/web_browsing_icon_error.png
new file mode 100644 (file)
index 0000000..3afcd75
Binary files /dev/null and b/services/WebPageUI/images/web_browsing_icon_error.png differ
diff --git a/services/WebPageUI/images/web_shadow.png b/services/WebPageUI/images/web_shadow.png
new file mode 100644 (file)
index 0000000..f9018b0
Binary files /dev/null and b/services/WebPageUI/images/web_shadow.png differ
index 98689db835104e7dd3edac6ea252c74850829305..7900886723acd2a8f2b50c914ef963670411fbcb 100644 (file)
@@ -10,7 +10,7 @@ include(EWebKitHelpers)
 include_directories( ${CMAKE_SOURCE_DIR})
 include_directories( ${CMAKE_SOURCE_DIR}/services/FavoriteService)
 include_directories( ${CMAKE_SOURCE_DIR}/services/SimpleUI)
-include_directories( ${CMAKE_SOURCE_DIR}/services/SimpleURI)
+include_directories( ${CMAKE_SOURCE_DIR}/services/WebPageUI)
 include_directories( ${CMAKE_SOURCE_DIR}/services/WebKitEngineService)
 include_directories( ${CMAKE_SOURCE_DIR}/services/StorageService)
 include_directories( ${CMAKE_SOURCE_DIR}/services/StorageService/Storage/include)
@@ -52,7 +52,7 @@ if(TIZEN_BUILD)
         HistoryService
         PlatformInputManager
         SimpleUI
-        SimpleURI
+        WebPageUI
         StorageService
         WebKitEngineService
         SessionStorage