Bug 30348

Summary: Implement private mode for plug-ins on Windows
Product: WebKit Reporter: Brian Weinstein <bweinstein>
Component: Plug-insAssignee: Mark Rowe (bdash) <mrowe>
Status: RESOLVED FIXED    
Severity: Normal CC: gns, ismail, jhoneycutt, robert, webkit.review.bot, xan.lopez
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Implement the “get” side of NPNVprivateModeBool
none
Updated patch
none
Updated patch oliver: review+

Description Brian Weinstein 2009-10-13 17:31:38 PDT
plugins/private-browsing-mode.html fails on Windows, as the private plugin mode is only implemented on Mac. I am going to add it to the Skipped list, and this bug is to track the implementing of the mode on Windows.
Comment 1 Jon Honeycutt 2010-01-20 13:59:07 PST
<rdar://problem/7562261>
Comment 2 Mark Rowe (bdash) 2010-03-02 03:04:31 PST
Created attachment 49796 [details]
Implement the “get” side of NPNVprivateModeBool

This is mainly refactoring to remove the duplication within PluginView::getValue.  A side-effect of this is that Windows gains the implementation of getValue for NPNVprivateModeBool that Qt recently added.

A later patch will need to handle notifying plug-ins when the value for NPNVprivateModeBool changes.
Comment 3 WebKit Review Bot 2010-03-02 03:07:23 PST
Attachment 49796 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/plugins/PluginView.cpp:1325:  Missing space before ( in switch(  [whitespace/parens] [5]
WebCore/plugins/win/PluginViewWin.cpp:60:  "PluginPackage.h" already included at WebCore/plugins/win/PluginViewWin.cpp:59  [build/include] [4]
WebCore/plugins/win/PluginViewWin.cpp:886:  Declaration has space between type name and * in NPBool *flag  [whitespace/declaration] [3]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Mark Rowe (bdash) 2010-03-02 03:13:49 PST
Created attachment 49798 [details]
Updated patch

May as well fix those existing style issues while I’m touching the code.
Comment 5 WebKit Review Bot 2010-03-02 03:19:52 PST
Attachment 49798 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/plugins/PluginView.cpp:1325:  Missing space before ( in switch(  [whitespace/parens] [5]
Total errors found: 1 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Mark Rowe (bdash) 2010-03-02 04:22:54 PST
I filed bug 35576 to track the other half of this: notifying a plug-in instance when the private browsing state changes.
Comment 7 WebKit Review Bot 2010-03-02 05:32:42 PST
Attachment 49798 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/320767
Comment 8 Mark Rowe (bdash) 2010-03-02 05:47:37 PST
Created attachment 49801 [details]
Updated patch

Switch to using “default" to prevent warnings about unhandled enum values in switches.
Comment 9 WebKit Review Bot 2010-03-02 05:54:44 PST
Attachment 49801 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/320780
Comment 10 Oliver Hunt 2010-03-02 14:38:43 PST
Comment on attachment 49801 [details]
Updated patch

r=me
Comment 11 Mark Rowe (bdash) 2010-03-02 15:14:14 PST
Landed in r55432.
Comment 12 Ismail Donmez 2010-03-08 04:47:29 PST
This broke compilation with Qt/Linux with plugins disabled:

PluginView.h protects getValueStatic(..) function with 

#if ENABLE(NETSCAPE_PLUGIN_API)

but it does not do so in PluginView.cpp. There are some other compilation problems related to this commit as well but they'll need to be handled in seperate bugs.