Change the user-agent string in order to support desktop browsing 51/9951/4
authorJoone Hur <joone.hur@intel.com>
Wed, 11 Sep 2013 21:33:19 +0000 (14:33 -0700)
committerJoone Hur <joone.hur@intel.com>
Thu, 12 Sep 2013 21:16:37 +0000 (14:16 -0700)
Change-Id: Ieaefeeecf30c41a45ba4ef571454eb82c8a38c31

Tools/MiniBrowser/efl/CMakeLists.txt
Tools/MiniBrowser/efl/main.c

index 3fe6c6b..585362f 100755 (executable)
@@ -19,6 +19,7 @@ SET(MiniBrowser_INCLUDE_DIRECTORIES
     ${EINA_INCLUDE_DIRS}
     ${ELEMENTARY_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
+    ${VConf_INCLUDE_DIRS}
     ${TOOLS_DIR}/EWebLauncher
     ${WEBKIT2_DIR}/UIProcess/API/efl
     ${WEBKIT2_DIR}
@@ -45,6 +46,7 @@ SET(MiniBrowser_LIBRARIES
     ${OPENGL_LIBRARIES}
     ${SQLITE_LIBRARIES}
     ${GLES20_LIBRARIES}
+    ${VConf_LIBRARIES}
 )
 
 IF (ENABLE_GLIB_SUPPORT)
index 699390a..2452fa3 100755 (executable)
@@ -24,6 +24,7 @@
 #include <Eina.h>
 #include <Elementary.h>
 #include <Evas.h>
+#include <vconf.h>
 
 static const int DEFAULT_WIDTH = 800;
 static const int DEFAULT_HEIGHT = 600;
@@ -504,6 +505,12 @@ static Browser_Window *window_create(const char *url)
     /* set a file containing certificates for recognized SSL Certificate Authorities */
     ewk_context_certificate_file_set(ewk_context_default_get(), "/var/lib/ca-certificates/ca-bundle.pem");
 
+    const char* userAgentString = vconf_get_str("db/browser/user_agent/user_agent_profile_desktop");
+    if (userAgentString)
+        ewk_view_user_agent_set(app_data->webview, userAgentString);
+    else
+        ewk_view_user_agent_set(app_data->webview, "Mozilla/5.0 (Linux; Tizen 3.0 IVI; sdk) AppleWebKit/537.3 (KHTML, like Gecko) Version/3.0 Safari/537.3");
+
 //    Ewk_Settings *settings = ewk_view_settings_get(app_data->webview);
 //    ewk_settings_file_access_from_file_urls_allowed_set(settings, EINA_TRUE);
 //    ewk_settings_enable_frame_flattening_set(settings, frame_flattening_enabled);