Support Wayland 25/39025/1 accepted/tizen/tv/20150507.140719 submit/tizen_tv/20150507.085609
authorsungwon2.han <sungwon2.han@samsung.com>
Thu, 7 May 2015 08:52:14 +0000 (17:52 +0900)
committersungwon2.han <sungwon2.han@samsung.com>
Thu, 7 May 2015 08:52:14 +0000 (17:52 +0900)
Change-Id: If63000c1599e5ee1f8627ac2ffb418e564e1e238
Signed-off-by: sungwon2.han <sungwon2.han@samsung.com>
cmake/EFLHelpers.cmake
core/BasicUI/MenuButton.h
core/main.cpp
packaging/org.tizen.browser.spec
services/CMakeLists.txt
services/SimpleUI/CMakeLists.txt
services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h

index 14246086de051ac8ede42b15ff9b82c20f1ad81a..114408a83de934cc653ae9db691e169b86c1d109 100644 (file)
@@ -1,5 +1,11 @@
 #FIXME: Do not use CMAKE_CXX_FLAGS
 
+IF(WAYLAND_SUPPORT)
+        SET(WIN_PKG "ecore-wayland")
+ELSE(WAYLAND_SUPPORT)
+       SET(WIN_PKG "ecore-x")
+ENDIF(WAYLAND_SUPPORT)
+
 include(FindPkgConfig)
 
 SET(_efl_pkgs_list
@@ -12,7 +18,7 @@ SET(_efl_pkgs_list
     ecore-input
     ecore-imf
     edje
-    ecore-x
+    ${WIN_PKG}
     )
 
 pkg_check_modules(_efl_pkgs REQUIRED "${_efl_pkgs_list}")
index fa3c1cc6347c66b38876ba33ff3e8cd150551d32..1d9d977f3985c684b72bc3ffb1d7378439c887fb 100644 (file)
@@ -22,7 +22,6 @@
 #include <memory>
 #include <Elementary.h>
 #include <Ecore.h>
-#include <Ecore_X.h>
 #include <Edje.h>
 #include <Evas.h>
 #include <string>
index 18f1e11cf7c7900cdf94889a7aa5c94bc6451365..03edda88bb1433077ce40ee0b952dfbe599aee90 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "BrowserLogger.h"
 #include <Ecore.h>
-#include <Ecore_X.h>
 #include <Edje.h>
 #include <Elementary.h>
 #include <stdexcept>
index 0e1111ae26a899925a6de5e3045837308b627abd..ffbba3b3d039c414ca3950a56777165eeb671e27 100644 (file)
@@ -8,29 +8,33 @@ Source0:    %{name}-%{version}.tar.gz
 
 # Excluded tizen v3.0 wayland on tv profile build
 # TODO: Please remove following code block once wayland build is supported.
+#%if "%{?_with_wayland}" == "1"
+#ExcludeArch: armv7l i586 i686 x86_64 aarch64
+#%endif
+
 %if "%{?_with_wayland}" == "1"
-ExcludeArch: armv7l i586 i686 x86_64 aarch64
+BuildRequires: pkgconfig(ecore-wayland)
+%else
+BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(utilX)
 %endif
 
 BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(ecore-evas)
 BuildRequires:  pkgconfig(ecore-imf)
 BuildRequires:  pkgconfig(ecore-input)
-BuildRequires:  pkgconfig(ecore-x)
 BuildRequires:  pkgconfig(edje)
 BuildRequires:  pkgconfig(eeze)
 BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(embryo)
 BuildRequires:  pkgconfig(evas)
-#BuildRequires:  pkgconfig(ewebkit2)
 BuildRequires:  pkgconfig(chromium-efl)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-network-connection)
 BuildRequires:  pkgconfig(libpng)
 BuildRequires:  pkgconfig(libcurl)
-BuildRequires:  pkgconfig(utilX)
 BuildRequires: browser-provider-devel
 
 BuildRequires:  cmake
@@ -46,7 +50,6 @@ BuildRequires:  boost-system
 BuildRequires:  boost-test
 %endif
 %ifarch armv7l
-#BuildRequires:  pkgconfig(ewebkit2)
 BuildRequires:  pkgconfig(chromium-efl)
 BuildRequires: pkgconfig(dlog)
 %endif
@@ -80,7 +83,12 @@ cmake .. \
     -DMANIFESTDIR=%{_manifestdir} \
     -DICONDIR=%{_icondir} \
     -DBUILD_UT=%{BUILD_UT} \
-    -DCOVERAGE_STATS=%{COVERAGE_STATS}
+    -DCOVERAGE_STATS=%{COVERAGE_STATS} \
+%if "%{?_with_wayland}" == "1"
+    -DWAYLAND_SUPPORT=On
+%else
+    -DWAYLAND_SUPPORT=Off
+%endif
 
 make %{!?verbose_make}%{?verbose_make:VERBOSE=1} -j%{?jobs}%{!?jobs:1}
 
index 89525385a54f8c03315bee9faf4a06b7a5b802d5..d4b8ddc491277dd227f1a20cabf51f3b00ed38fe 100644 (file)
@@ -6,6 +6,6 @@ add_subdirectory(SimpleUI)
 add_subdirectory(SimpleURI)
 add_subdirectory(StorageService)
 add_subdirectory(HistoryService)
-add_subdirectory(PlatformInputManager)
+#add_subdirectory(PlatformInputManager)
 add_subdirectory(SessionStorage)
 add_subdirectory(BookmarkService)
index 6539054d924462cc6fe76d54eb696e3fc34df28b..96fe02ca84981c048106ce495d807df11b270f46 100644 (file)
@@ -46,7 +46,7 @@ include_directories(${CMAKE_SOURCE_DIR}/services/StorageService/Storage/include)
 include_directories(${CMAKE_SOURCE_DIR}/services/FavoriteService)
 include_directories(${CMAKE_SOURCE_DIR}/services/HistoryService)
 include_directories(${CMAKE_SOURCE_DIR}/services/BookmarksUI)
-include_directories(${CMAKE_SOURCE_DIR}/services/PlatformInputManager)
+#include_directories(${CMAKE_SOURCE_DIR}/services/PlatformInputManager)
 include_directories(${CMAKE_SOURCE_DIR}/services/SessionStorage)
 
 include(FindPkgConfig)
@@ -59,13 +59,13 @@ add_dependencies(${PROJECT_NAME} SimpleURI)
 add_dependencies(${PROJECT_NAME} StorageService)
 add_dependencies(${PROJECT_NAME} HistoryService)
 add_dependencies(${PROJECT_NAME} BookmarksUI)
-add_dependencies(${PROJECT_NAME} PlatformInputManager)
+#add_dependencies(${PROJECT_NAME} PlatformInputManager)
 add_dependencies(${PROJECT_NAME} SessionStorage)
 target_link_libraries(${PROJECT_NAME} SimpleURI)
 target_link_libraries(${PROJECT_NAME} StorageService)
 target_link_libraries(${PROJECT_NAME} HistoryService)
 target_link_libraries(${PROJECT_NAME} BookmarksUI)
-target_link_libraries(${PROJECT_NAME} PlatformInputManager)
+#target_link_libraries(${PROJECT_NAME} PlatformInputManager)
 target_link_libraries(${PROJECT_NAME} SessionStorage)
 target_link_libraries(${PROJECT_NAME} ${EFL_LDFLAGS})
 
index 08fc80e0d7f68c43470d4c130446694ff0f140d3..60c807a094b9a7fc37d77dbd2b32f50f0d38bea5 100644 (file)
@@ -27,7 +27,6 @@
 #include <algorithm>
 #include <Elementary.h>
 #include <Ecore.h>
-#include <Ecore_X.h>
 #include <Edje.h>
 #include <Evas.h>
 #include "Config.h"
@@ -71,6 +70,8 @@ SimpleUI::SimpleUI(/*Evas_Object *window*/)
 {
     elm_init(static_cast<int>(NULL), static_cast<char**>(NULL));
     Evas_Object *main_window = elm_win_util_standard_add("browserApp", "browserApp");
+    if (main_window == NULL)
+        BROWSER_LOGE("Failed to create main window");
 //    m_zoomList = NULL;
     setMainWindow(main_window);
 }
@@ -110,11 +111,11 @@ int SimpleUI::exec(const std::string& _url)
             elm_win_alpha_set(m_window.get(), EINA_FALSE);
 
             // creatin main window
-            int width = 0;
-            int height = 0;
-            ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
-            evas_object_move(m_window.get(), 0, 0);
-            evas_object_resize(m_window.get(), width, height);
+            //int width = 1920;
+            //int height = 1080;
+            //ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+            //evas_object_move(m_window.get(), 0, 0);
+            //evas_object_resize(m_window.get(), width, height);
 
             // create main layout
             m_mainLayout = elm_layout_add(m_window.get());
@@ -191,7 +192,7 @@ int SimpleUI::exec(const std::string& _url)
                 (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.historyservice"));
             M_ASSERT(m_historyService);
 
-
+/*
             // Platforminputmanager
             BROWSER_LOGD("[%s:%d] service: platforminputmanager ", __PRETTY_FUNCTION__, __LINE__);
             m_platformInputManager =
@@ -201,7 +202,7 @@ int SimpleUI::exec(const std::string& _url)
             M_ASSERT(m_platformInputManager);
             m_platformInputManager->init(m_window.get());
             m_platformInputManager->returnPressed.connect(boost::bind(&elm_exit));
-
+*/
             createActions();
             // left buttons
             leftButtonBar = std::make_shared<ButtonBar>(m_mainLayout, "SimpleUI/LeftButtonBar.edj", "left_button_bar");
@@ -378,13 +379,13 @@ void SimpleUI::createActions()
     m_showSettingsPopup = sharedAction(new Action("Settings"));
     m_showSettingsPopup->setToolTip("Settings");
     m_showSettingsPopup->setIcon("browser/toolbar_setting");
-
+/*
     m_settingPointerMode = sharedAction(new Action("Pointer mode"));
     m_settingPointerMode->setToolTip("Switch to Pointer Mode");
     m_settingPointerMode->setCheckable(true);
     m_settingPointerMode->setChecked(m_platformInputManager->getPointerModeEnabled());
     m_settingPointerMode->setEnabled(true);
-
+*/
     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);
@@ -420,7 +421,7 @@ void SimpleUI::connectActions()
     m_history->triggered.connect(boost::bind(&SimpleUI::showHistory, this));
     m_showSettingsPopup->triggered.connect(boost::bind(&SimpleUI::showSettingsMenu, this));
 
-    m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::services::PlatformInputManager::setPointerModeEnabled, m_platformInputManager.get(), _1));
+//    m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::services::PlatformInputManager::setPointerModeEnabled, m_platformInputManager.get(), _1));
     m_settingPrivateBrowsing->toggled.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, _1));
     m_settingDeleteHistory->triggered.connect(boost::bind(&SimpleUI::settingsDeleteHistory, this));
     m_settingDeleteData->triggered.connect(boost::bind(&SimpleUI::settingsDeleteData, this));;
@@ -598,7 +599,7 @@ void SimpleUI::onBookmarkRemoved(const std::string& uri)
     webTitleBar->removeFavIcon();
     webTitleBar->show("Removed from favorites");
 }
-
+/*
 void SimpleUI::onReturnPressed(MenuButton *m)
 {
     BROWSER_LOGD("[%s]", __func__);
@@ -607,7 +608,7 @@ void SimpleUI::onReturnPressed(MenuButton *m)
     hidePopup.disconnect_all_slots();
     m->hidePopup();
 }
-
+*/
 void SimpleUI::backEnable(bool enable)
 {
     m_back->setEnabled(enable);
@@ -698,9 +699,10 @@ void SimpleUI::loadFinished()
                                                                                                 m_webEngine->getFavicon()));
         m_history->setEnabled(true);
     }
-
+/*
     if(!m_platformInputManager->getPointerModeEnabled())
         elm_object_focus_set(leftButtonBar->getButton("refresh_stop_button"), EINA_TRUE);
+*/
 }
 
 void SimpleUI::loadError()
@@ -813,9 +815,9 @@ void SimpleUI::showZoomMenu()
     m_zoomList->setZoom(currentZoomType);
     BROWSER_LOGD("Current zoom factor from webkit %d%%", m_webEngine->getZoomFactor());
 
-    m_platformInputManager->returnPressed.disconnect_all_slots();
-    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
-    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
+//    m_platformInputManager->returnPressed.disconnect_all_slots();
+//    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
+//    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
     m_zoomList->showPopup();
 }
 
@@ -834,13 +836,13 @@ void SimpleUI::showTabMenu()
         m_tabList->tabClicked.connect(boost::bind(&SimpleUI::tabClicked, this, _1));
         m_tabList->tabDelete.connect(boost::bind(&SimpleUI::closeTab, this, _1));
 
-        m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get()));
-        m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get()));
-        m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get()));
+//        m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get()));
+//        m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get()));
+//        m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get()));
     }
-    m_platformInputManager->returnPressed.disconnect_all_slots();
-    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
-    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
+//    m_platformInputManager->returnPressed.disconnect_all_slots();
+//    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
+//    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
     m_tabList->addItems(m_webEngine->getTabContents());
     m_tabList->setCurrentTabId(m_webEngine->currentTabId());
     m_tabList->disableNewTabBtn(m_tabList->getItemcCount() >= m_tabLimit);
@@ -948,9 +950,9 @@ void SimpleUI::showSettingsMenu()
         m_settings->addAction( m_settingDeleteFavorite);
         m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::base_ui::Settings::setPointerModeEnabled, m_settings.get(), _1));
     }
-    m_platformInputManager->returnPressed.disconnect_all_slots();
-    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
-    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
+//    m_platformInputManager->returnPressed.disconnect_all_slots();
+//    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
+//    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
     m_settingDeleteHistory->setEnabled(m_historyService->getHistoryItemsCount());
     m_settingDeleteFavorite->setEnabled(m_favoriteService->countBookmarksAndSubFolders());
     m_settings->showPopup();
@@ -965,13 +967,13 @@ void SimpleUI::showHistory()
         m_historyList->deleteHistoryItem.connect(boost::bind(&tizen_browser::services::HistoryService::clearURLHistory, m_historyService.get(),_1));
         m_historyList->deleteHistoryItem.connect(boost::bind(&SimpleUI::hideHistory, this));
 
-        m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get()));
-        m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get()));
-        m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get()));
+//        m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get()));
+//        m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get()));
+//        m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get()));
     }
-    m_platformInputManager->returnPressed.disconnect_all_slots();
-    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
-    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
+//    m_platformInputManager->returnPressed.disconnect_all_slots();
+//    m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
+//    hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
     m_historyList->addItems(m_historyService->getHistoryItems());
     m_historyList->showPopup();
 }
index 8be19b7dbf0e8aff1874ebad475c2b1c29c81923..296730a206b652a5a38da7339ea94b86052acd6a 100644 (file)
@@ -43,7 +43,7 @@
 #include "SimpleURI.h"
 #include "SimpleScroller.h"
 #include "WebTitleBar.h"
-#include "PlatformInputManager.h"
+//#include "PlatformInputManager.h"
 #include "SessionStorage.h"
 #include "SqlStorage.h"
 
@@ -257,7 +257,7 @@ private:
     std::shared_ptr<tizen_browser::base_ui::ZoomList> m_zoomList;
     std::shared_ptr<tizen_browser::base_ui::TabList> m_tabList;
     std::shared_ptr<tizen_browser::base_ui::SearchBox> m_searchBox;
-    std::shared_ptr<tizen_browser::services::PlatformInputManager> m_platformInputManager;
+    //std::shared_ptr<tizen_browser::services::PlatformInputManager> m_platformInputManager;
     std::shared_ptr<tizen_browser::services::SessionStorage> m_sessionService;
     tizen_browser::Session::Session m_currentSession;
     std::shared_ptr<Settings> m_settings;