bool /*strict_enforcement*/,
base::OnceCallback<void(CertificateRequestResultType)> callback) {
std::string pem_certificate;
+ const GURL request_url(url);
if (!net::X509Certificate::GetPEMEncoded(ssl_info.cert->cert_buffer(),
&pem_certificate)) {
- LOG(INFO) << "Certificate for URL: " << url.spec()
+ LOG(INFO) << "Certificate for URL: " << request_url.spec()
<< " could not be opened";
std::move(callback).Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
return;
}
certificate_policy_decision_.reset(new _Ewk_Certificate_Policy_Decision(
- url, pem_certificate, is_main_frame_request, cert_error,
+ request_url, pem_certificate, is_main_frame_request, cert_error,
std::move(callback)));
web_view_->SmartCallback<EWebViewCallbacks::RequestCertificateConfirm>().call(
certificate_policy_decision_.get());
- LOG(INFO) << "Certificate policy decision called for URL: " << url.spec()
- << " with cert_error: " << cert_error;
+ LOG(INFO) << "Certificate policy decision called for URL: "
+ << request_url.spec() << " with cert_error: " << cert_error;
// if policy is suspended, the API takes over the policy object lifetime
// and policy will be deleted after decision is made
// By default chromium-efl allows page to be opened with certificate
// compromise.
certificate_policy_decision_->SetDecision(true);
- LOG(WARNING) << "Certificate for " << url.spec() << " was compromised";
+ LOG(WARNING) << "Certificate for " << request_url.spec()
+ << " was compromised";
}
}
}
web_view_->InvokeEdgeScrollByCallback(offset, handled);
}
+void WebContentsDelegateEfl::MoveFocusToBrowser(int direction) {
+ if (web_view_) {
+ web_view_->SmartCallback<EWebViewCallbacks::AtkKeyEventNotHandled>().call(
+ &direction);
+ }
+}
+
+void WebContentsDelegateEfl::WillDraw(int new_rotation,
+ gfx::Size frame_data_output_size) {
+ if (web_view_) {
+ if (web_view_->GetRotationChanged()) {
+ web_view_->SetRotationChanged(false);
+ LOG(ERROR) << __func__ << " frame_data_output_size "
+ << frame_data_output_size.ToString() << " new rotation "
+ << new_rotation;
+ web_view_->SmartCallback<EWebViewCallbacks::RotatePrepared>().call(0);
+ }
+ }
+}
+
bool WebContentsDelegateEfl::IsHighBitRate() const {
return web_view_ ? web_view_->IsHighBitRate() : false;
}
}
}
+void WebContentsDelegateEfl::NotifyAudioTracksCount(
+ int player_id,
+ unsigned audio_tracks_count) {
+ if (web_view_)
+ web_view_->NotifyAudioTracksCount(player_id, audio_tracks_count);
+ else
+ LOG(INFO) << "web_view_ is null";
+}
+
void WebContentsDelegateEfl::OnIsVideoPlayingGet(bool is_playing,
int callback_id) {
if (web_view_)
LOG(INFO) << "web_view_ is null";
}
#endif
+
+void WebContentsDelegateEfl::UpdateTooltipUnderCursor(
+ const std::u16string& text) {
+ std::string tooltip = base::UTF16ToUTF8(text);
+ LOG(INFO) << __func__ << " " << tooltip.c_str();
+ if (tooltip.empty()) {
+ web_view_->SmartCallback<EWebViewCallbacks::TooltipTextUnset>().call();
+ } else {
+ web_view_->SmartCallback<EWebViewCallbacks::TooltipTextSet>().call(
+ tooltip.c_str());
+ }
+}
} // namespace content