namespace {
-const char *SCHEME_TYPE_HTTP = "http";
-const char *SCHEME_TYPE_HTTPS = "https";
-
const char *GEOLOCATION_DEV_CAP = "geolocation.position";
const char *GEOLOCATION_PARAM_NAME = "param:enableHighAccuracy";
const char *GEOLOCATION_PARAM_VALUE = "true";
char const * const SCHEME_TYPE_FILE = "file";
char const * const SCHEME_TYPE_WIDGET = "widget";
-const char *SCHEME_TYPE_HTTP = "http";
-const char *SCHEME_TYPE_HTTPS = "https";
-
char const * const WARP_ERROR_MSG =
"file:///usr/etc/wrt/warp_security_error.msg";
char const * const PARAM_URL = "param:url";
m_scale(0),
m_encodedBundle(""),
m_theme(""),
- m_resDec(NULL),
m_encrypted(false),
+ m_resDec(NULL),
m_widgetType(WrtDB::APP_TYPE_UNKNOWN)
{
WrtDB::WrtDatabase::attachToThreadRO();
0, /* willDestroyGlobalObjectForDOMWindowExtension */
0, /* didFinishProgress */
0, /* shouldForceUniversalAccessFromLocalURL */
+ 0, /* didReceiveIntentForFrame */
+ 0, /* registerIntentServiceForFrame */
};
WKBundlePageSetPageLoaderClient(page, &loaderClient);
LogDebug("willSendReq got " << toString(request).c_str());
WKURLRef url = WKURLRequestCopyURL(request);
WKStringRef urlStr = WKURLCopyString(url);
- WKTypeRef retVal = NULL;
bool is_xhr = true; // Webkit should inform if it's XHR
DPL::String dplurl = DPL::FromUTF8String(toString(urlStr));
return std::string();
}
- fread(contents, sizeof(unsigned char), buf.st_size, fp);
+ size_t ret = fread(contents, sizeof(unsigned char), buf.st_size, fp);
+ if (ret < static_cast<size_t>(buf.st_size) ){
+ LogDebug("Couldnot read file : " << filePath);
+ fclose(fp);
+ return std::string();
+ }
+
fclose(fp);
LogDebug("resource is encrypted. decrypting....");
&Bundle::didReceiveMessageCallback
};
WKBundleSetClient(bundle, &client);
- }
+}
}
LogInfo("m_currentUri: " << m_currentUri);
// load page
- ewk_view_uri_set(m_currentEwkView, m_currentUri.c_str());
+ ewk_view_url_set(m_currentEwkView, m_currentUri.c_str());
if (!m_cbs->bufferSet.empty()) {
m_cbs->bufferSet(m_currentEwkView);
m_theme.c_str(),
m_model->SettingList.Get().isEncrypted());
// load page
- ewk_view_uri_set(m_currentEwkView, m_currentUri.c_str());
+ ewk_view_url_set(m_currentEwkView, m_currentUri.c_str());
}
}
initializePluginLoading();
// load page
- ewk_view_uri_set(m_currentEwkView, m_currentUri.c_str());
+ ewk_view_url_set(m_currentEwkView, m_currentUri.c_str());
// show ewkView
if (!m_cbs->bufferSet.empty()) {
exceededQuota);
char databaseUseAskTitle[180];
- snprintf(databaseUseAskTitle,
- sizeof(databaseUseAskTitle),
- "Do you want to allow %s to use up to %dMB of storage?",
- ewk_security_origin_host_get(origin),
- ewk_context_web_database_exceeded_quota_expected_usage_get(
- exceededQuota)/(1024*1024));
+ snprintf(databaseUseAskTitle, sizeof(databaseUseAskTitle),
+ "Do you want to allow %s to use up to %dMB of storage?",
+ ewk_security_origin_host_get(origin),
+ static_cast<int>(ewk_context_web_database_exceeded_quota_expected_usage_get(
+ exceededQuota) / (1024 * 1024)));
return Wrt::PopupInvoker().askYesNo(
DATABASE_USE_ASK_TITLE,
namespace {
DPL::String s_tizenId;
const double GEOLOCATION_POSITION_ACCURACY = 0.0;
-Eina_Bool g_is_location_manager_valid = EINA_FALSE;
} // anonymous namespace
namespace ViewModule {
} // anonymous namespace
WindowData::WindowData(unsigned long pid, bool manualInit) :
- m_win(NULL), m_naviBackButton(NULL),
- m_toolbarTimer(NULL),
- m_debugMode(false)
+ m_debugMode(false),
+ m_win(NULL),
+ m_naviBackButton(NULL),
+ m_toolbarTimer(NULL)
{
m_win = createWindow(pid);
EVAS_HINT_EXPAND);
Evas_Object *ic = elm_icon_add(toolbar);
- snprintf(buf, sizeof(buf), (*itor).icon.c_str());
- elm_icon_file_set(ic, buf, NULL);
+
+ // (*itor).icon.c_str() guarantied not to have format specifiers
+ snprintf(buf, sizeof(buf), (*itor).icon.c_str());
+
+ elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
elm_object_part_content_set(toolbarButton, "icon", ic);
}
void WindowData::controlHiddenOptionCallback(void *data,
- Evas_Object */*obj*/,
- const char */*emission*/,
- const char */*source*/)
+ Evas_Object * /*obj*/,
+ const char * /*emission*/,
+ const char * /*source*/)
{
LogDebug("controlHiddenOptionCallback");
WindowData* This = static_cast<WindowData *>(data);
- Elm_Object_Item *naviIt = elm_naviframe_top_item_get(This->m_navigation);
+ const char* state = edje_object_part_state_get(
+ elm_layout_edje_get(This->m_user_layout), "elm.swallow.toolbar",
+ NULL);
- const char* state = edje_object_part_state_get(
- elm_layout_edje_get(This->m_user_layout),
- "elm.swallow.toolbar",
- NULL);
-
- if (state && !strncmp(state, "default", strlen("default"))) {
- This->showToolbar();
- This->hideHiddenOption(This->m_user_layout);
- }
- else {
- This->initFullViewMode();
- }
+ if (state && !strncmp(state, "default", strlen("default"))) {
+ This->showToolbar();
+ This->hideHiddenOption(This->m_user_layout);
+ } else {
+ This->initFullViewMode();
+ }
}
Eina_Bool WindowData::hideToolbarCallback(void *data)
alreadyFullscreen = !alreadyFullscreen;
}
-
-
void WindowData::winProfileChangedCallback(void *data,
- Evas_Object * obj,
- void *event_info)
+ Evas_Object* /*obj*/,
+ void* /*eventInfo*/)
{
LogDebug("winProfileChangedCallback");
- if (data == NULL) return;
+ if (data == NULL) {
+ return;
+ }
WindowData* This = static_cast<WindowData *>(data);
-
const char *profile = elm_config_profile_get();
if (!strcmp(profile, "desktop")) {
typedef std::vector<EventWithFunction> EventWithFunctionVector;
public:
+ bool m_debugMode;
Evas_Object* m_win;
Evas_Object* m_user_layout;
- bool m_debugMode;
struct CtxMenuItem
{