Ashwin
Ashwin

Reputation: 61

CEF disable address bar

I am using CEF3 and want to hardcode and disable the address bar of the browser. I am not finding the right place in the code base to do the same. Any pointers would be of great help. Either through the C++ or Javascript methods would help.

Thanks, Ashwin

Upvotes: 1

Views: 2923

Answers (3)

NickLamp
NickLamp

Reputation: 862

I realize this question is old but I had the same question and found the solution.

In the cefclient example, the address bar is drawn within the RootWindowGtk::CreateRootWindow function.

Delete the gtk_container_add function call that adds the GtkToolItem* corresponding to the address bar and the address bar will be gone.

Upvotes: 0

tsing gao
tsing gao

Reputation: 148

You can build a CEF application using the binary, just like the WIKI does. Please see the github project for a reference https://github.com/acristoffers/CEF3SimpleSample

Upvotes: 1

peterflynn
peterflynn

Reputation: 4936

Are you using cefclient? I don't think there's a clean way to turn it off in the standard version of cefclient.

However, in the brackets-shell fork of cefclient there's a #define you can use to toggle it on/off cleanly. Just search for references to SHOW_TOOLBAR_UI (it's only used in four files). I'm guessing it wouldn't be too hard to manually apply those diffs back onto a clean copy of cefclient (you probably don't want to take the brackets-shell fork as-is – it's not very generic).

Upvotes: 1

Related Questions