janke99 / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 0 forks source link

OnBeforePluginLoad doesn't work (windows 32/64 trunk/1750) #1211

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0. Install Adobe reader (or something else that provide a browser plugin)
1. download Windows 32/64 trunk/1750 builds from http://cefbuilds.com/
2. Open cefclient2010 project in visual studio 2010
3. In cefclient modify client_handler.h, add :

virtual bool OnBeforePluginLoad(CefRefPtr<CefBrowser> browser, const CefString& 
url, const CefString& policy_url, CefRefPtr<CefWebPluginInfo> info) OVERRIDE
{
  return true;
}

in the ClientHandler class.

4. build the project
5. start cefclient
6. go to "Tests → Plugin Info"

What is the expected output?
The test should list no plugins.

What do you see instead?
Adobe Acrobat plugin is still present
(trying to open a pdf shows that the plugin is realy loaded (and working on 
32bits builds))

What version of the product are you using?
Windows 32/64 trunk/1750 builds from http://cefbuilds.com/

On what operating system?
Windows 7 64bits

Original issue reported on code.google.com by maxime.d...@gmail.com on 19 Feb 2014 at 1:43

GoogleCodeExporter commented 9 years ago
The root of this issue is that because many plugins' loading queries are not 
origin from render frames maintained by CefBrowser objects, render_process_id 
and render_view_id are not ours, and our CefClient interface is per CefBrowser 
stuff, so OnBeforePlugin won't triggered in these cases.
We need yet another API for real effective global plugin filtering, probably 
add it to CefApp interface is a good idea. I already have a patch for it and 
work in my local build. I may upload it tonight or tomorrow.

Feedbacks about whether adding new API via CefApp is a good idea are welcome.
You can let me know before I provide the patch.

Original comment by bandinfi...@gmail.com on 5 Mar 2014 at 1:59

GoogleCodeExporter commented 9 years ago
I forgot this for a long time, and today I'm back and try to provide the patch, 
but I can't find a way to do that in svn without commit it first. I mean, svn 
diff does not include newly added files, how can I generate the patch? I know 
this is a bit off-topic but that's where I'm stuck.

Original comment by bandinfi...@gmail.com on 18 Mar 2014 at 11:54

GoogleCodeExporter commented 9 years ago
I'm a git user to not my strong suit, but I think you should just 'svn add' the 
files before diffing them.

Original comment by finn.hug...@gmail.com on 18 Mar 2014 at 11:58

GoogleCodeExporter commented 9 years ago
Here it is.
But I don't know whether this diff can apply successfully, newly added files 
are marked as revision 0.

Original comment by bandinfi...@gmail.com on 19 Mar 2014 at 12:24

Attachments:

GoogleCodeExporter commented 9 years ago
+

Original comment by alervd...@gmail.com on 31 Oct 2014 at 9:11

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/1211

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:30