bool create) {
if (create) {
scoped_refptr<SessionStorageNamespace> ssn = session_storage_namespace;
- WebContentsEflDelegate::WebContentsCreateCallback callback = base::BindOnce(
- &WebContentsImplEfl::HandleNewWebContentsCreate, base::Unretained(this),
- render_process_id, route_id, main_frame_route_id, params, ssn);
+ WebContentsEflDelegate::WebContentsCreateCallback callback =
+ base::BindRepeating(&WebContentsImplEfl::HandleNewWebContentsCreate,
+ base::Unretained(this), render_process_id, route_id,
+ main_frame_route_id, params, ssn);
if (efl_delegate_ && efl_delegate_->WebContentsCreateAsync(callback))
return;
// intended to pass platform specific data to WebContents constructor. It
// returns a pointer to new WebContents created by the function. The caller
// is expected to take ownership of the returned object.
- typedef base::OnceCallback<WebContents*(void*)> WebContentsCreateCallback;
+ typedef base::RepeatingCallback<WebContents*(void*)>
+ WebContentsCreateCallback;
// Callback allowing the embedder to resume or block new window request. The
// argument specifies if the request should be allowed (true) or blocked
int EWebView::find_request_id_counter_ = 0;
content::WebContentsEflDelegate::WebContentsCreateCallback
EWebView::create_new_window_web_contents_cb_ =
- base::BindOnce(&NullCreateWebContents);
+ base::BindRepeating(&NullCreateWebContents);
EWebView* EWebView::FromEvasObject(Evas_Object* eo) {
return WebViewDelegateEwk::GetInstance().GetWebViewFromEvasObject(eo);
void EWebView::CreateNewWindow(
content::WebContentsEflDelegate::WebContentsCreateCallback cb) {
- create_new_window_web_contents_cb_ = std::move(cb);
+ create_new_window_web_contents_cb_ = cb;
Evas_Object* new_object = NULL;
SmartCallback<EWebViewCallbacks::CreateNewWindow>().call(&new_object);
- create_new_window_web_contents_cb_ = base::BindOnce(&NullCreateWebContents);
+ create_new_window_web_contents_cb_ =
+ base::BindRepeating(&NullCreateWebContents);
DCHECK(new_object);
}
}
void EWebView::InitializeContent() {
- WebContents* new_contents =
- std::move(create_new_window_web_contents_cb_).Run(this);
+ WebContents* new_contents = create_new_window_web_contents_cb_.Run(this);
if (!new_contents) {
WebContents::CreateParams params(context_->browser_context());
web_contents_.reset(