Add incognito screen and icon to the url bar 35/49735/6
authorKamil Nowac <k.nowac@samsung.com>
Thu, 15 Oct 2015 11:03:20 +0000 (13:03 +0200)
committerKamil Nowa? <k.nowac@samsung.com>
Tue, 20 Oct 2015 09:39:35 +0000 (02:39 -0700)
[Issue] https://bugs.tizen.org/jira/browse/TT-185
[Problem] Incognito screen and icons are not implemented
[Solution] Added screen and icons
[Verification]
1. Open incognito tab
Incognito start screen and incognito icon should be
visible in the url bar

Change-Id: I18cf592433ebedd5e6a85b1b5d7809f1e4802562

15 files changed:
core/AbstractWebEngine/AbstractWebEngine.h
services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h
services/WebKitEngineService/WebKitEngineService.cpp
services/WebKitEngineService/WebKitEngineService.h
services/WebKitEngineService/WebView.cpp
services/WebKitEngineService/WebView.h
services/WebPageUI/CMakeLists.txt
services/WebPageUI/WebPageUI.cpp
services/WebPageUI/WebPageUI.h
services/WebPageUI/edc/PrivateMode.edc [new file with mode: 0644]
services/WebPageUI/edc/URIEntry.edc
services/WebPageUI/edc/WebPageUI.edc
services/WebPageUI/images/btn_bar_incognito.png [new file with mode: 0644]
services/WebPageUI/images/ic_text_form.png [new file with mode: 0644]

index 22e9c55e62bad44775bcb59c17f6ca8b5280dab1..554c11539827ae10f55f81224002b7938f45bb84 100644 (file)
@@ -198,8 +198,30 @@ public:
      */
     virtual void setPrivateMode(bool) = 0;
 
+    /**
+     * Set the state of private mode for a specific tab
+     *
+     * \param id of snapshot
+     * \param state to set
+     */
+    virtual void setPrivateMode(const TabId&, bool) = 0;
+
+    /**
+     * Get the state of private mode
+     */
     virtual bool isPrivateMode() const = 0;
 
+    /**
+     * Get the state of private mode for a specific tab
+     *
+     * /param id of snapshot
+     * /return state of private mode where:
+     *     -1 is "Not set"
+     *      0 is "False"
+     *      1 is "True"
+     */
+    virtual int isPrivateMode(const TabId&) = 0;
+
     virtual bool isLoadError() const = 0;
 
     /**
index bf026799b3cadb00d3d7ccf54ef52e16cbada13f..084de51c41693aaf3259cf16eaf50d5eb900c8a9 100644 (file)
@@ -71,6 +71,7 @@ SimpleUI::SimpleUI()
     , m_initialised(false)
     , m_wvIMEStatus(false)
     , m_ewkContext(ewk_context_new())
+    , m_incognito(false)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     elm_init(0, nullptr);
@@ -245,6 +246,7 @@ void SimpleUI::connectUISignals()
     m_webPageUI->reloadPage.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine<Evas_Object>::reload, m_webEngine.get()));
     m_webPageUI->showQuickAccess.connect(boost::bind(&SimpleUI::showQuickAccess, this));
     m_webPageUI->hideQuickAccess.connect(boost::bind(&QuickAccess::hideUI, m_quickAccess));
+    m_webPageUI->bookmarkManagerClicked.connect(boost::bind(&SimpleUI::showBookmarkManagerUI, this));
 
 
     M_ASSERT(m_quickAccess.get());
@@ -258,9 +260,11 @@ void SimpleUI::connectUISignals()
     M_ASSERT(m_tabUI.get());
     m_tabUI->closeTabUIClicked.connect(boost::bind(&SimpleUI::closeTabUI, this));
     m_tabUI->newTabClicked.connect(boost::bind(&SimpleUI::newTabClicked, this));
+    m_tabUI->newTabClicked.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, false));
     m_tabUI->tabClicked.connect(boost::bind(&SimpleUI::tabClicked, this,_1));
     m_tabUI->closeTabsClicked.connect(boost::bind(&SimpleUI::closeTabsClicked, this,_1));
-    m_tabUI->newIncognitoTabClicked.connect(boost::bind(&SimpleUI::newTabClicked, this));
+    m_tabUI->newIncognitoTabClicked.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, true));
+    m_tabUI->newIncognitoTabClicked.connect(boost::bind(&SimpleUI::switchViewToIncognitoPage, this));
     m_tabUI->tabsCount.connect(boost::bind(&SimpleUI::tabsCount, this));
 
     M_ASSERT(m_historyUI.get());
@@ -471,6 +475,16 @@ void SimpleUI::switchViewToQuickAccess()
     m_viewManager->popStackTo(m_webPageUI.get());
 }
 
+void SimpleUI::switchViewToIncognitoPage()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    M_ASSERT(m_viewManager);
+    m_webPageUI->toIncognito(m_incognito);
+    m_webPageUI->switchViewToIncognitoPage();
+    m_webEngine->disconnectCurrentWebViewSignals();
+    m_viewManager->popStackTo(m_webPageUI.get());
+}
+
 void SimpleUI::checkTabId(const tizen_browser::basic_webengine::TabId& id){
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     if(m_webEngine->currentTabId() != id || isErrorPageActive()){
@@ -482,7 +496,9 @@ void SimpleUI::checkTabId(const tizen_browser::basic_webengine::TabId& id){
 void SimpleUI::openNewTab(const std::string &uri, bool desktopMode)
 {
     BROWSER_LOGD("[%s:%d] uri =%s", __PRETTY_FUNCTION__, __LINE__, uri.c_str());
-    switchToTab(m_webEngine->addTab(uri, nullptr, desktopMode));
+    tizen_browser::basic_webengine::TabId tab = m_webEngine->addTab(uri, nullptr, desktopMode);
+    applyPrivateModeToTab(tab);
+    switchToTab(tab);
 }
 
 void SimpleUI::closeTab()
@@ -738,6 +754,7 @@ void SimpleUI::tabClicked(const tizen_browser::basic_webengine::TabId& tabId)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     m_viewManager->popStackTo(m_webPageUI.get());
+    applyPrivateModeToTab(tabId);
     switchToTab(tabId);
 }
 
@@ -940,8 +957,18 @@ void SimpleUI::closeBookmarkManagerUI()
 void SimpleUI::settingsPrivateModeSwitch(bool newState)
 {
     BROWSER_LOGD("%s: Setting Private mode to: %s", __func__, (newState ? "true" : "false"));
-    m_webEngine->setPrivateMode(newState);
-    BROWSER_LOGD("[%s:%d] webEngine private mode: %s", __PRETTY_FUNCTION__, __LINE__, (m_webEngine->isPrivateMode() ? "true" : "false"));
+    m_incognito = newState;
+}
+
+void SimpleUI::applyPrivateModeToTab(const tizen_browser::basic_webengine::TabId& tabId)
+{
+    if (m_webEngine->isPrivateMode(tabId) < 0) {
+        m_webEngine->setPrivateMode(tabId, m_incognito);
+        m_webPageUI->toIncognito(m_incognito);
+    } else {
+        m_webEngine->setPrivateMode(tabId, m_webEngine->isPrivateMode(tabId));
+        m_webPageUI->toIncognito(m_webEngine->isPrivateMode(tabId));
+    }
 }
 
 void SimpleUI::settingsDeleteSelectedData(const std::string& str)
index 74c425aaaa352577abf1ab7addd9d7b31dffeaf3..5e4ecd46344f3e50c5896f43cf952c5cffb5fbe8 100644 (file)
@@ -104,6 +104,7 @@ private:
 
     void showQuickAccess();
     void switchViewToQuickAccess();
+    void switchViewToIncognitoPage();
     void switchViewToWebPage();
     void updateView();
 
@@ -211,6 +212,7 @@ private:
     void closeTab(const tizen_browser::basic_webengine::TabId& id);
 
     void settingsPrivateModeSwitch(bool newState);
+    void applyPrivateModeToTab(const tizen_browser::basic_webengine::TabId& id);
     void settingsDeleteSelectedData(const std::string& str);
     void settingsResetMostVisited();
     void settingsResetBrowser();
@@ -248,6 +250,7 @@ private:
     int m_tabLimit;
     int m_favoritesLimit;
     bool m_wvIMEStatus;
+    bool m_incognito;
 
     //helper object used to view management
     ViewManager* m_viewManager;
index 923ddf3676e4756e14e0d591dd45548f8e2fe05c..11cd07a4bbcca25d66fa121794ff7ff5999beef4 100644 (file)
@@ -414,6 +414,18 @@ void WebKitEngineService::setPrivateMode(bool state)
         it->second->setPrivateMode(state);
 }
 
+void WebKitEngineService::setPrivateMode(const TabId& id, bool state)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    m_tabs[id]->setPrivateMode(state);
+}
+
+int WebKitEngineService::isPrivateMode(const TabId& id)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    return m_tabs[id]->isPrivateMode();
+}
+
 bool WebKitEngineService::isPrivateMode() const
 {
     return m_privateMode;
index ed1fc6ddf71c44bfa198d51c62b76767b6fe8096..00ec6c7926eda9a8811607ff806b619ebdb9e410 100644 (file)
@@ -108,8 +108,20 @@ public:
     std::shared_ptr<tizen_browser::tools::BrowserImage> getSnapshotData(TabId id, int width, int height);
 
     void setPrivateMode(bool);
+    void setPrivateMode(const TabId& id, bool state);
     bool isPrivateMode() const;
 
+    /**
+     * @brief Get the state of private mode for a specific tab
+     *
+     * @param id of snapshot
+     * @return state of private mode where:
+     *     -1 is "Not set"
+     *      0 is "False"
+     *      1 is "True"
+     */
+    int isPrivateMode(const TabId& id);
+
 
     /**
      * @brief Check if current tab has load error.
index 33170c5e6680b1c1b013055180f3cb57f1f57f3c..bb42ec7f990f878fc9333b0d2cb4c22cc3a80fc5 100644 (file)
@@ -71,6 +71,7 @@ WebView::WebView(Evas_Object * obj, TabId tabId)
     , m_ewkView(nullptr)
     , m_isLoading(false)
     , m_loadError(false)
+    , m_private(-1)
 {
     config.load("whatever");
 }
@@ -292,30 +293,32 @@ void WebView::setPrivateMode(bool state)
 {
     BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
     M_ASSERT(m_ewkView);
-
+    if(m_private < 0){
 #if defined(USE_EWEBKIT)
 #if PLATFORM(TIZEN)
-    Ewk_Settings * settings = ewk_view_settings_get(m_ewkView);
+        Ewk_Settings * settings = ewk_view_settings_get(m_ewkView);
 #else
-    Ewk_Settings * settings = ewk_page_group_settings_get(ewk_view_page_group_get(m_ewkView));
+        Ewk_Settings * settings = ewk_page_group_settings_get(ewk_view_page_group_get(m_ewkView));
 #endif
-    ewk_settings_private_browsing_enabled_set(settings, state);
-    if (m_ewkView)
-    {
-        Ewk_Context *context = ewk_view_context_get(m_ewkView);
-        if (context)
+        ewk_settings_private_browsing_enabled_set(settings, state);
+        if (m_ewkView)
         {
-            if(state)
-            {
-                 ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_NEVER);
-            }
-            else
+            Ewk_Context *context = ewk_view_context_get(m_ewkView);
+            if (context)
             {
-                 ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+                if(state)
+                {
+                    ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_NEVER);
+                }
+                else
+                {
+                    ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+                }
             }
         }
-    }
 #endif
+        m_private = static_cast<unsigned int>(state);
+    }
 }
 
 void WebView::confirmationResult(WebConfirmationPtr confirmation)
index 07fdcdcc8c891b62ae6296eb28d69d17444bb9bd..61f6c68f25774944cd399e3f7b2f9e1ef5391681 100644 (file)
@@ -66,6 +66,16 @@ public:
 
     void setPrivateMode(bool);
 
+    /**
+     * @brief Get the state of private mode
+     *
+     * @return state of private mode where:
+     *     -1 is "Not set"
+     *      0 is "False"
+     *      1 is "True"
+     */
+    int isPrivateMode() {return m_private;}
+
     std::shared_ptr<tizen_browser::tools::BrowserImage> captureSnapshot(int width, int height);
      /**
      * \brief Sets Focus to URI entry.
@@ -213,6 +223,7 @@ private:
     bool m_loadError;
     // true if desktop view is enabled, false if mobile
     bool m_desktopMode;
+    int m_private;
 
     config::DefaultConfig config;
 
index e41051798eb36592ca3774e8987907e0ef2de2c3..ddcb2e97438e2198966f6f3135720d3a1035fabe 100644 (file)
@@ -58,6 +58,7 @@ set(edcFiles
     LeftButtonBar.edc
     RightButtonBar.edc
     URIEntry.edc
+    PrivateMode.edc
     )
 
 foreach(edec ${edcFiles})
index a1456d2b3bf20f30826378d9c8b5aac3e05a9c65..43649b382c2f335b0d075489e5ddc34861a1279c 100644 (file)
@@ -31,9 +31,11 @@ WebPageUI::WebPageUI()
     : m_parent(nullptr)
     , m_mainLayout(nullptr)
     , m_errorLayout(nullptr)
+    , m_privateLayout(nullptr)
     , m_progressBar(nullptr)
     , m_URIEntry(new URIEntry())
     , m_homePageActive(false)
+    , m_bookmarkManagerButton(nullptr)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
 }
@@ -131,6 +133,20 @@ void WebPageUI::setPageTitle(const std::string& title)
      m_URIEntry->setPageTitle(title);
 }
 
+bool WebPageUI::isIncognitoPageActive()
+{
+    return elm_object_part_content_get(m_mainLayout, "web_view") == m_privateLayout;
+}
+
+void WebPageUI::toIncognito(bool incognito)
+{
+    BROWSER_LOGD("[%s:%d,%d] ", __PRETTY_FUNCTION__, __LINE__, incognito);
+    if(incognito)
+        elm_object_signal_emit(m_mainLayout, "incognito,true", "ui");
+    else
+        elm_object_signal_emit(m_mainLayout, "incognito,false", "ui");
+}
+
 void WebPageUI::setMainContent(Evas_Object* content)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -150,6 +166,15 @@ void WebPageUI::switchViewToErrorPage()
     refreshFocusChain();
 }
 
+void WebPageUI::switchViewToIncognitoPage()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_homePageActive = false;
+    setMainContent(m_privateLayout);
+    evas_object_show(m_leftButtonBar->getContent());
+    refreshFocusChain();
+}
+
 void WebPageUI::switchViewToWebPage(Evas_Object* content, const std::string uri, const std::string title)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -212,6 +237,7 @@ void WebPageUI::createLayout()
     elm_layout_file_set(m_mainLayout, edjePath("WebPageUI/WebPageUI.edj").c_str(), "main_layout");
 
     createErrorLayout();
+    createPrivateLayout();
     createActions();
 
     // left buttons
@@ -252,6 +278,29 @@ void WebPageUI::createErrorLayout()
     elm_layout_file_set(m_errorLayout, edjePath("WebPageUI/ErrorMessage.edj").c_str(), "error_message");
 }
 
+void WebPageUI::createPrivateLayout()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_privateLayout =  elm_layout_add(m_mainLayout);
+    evas_object_size_hint_weight_set(m_privateLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(m_privateLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_layout_file_set(m_privateLayout, edjePath("WebPageUI/PrivateMode.edj").c_str(), "inco_message");
+
+    m_bookmarkManagerButton = elm_button_add(m_privateLayout);
+    elm_object_style_set(m_bookmarkManagerButton, "invisible_button");
+    evas_object_smart_callback_add(m_bookmarkManagerButton, "clicked", _bookmark_manager_clicked, this);
+    evas_object_show(m_bookmarkManagerButton);
+
+    elm_object_part_content_set(m_privateLayout, "bookmarkmanager_click", m_bookmarkManagerButton);
+}
+
+void WebPageUI::_bookmark_manager_clicked(void * data, Evas_Object *, void *)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    WebPageUI*  webpageUI = static_cast<WebPageUI*>(data);
+    webpageUI->bookmarkManagerClicked();
+}
+
 void WebPageUI::createActions()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -362,6 +411,7 @@ void WebPageUI::refreshFocusChain()
     elm_object_focus_custom_chain_append(m_mainLayout, m_rightButtonBar->getContent(), NULL);
     if (!m_homePageActive) {
         elm_object_focus_custom_chain_append(m_mainLayout, m_leftButtonBar->getContent(), NULL);
+        elm_object_focus_custom_chain_append(m_mainLayout, m_bookmarkManagerButton, NULL);
     } else {
         m_reload->setEnabled(false);
     }
index de0612f5befb67e5b17280bbba679687c7ef5c67..07a367216a272430f43f968254c38b1775684a02 100644 (file)
@@ -42,9 +42,12 @@ public:
     void progressChanged(double progress);
     void loadFinished();
     bool isErrorPageActive();
+    bool isIncognitoPageActive();
     bool isHomePageActive() { return m_homePageActive; }
+    void toIncognito(bool);
     void switchViewToErrorPage();
     void switchViewToWebPage(Evas_Object* content, const std::string uri, const std::string title);
+    void switchViewToIncognitoPage();
     void switchViewToQuickAccess(Evas_Object* content);
     URIEntry& getURIEntry() const { return *m_URIEntry.get(); }
     void setPageTitle(const std::string& title);
@@ -63,12 +66,14 @@ public:
     boost::signals2::signal<void ()> showMoreMenu;
     boost::signals2::signal<void ()> hideQuickAccess;
     boost::signals2::signal<void ()> showQuickAccess;
+    boost::signals2::signal<void ()> bookmarkManagerClicked;
 
     static void faviconClicked(void* data, Evas_Object* obj, const char* emission, const char* source);
 
 private:
     void createLayout();
     void createErrorLayout();
+    void createPrivateLayout();
     void createActions();
     void connectActions();
     void showProgressBar();
@@ -80,6 +85,8 @@ private:
     std::string edjePath(const std::string& file);
     void refreshFocusChain();
 
+    static void _bookmark_manager_clicked(void * data, Evas_Object *, void *);
+
     // wrappers to call singal as a reaction to other signal
     void backPageConnect() { backPage(); }
     void forwardPageConnect() { forwardPage(); }
@@ -91,7 +98,9 @@ private:
     Evas_Object* m_parent;
     Evas_Object* m_mainLayout;
     Evas_Object* m_errorLayout;
+    Evas_Object* m_privateLayout;
     Evas_Object* m_progressBar;
+    Evas_Object* m_bookmarkManagerButton;
     std::unique_ptr<ButtonBar> m_leftButtonBar;
     std::unique_ptr<ButtonBar> m_rightButtonBar;
     std::unique_ptr<URIEntry> m_URIEntry;
diff --git a/services/WebPageUI/edc/PrivateMode.edc b/services/WebPageUI/edc/PrivateMode.edc
new file mode 100644 (file)
index 0000000..d00fb30
--- /dev/null
@@ -0,0 +1,374 @@
+
+collections {
+    styles {
+        style {
+            name: "message_style";
+            base: "font=Sans font_size=36 color=#676767 wrap=word align=0.5";
+        }
+        style {
+            name: "message_hint_style";
+            base: "font=Sans font_size=28 color=#676767 wrap=word align=0.0";
+        }
+    }
+    group {
+        name: "inco_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;
+                }
+            }
+            part {
+                name: "inco_message_background";
+                type:RECT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    min: 920 356;
+                    max: 920 356;
+                    fixed: 1 1;
+                    align: 0.5 0.5;
+            }
+        }
+        part {
+            name: "inco_dot";
+            images {
+                image: "ic_text_form.png" COMP;
+            }
+            type: "IMAGE";
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                min: 20 28;
+                max: 20 28;
+                align: 0 0;
+                image.normal: "ic_text_form.png";
+                rel1 {
+                    offset:  0 100;
+                    relative: 0 0;
+                    to: "inco_message_background";
+                }
+                rel2 {
+                    relative: 1 1;
+                    to: "inco_message_background";
+                }
+            }
+        }
+        part {
+            name: "inco_dot2";
+            images {
+                image: "ic_text_form.png" COMP;
+            }
+            type: "IMAGE";
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                min: 20 28;
+                max: 20 28;
+                align: 0 0;
+                image.normal: "ic_text_form.png";
+                rel1 {
+                    offset:  0 216;
+                    relative: 0 0;
+                    to: "inco_message_background";
+                }
+                rel2 {
+                    relative: 1 1;
+                    to: "inco_message_background";
+                }
+            }
+        }
+        part {
+            name: "inco_dot3";
+            images {
+                image: "ic_text_form.png" COMP;
+            }
+            type: "IMAGE";
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                min: 20 28;
+                max: 20 28;
+                align: 0 0;
+                image.normal: "ic_text_form.png";
+                rel1 {
+                    offset:  0 298;
+                    relative: 0 0;
+                    to: "inco_message_background";
+                }
+                rel2 {
+                    relative: 1 1;
+                    to: "inco_message_background";
+                }
+            }
+        }
+        part {
+            name: "inco_text";
+            type: TEXTBLOCK;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                min: 864 36;
+                max: 864 36;
+                align: 0.5 0;
+                color: 103 103 103 255;
+                rel1 {
+                    relative: 0 0;
+                    to: "inco_message_background";
+                }
+                rel2 {
+                    relative: 1 1;
+                    to: "inco_message_background";
+                }
+                text {
+                    min: 0 1;
+                    max: 0 1;
+                    style: "message_style";
+                    text: "Start Incognito Browsing";
+                }
+            }
+        }
+        part {
+            name: "inco_hint";
+            type: TEXTBLOCK;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 0 1;
+                min: 864 68;
+                max: 864 68;
+                color: 103 103 103 179;
+                align: 0 0;
+                rel1 {
+                    relative: 0 0;
+                    offset:  28 90;
+                    to_y: "inco_message_background";
+                    to_x: "inco_dot";
+                }
+                rel2 {
+                    relative: 1 1;
+                    to_y: "inco_message_background";
+                }
+                text {
+                    min: 0 1;
+                    max: 0 1;
+                    style: "message_hint_style";
+                    text: "You can browse internet in incognito tabs without any traces including browsing history, cookie or search history.";
+                }
+            }
+        }
+        part {
+            name: "inco_hint2";
+            type: TEXTBLOCK;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                min: 864 28;
+                max: 864 28;
+                color: 103 103 103 179;
+                align: 0.0 0;
+                rel1 {
+                    relative: 0 0;
+                    offset:  28 206;
+                    to_y: "inco_message_background";
+                    to_x: "inco_dot2";
+                }
+                rel2 {
+                    relative: 1 1;
+                    to_y: "inco_message_background";
+                }
+                text {
+                    min: 0 1;
+                    max: 0 1;
+                    style: "message_hint_style";
+                    text: "Bookmarks or downloaded files will not be removed.";
+                }
+            }
+        }
+        part {
+            name: "inco_hint3";
+            type: TEXTBLOCK;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                min: 864 68;
+                max: 864 68;
+                color: 103 103 103 179;
+                align: 0.0 0;
+                rel1 {
+                    relative: 0 0;
+                    offset:  28 288;
+                    to_y: "inco_message_background";
+                    to_x: "inco_dot3";
+                }
+                rel2 {
+                    relative: 1 1;
+                    to_y: "inco_message_background";
+                }
+                text {
+                    min: 0 1;
+                    max: 0 1;
+                    style: "message_hint_style";
+                    text: "You can not remove traces from your employer, internet service provider or websites you visit even you go incognito.";
+                }
+            }
+        }
+        part {
+            name: "bookmarkmanager_button";
+            scale:1;
+            mouse_events: 1;
+            type: RECT;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                align: 0.5 1.0;
+                min: 348 65;
+                max: 348 65;
+                color: 192 192 192 255;
+                rel1 { relative: 0.0 0.0; to: "message_background";}
+                rel2 { relative: 1.0 1.0; to: "message_background"; offset: 0 -60;}
+            }
+            description {
+                state: "highlight" 0.0;
+                inherit: "default" 0.0;
+                color_class: focusBgColor;
+                visible: 1;
+            }
+            description {
+                state: "focus" 0.0;
+                inherit: "default" 0.0;
+                color_class: focusbtBgColor;
+                visible: 1;
+            }
+        }
+        part {
+            name: "bookmarkmanager_text";
+            type: TEXT;
+            scale: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                rel1 { relative: 0.0 0.0;to: "bookmarkmanager_button";}
+                rel2 { relative: 1.0 1.0;to: "bookmarkmanager_button";}
+                color: 0 0 0 255;
+                text {
+                    text: "Bookmark Manager";
+                    font: "Sans";
+                    size: 27;
+                    align: 0.5 0.5;
+                }
+            }
+        }
+        part {
+            name: "bookmarkmanager_over";
+            scale:1;
+            type: SWALLOW;
+            mouse_events: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                align: 0 0;
+                fixed: 1 1;
+                min: 348 65;
+                max: 348 65;
+                rel1 { relative: 0.0 0.0; to: "bookmarkmanager_button";}
+                rel2 { relative: 1.0 1.0; to: "bookmarkmanager_button";}
+                color_class: transparent;
+            }
+        }
+        part {
+            name: "bookmarkmanager_click";
+            scale:1;
+            type: SWALLOW;
+            mouse_events: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                align: 0 0;
+                fixed: 1 1;
+                min: 348 65;
+                max: 348 65;
+                rel1 { relative: 0.0 0.0; to: "bookmarkmanager_over";}
+                rel2 { relative: 1.0 1.0; to: "bookmarkmanager_over";}
+            }
+        }
+    }//parts
+    programs{
+        program {
+            name: "mouse_click_bookmarkmanager";
+            signal: "mouse,clicked,1";
+            source: "bookmarkmanager_over";
+            script {
+              emit("elm,action,click", "");
+            }
+        }
+        program {
+            name: "mouse_in_bookmarkmanager_click";
+            signal: "mouse,in";
+            source: "bookmarkmanager_*";
+            action: STATE_SET "highlight" 0.0;
+            target: "bookmarkmanager_button";
+            target: "bookmarkmanager_over";
+            target: "bookmarkmanager_text";
+        }
+        program {
+            name: "mouse_out_bookmarkmanager_click";
+            signal: "mouse,out";
+            source: "bookmarkmanager_*";
+            action: STATE_SET "default" 0.0;
+            target: "bookmarkmanager_button";
+            target: "bookmarkmanager_over";
+            target: "bookmarkmanager_text";
+        }
+    }
+}
+
+group {
+    name: "elm/button/base/invisible_button";
+    parts {
+        part {
+            name: "button";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                color: 0 0 0 0;
+            }
+        }
+        part {
+            name: "over";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                rel1 { relative: 0.0 0.0;to: "button";}
+                rel2 { relative: 1.0 1.0;to: "button";}
+                color: 0 0 0 0;
+            }
+        }
+    }
+    programs {
+        program {
+            name: "mouse_click";
+            signal: "mouse,clicked,1";
+            source: "over";
+            script {
+                emit("elm,action,click", "");
+            }
+        }
+    }
+}
+
index f3f1da05fdd2afc24ff2ddedbc224f8790240671..0eae9496def614aa0a713223248e0839ee120803 100644 (file)
@@ -125,6 +125,7 @@ collections {
                 source: "elm/entry/selection/browser_entry";
                 source4: "elm/entry/cursor/browser_entry";
                 description {
+                    max: 1378 82;
                     state: "default" 0.0;
                     rel1.relative: 0.0 0.0;
                     rel2.relative: 1.0 1.0;
index 13983f4f76369193ea17d4fc106079f671eeb15d..ae1edaf6ec198b8dd328573fbb76cdc0fd6278b5 100644 (file)
@@ -21,6 +21,7 @@ collections {
         name: "main_layout";
         images {
             image: "web_shadow.png" COMP;
+            image: "btn_bar_incognito.png" COMP;
         }
         parts {
             part {
@@ -167,6 +168,33 @@ collections {
                 rel2 { relative: 1.0 1.0; }
             }
         }
+        part {
+            name: "incognito";
+            type: IMAGE;
+            repeat_events: 1;
+            scale: 1;
+            description {
+                state: "default" 0.0;
+                visible: 0;
+                rel1 {
+                    relative: 0.0 0.0;
+                    to: "uri_bar_bg";
+                    offset: 1623 0;
+                }
+                rel2 {
+                    relative: 0.0 0.0;
+                    to: "uri_bar_bg";
+                    offset: 1623+82 0+102;
+                }
+                align: 0.5 0.5;
+                image.normal: "btn_bar_incognito.png";
+            }
+            description {
+                state: "visible" 1.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
         part {
             name: "progress_bar";
             type: SWALLOW;
@@ -295,6 +323,20 @@ collections {
             action: STATE_SET "visible" 0.0;
             target: "progress_bar_light_bg";
         }
+        program {
+            name: "show_incognito_ico";
+            signal: "incognito,true";
+            source: "ui";
+            action: STATE_SET "visible" 1.0;
+            target: "incognito";
+        }
+        program {
+            name: "hide_incognito_ico";
+            signal: "incognito,false";
+            source: "ui";
+            action: STATE_SET "default" 0.0;
+            target: "incognito";
+        }
         program {
             name: "show_popup";
             signal: "elm,state,show";
diff --git a/services/WebPageUI/images/btn_bar_incognito.png b/services/WebPageUI/images/btn_bar_incognito.png
new file mode 100644 (file)
index 0000000..1f5d11c
Binary files /dev/null and b/services/WebPageUI/images/btn_bar_incognito.png differ
diff --git a/services/WebPageUI/images/ic_text_form.png b/services/WebPageUI/images/ic_text_form.png
new file mode 100644 (file)
index 0000000..af49e26
Binary files /dev/null and b/services/WebPageUI/images/ic_text_form.png differ