if (!rwhva())
return "";
- std::string selected_text = base::UTF16ToUTF8(rwhva()->GetSelectedText());
- return selected_text.c_str();
+ return base::UTF16ToUTF8(rwhva()->GetSelectedText()).c_str();
}
} // namespace content
#if BUILDFLAG(IS_TIZEN)
FilePath GetLibRootPath(void) {
Dl_info dl_info;
- dladdr((void*)GetLibRootPath, &dl_info);
+ if (!dladdr((void*)GetLibRootPath, &dl_info)) {
+ LOG(ERROR) << "dladdr failed";
+ return FilePath();
+ }
FilePath lib_root_path(dl_info.dli_fname);
lib_root_path = MakeAbsoluteFilePath(lib_root_path);
EflScreen::EflScreen() {
display::Display display(kDisplayId);
display.set_bounds(GetDisplaySize());
+ display.set_panel_rotation(display::Display::ROTATE_0);
display_list_.AddDisplay(display, display::DisplayList::Type::PRIMARY);
screen_list.push_back(this);
std::ignore = request.release();
else if (!request->IsDecided()) {
// Reject permission if request is not suspended and not decided
- std::move(callback).Run(PermissionStatus::DENIED);
+ request->RunCallback(false);
}
}
}
}
Eina_Bool EWebView::DelayedPopulateAndShowContextMenu(void* data) {
- if (IsMobileProfile) {
+ if (IsMobileProfile()) {
EWebView* view = static_cast<EWebView*>(data);
if (view) {
if (view->context_menu_ &&
if (!render_view_host)
return false;
+#if !defined(EWK_BRINGUP) // FIXME: m94 bringup
MHTMLCallbackDetails* callback_details = new MHTMLCallbackDetails;
callback_details->Set(callback, user_data);
-#if !defined(EWK_BRINGUP) // FIXME: m94 bringup
int mhtml_callback_id = mhtml_callback_map_.Add(callback_details);
return render_view_host->Send(new EwkViewMsg_GetMHTMLData(
render_view_host->GetRoutingID(), mhtml_callback_id));
// check start : "#AppControl"
const std::string& buf = str_tok.token();
base::StringTokenizer check_start(buf, "#");
- check_start.GetNext();
- if (!check_start.GetNext() || check_start.token() != kAppControlStart) {
+ // GetNext() advances the tokenizer to the next delimiter. It's called
+ // twice here to read kAppControlStart, if any as the token value.
+ if (!check_start.GetNext() || !check_start.GetNext() ||
+ check_start.token() != kAppControlStart) {
LOG(ERROR) << __FUNCTION__ << " > #AppControl is missing! ";
return false;
}
return FailHandling();
}
- ret = pkgmgrinfo_appinfo_foreach_category(
+ pkgmgrinfo_appinfo_foreach_category(
handle,
[](const char* category, void* user_data) -> int {
auto app_control = static_cast<_Ewk_App_Control*>(user_data);
class _Ewk_Security_Origin;
+namespace content {
+class GeolocationPermissionContextEfl;
+}
+
// This holds the geolocation permission request data.
// The callback present is the direct engine callback which need
// to be called once the permission is determined by app.
_Ewk_Security_Origin* GetOrigin() const { return origin_; }
private:
+ friend class content::GeolocationPermissionContextEfl;
+
_Ewk_Security_Origin* origin_;
void RunCallback(bool allowed) override;
printf("APP.C calling ewk_cookie_manager_cookies_clear\n");
if (!clear_cookie_called) {
clear_cookie_called = EINA_TRUE;
- printf("APP.c calling ewk_view_get_cookies_for_url:%s\n",ewk_view_get_cookies_for_url(view, start_url));
+ char* cookies = ewk_view_get_cookies_for_url(view, start_url);
+ if (cookies) {
+ printf("APP.c calling ewk_view_get_cookies_for_url:%s\n", cookies);
+ free(cookies);
+ }
ewk_cookie_manager_cookies_clear(ewk_context_cookie_manager_get(context));
printf("APP.c calling ewk_cookie_manager_async_hostnames_with_cookies_get\n");
ewk_cookie_manager_async_hostnames_with_cookies_get(ewk_context_cookie_manager_get(context),
void Browser::DidStartInspectorServer(unsigned port) {
// Get IP address.
struct ifaddrs* addrs;
- getifaddrs(&addrs);
+ int rc = getifaddrs(&addrs);
+ if (rc == -1) {
+ log_error("getifaddrs() failed");
+ return;
+ }
char url[32] = {0};
// Find non local, up IP address.
for (struct ifaddrs* iter = addrs; iter && iter->ifa_addr;