Download and Upload support for Linux

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Download and Upload support for Linux

Postby hari269 » Thu Jul 25, 2019 12:38 am

Hello All,

The current implementation of browser_window_std_gtk.cc has GetWindowHandle() code unimplemented for Linux with the comment " // There is no GtkWidget* representation of this object."

How do we implement the download and upload dialog box functionality for Linux?
Any suggestions/reference implementations will be helpful.

Thanks,
Harish
hari269
Newbie
 
Posts: 6
Joined: Mon Mar 25, 2019 3:16 am

Re: Download and Upload support for Linux

Postby magreenblatt » Thu Jul 25, 2019 8:22 am

See cefclient/browser/dialog_handler_gtk.[cc|h].
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Download and Upload support for Linux

Postby hari269 » Thu Jul 25, 2019 11:22 pm

Thanks for your response.

Currently, I see this in browser_window_std_gtk.cc file where NULL is returned.

ClientWindowHandle BrowserWindowStdGtk::GetWindowHandle() const {
REQUIRE_MAIN_THREAD();

// There is no GtkWidget* representation of this object.
NOTREACHED();
return NULL;
}

This is called in dialog_handler_gtk.cc which is printing the message " No GtkWindow for browser" as we are returning NULL in GetWindowHandle()

GtkWindow* GetWindow(CefRefPtr<CefBrowser> browser) {
scoped_refptr<RootWindow> root_window =
RootWindow::GetForBrowser(browser->GetIdentifier());
if (root_window) {
GtkWindow* window = GTK_WINDOW(root_window->GetWindowHandle());
if (!window)
LOG(ERROR) << "No GtkWindow for browser";
return window;
}
return NULL;
}

Are we supposed to implement something for Linux for seeing the save dialog for download and upload scenarios?

Thanks,
Harish
hari269
Newbie
 
Posts: 6
Joined: Mon Mar 25, 2019 3:16 am

Re: Download and Upload support for Linux

Postby Czarek » Fri Jul 26, 2019 1:16 am

What CEF version? The download and upload dialogs are working out of the box in cefclient sample application. Looks like you've modified or removed some code and it broke it.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Download and Upload support for Linux

Postby hari269 » Fri Jul 26, 2019 1:31 am

We are using CEF Version: 3.3626.1895.g7001d56 compiled from sources.
hari269
Newbie
 
Posts: 6
Joined: Mon Mar 25, 2019 3:16 am

Re: Download and Upload support for Linux

Postby Czarek » Fri Jul 26, 2019 1:37 am

Try with latest supported version from Spotify builds. Use build instructions from CMakeLists.txt. Do not modify code in any way and test if it works.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Download and Upload support for Linux

Postby hari269 » Fri Jul 26, 2019 1:41 am

This is the log message observed when clicked on the Browse from computer option on the browser

dialog_handler_gtk.cc(138)] No GtkWindow for browser
file_dialog_manager.cc(313)] No file dialog runner available for this platform
hari269
Newbie
 
Posts: 6
Joined: Mon Mar 25, 2019 3:16 am

Re: Download and Upload support for Linux

Postby Czarek » Fri Jul 26, 2019 1:47 am

Please be specific and include details (OS, how you test it). Did you follow my instructions and tested with latest CEF?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Download and Upload support for Linux

Postby hari269 » Fri Jul 26, 2019 1:53 am

Hi Czarek,

I just checked the cef client functionality for download and upload dialog box and it works perfectly.
Thanks for the pointers.

I will check what is missing in my environment.
The error messages were shared as continuous to my last message.

Thanks,
Harish
hari269
Newbie
 
Posts: 6
Joined: Mon Mar 25, 2019 3:16 am

Re: Download and Upload support for Linux

Postby hari269 » Sun Mar 28, 2021 11:53 am

Hi Marshall,
Can you share info on the file dialog support in Linux for this version of the cefclient
https://bitbucket.org/chromiumembedded/ ... 57a563c375

This is pretty old, unfortunately, our application is based on it
Your response on the file dialog support in Linux for this version of dialog_handler_gtk.cc would be of great help.
In case it is supported, can you share information on any specific implementation the platform(Linux) needs to do ?

Thanks in Advance.
hari269
Newbie
 
Posts: 6
Joined: Mon Mar 25, 2019 3:16 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 32 guests