#include "content/browser/web_contents/web_contents_view_aura.h"
#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/web_contents.h"
+#include "ewk/efl_integration/webview_delegate_efl.h"
#include "tizen/system_info.h"
#include "ui/base/clipboard/clipboard_helper_efl.h"
#include "ui/display/device_display_info_efl.h"
// TODO(a1.gomes): In case of EWK apps, the call below end up calling
// EWebView::ShowContextMenu. We have to make sure parameters
// are correct.
- WebContentsImpl* wci = static_cast<WebContentsImpl*>(web_contents());
- WebContentsViewAura* wcva = static_cast<WebContentsViewAura*>(wci->GetView());
- wcva->wcva_helper()->ShowContextMenu(convertedParams);
-}
+ WebContentsImplEfl* wcie = static_cast<WebContentsImplEfl*>(web_contents());
+ if (!wcie || !wcie->GetEflDelegate())
+ return;
+ wcie->GetEflDelegate()->ShowContextMenu(convertedParams);
+}
void SelectionControllerEfl::CancelContextMenu(int request_id) {
if (IsMobileProfile() && (context_menu_status_ == ContextMenuStatus::HIDDEN ||
context_menu_status_ == ContextMenuStatus::NONE)) {
return;
}
- WebContentsImpl* wci = static_cast<WebContentsImpl*>(web_contents());
- WebContentsViewAura* wcva = static_cast<WebContentsViewAura*>(wci->GetView());
- wcva->wcva_helper()->CancelContextMenu(request_id);
+ WebContentsImplEfl* wcie = static_cast<WebContentsImplEfl*>(web_contents());
+ if (!wcie || !wcie->GetEflDelegate())
+ return;
+
+ wcie->GetEflDelegate()->CancelContextMenu(request_id);
}
void SelectionControllerEfl::HideHandles() {