diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-12 16:14:22 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-12 16:14:22 +0000 |
commit | 6b3db4350e3cb5b7d5ef9ff5995f5dcfe9bac6e9 (patch) | |
tree | bde9dde95d828715441bb818cf78397846ef32c7 /chrome | |
parent | 3c5ce41e6cb80f816e7d398594d77e2c6b03a22a (diff) | |
download | chromium_src-6b3db4350e3cb5b7d5ef9ff5995f5dcfe9bac6e9.zip chromium_src-6b3db4350e3cb5b7d5ef9ff5995f5dcfe9bac6e9.tar.gz chromium_src-6b3db4350e3cb5b7d5ef9ff5995f5dcfe9bac6e9.tar.bz2 |
Revert 55888: Allow per-plugin content settings.
Run with --enable-resource-content-settings and --enable-click-to-play to enable.
TabSpecificContentSettings now keeps track of which resources were blocked. The content setting bubble displays those resource, and selecting the "allow radio buttons adds exceptions for these resources.
The infobar for non-sandboxed plug-ins now also shows a button to always allow the blocked plug-in on that site.
Screenshot of the plugin bubble: http://imgur.com/6npqv.png
Because we need to change the title and radio button labels depending on whether we track specific plug-ins, we copy them from the ContentSettingBubbleModel.
XIB changes: Add a text field for the blocked plug-ins to ContentBlockedPlugins.xib, hooked up to the |blockedResourcesField_| outlet.
BUG=39252,38432
TEST=manual
Review URL: http://codereview.chromium.org/2873104
TBR: bauerb@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
31 files changed, 155 insertions, 1193 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index c790942..fbb44ce 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -2376,18 +2376,12 @@ each locale. --> <message name="IDS_BLOCKED_JAVASCRIPT_LINK" desc="Link to JavaScript section of content blocking management dialog, displayed in bubble when a page tries to run JavaScript."> Manage JavaScript blocking... </message> - <message name="IDS_BLOCKED_PLUGINS_TITLE" desc="Bubble info header text when a page is not allowed to display plug-ins."> - The following plug-ins were blocked on this page: - </message> - <message name="IDS_BLOCKED_PLUGINS_MESSAGE" desc="Tooltip and message when a page is not allowed to display plug-ins."> + <message name="IDS_BLOCKED_PLUGINS_TITLE" desc="Tooltip and bubble info header text when a page is not allowed to display plug-ins."> Plug-ins were blocked on this page. </message> - <message name="IDS_BLOCKED_PLUGINS_UNBLOCK_ALL" desc="Radio button choice to unblock a site from using plug-ins, displayed in bubble when a page tries to use plug-ins."> + <message name="IDS_BLOCKED_PLUGINS_UNBLOCK" desc="Radio button choice to unblock a site from using plug-ins, displayed in bubble when a page tries to use plug-ins."> Always allow plug-ins on <ph name="HOST">$1<ex>mail.google.com</ex></ph> </message> - <message name="IDS_BLOCKED_PLUGINS_UNBLOCK" desc="Radio button choice to unblock a site from using *a specific set* of plug-ins, displayed in bubble when a page tries to use plug-ins."> - Always allow these plug-ins on <ph name="HOST">$1<ex>mail.google.com</ex></ph> - </message> <message name="IDS_BLOCKED_PLUGINS_NO_ACTION" desc="Radio button choice to continue blocking a site from using plug-ins, displayed in bubble when a page tries to use plug-ins."> Continue blocking plug-ins </message> @@ -2397,9 +2391,6 @@ each locale. --> <message name="IDS_BLOCKED_PLUGINS_LOAD_ALL" desc="Button to load all blocked plugins on a page, displayed in bubble when a page tries to display plug-ins."> Run all plug-ins this time </message> - <message name="IDS_BLOCKED_PLUGINS_UNBLOCK_SHORT" desc="Button to unblock nonsandboxed plug-ins on a site"> - Always allow - </message> <!-- SSL error strings --> <message name="IDS_SEVERAL_SSL_ERRORS" desc="Bubble info header text when there is more than 1 error"> diff --git a/chrome/app/nibs/ContentBlockedPlugins.xib b/chrome/app/nibs/ContentBlockedPlugins.xib index 0fa7627..574dc74 100644 --- a/chrome/app/nibs/ContentBlockedPlugins.xib +++ b/chrome/app/nibs/ContentBlockedPlugins.xib @@ -1,18 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">10F569</string> - <string key="IBDocument.InterfaceBuilderVersion">762</string> - <string key="IBDocument.AppKitVersion">1038.29</string> - <string key="IBDocument.HIToolboxVersion">461.00</string> - <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">762</string> - </object> + <string key="IBDocument.SystemVersion">9L31a</string> + <string key="IBDocument.InterfaceBuilderVersion">680</string> + <string key="IBDocument.AppKitVersion">949.54</string> + <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="4"/> + <integer value="35"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -20,7 +16,7 @@ </object> <object class="NSMutableDictionary" key="IBDocument.Metadata"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys" id="0"> + <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> </object> <object class="NSMutableArray" key="dict.values"> @@ -41,12 +37,12 @@ <object class="NSWindowTemplate" id="1005"> <int key="NSWindowStyleMask">15</int> <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{196, 353}, {314, 179}}</string> + <string key="NSWindowRect">{{196, 353}, {314, 157}}</string> <int key="NSWTFlags">536873984</int> <string key="NSWindowTitle">Window</string> <string key="NSWindowClass">InfoBubbleWindow</string> <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <object class="NSView" key="NSWindowView" id="1006"> <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> @@ -57,42 +53,6 @@ <int key="NSvFlags">274</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTextField" id="169749286"> - <reference key="NSNextResponder" ref="301729179"/> - <int key="NSvFlags">266</int> - <string key="NSFrame">{{17, 123}, {269, 14}}</string> - <reference key="NSSuperview" ref="301729179"/> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="264536333"> - <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">272760832</int> - <string key="NSContents"><Do not localize></string> - <object class="NSFont" key="NSSupport" id="26"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">11</double> - <int key="NSfFlags">3100</int> - </object> - <reference key="NSControlView" ref="169749286"/> - <object class="NSColor" key="NSBackgroundColor" id="657398381"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlColor</string> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> - </object> - </object> - <object class="NSColor" key="NSTextColor" id="96266275"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlTextColor</string> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MAA</bytes> - </object> - </object> - </object> - </object> <object class="NSCustomView" id="242530517"> <reference key="NSNextResponder" ref="301729179"/> <int key="NSvFlags">292</int> @@ -108,7 +68,11 @@ <int key="NSCellFlags">-2080244224</int> <int key="NSCellFlags2">134348800</int> <string key="NSContents">^IDS_BLOCKED_PLUGINS_LOAD_ALL</string> - <reference key="NSSupport" ref="26"/> + <object class="NSFont" key="NSSupport" id="26"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">1.100000e+01</double> + <int key="NSfFlags">3100</int> + </object> <reference key="NSControlView" ref="641116266"/> <int key="NSButtonFlags">-2038152961</int> <int key="NSButtonFlags2">164</int> @@ -126,7 +90,7 @@ <object class="NSTextField" id="266815090"> <reference key="NSNextResponder" ref="301729179"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{17, 145}, {280, 14}}</string> + <string key="NSFrame">{{17, 123}, {280, 14}}</string> <reference key="NSSuperview" ref="301729179"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="157361777"> @@ -135,8 +99,24 @@ <string key="NSContents">^IDS_BLOCKED_PLUGINS_TITLE</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="266815090"/> - <reference key="NSBackgroundColor" ref="657398381"/> - <reference key="NSTextColor" ref="96266275"/> + <object class="NSColor" key="NSBackgroundColor" id="657398381"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlTextColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> + </object> </object> </object> <object class="NSMatrix" id="126329017"> @@ -154,8 +134,8 @@ <int key="NSCellFlags2">131072</int> <string key="NSContents">^IDS_BLOCKED_PLUGINS_UNBLOCK</string> <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="126329017"/> <int key="NSTag">1</int> + <reference key="NSControlView" ref="126329017"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">0</int> <object class="NSButtonImageSource" key="NSAlternateImage" id="564397696"> @@ -171,8 +151,8 @@ <int key="NSCellFlags2">131072</int> <string key="NSContents">^IDS_BLOCKED_PLUGINS_NO_ACTION</string> <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="126329017"/> <int key="NSTag">2</int> + <reference key="NSControlView" ref="126329017"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">0</int> <object class="NSImage" key="NSNormalImage"> @@ -182,7 +162,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="0"/> + <integer value="0" id="8"/> <object class="NSBitmapImageRep"> <object class="NSData" key="NSTIFFRepresentation"> <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA @@ -208,7 +188,7 @@ AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABBxwAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -294,7 +274,7 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA</bytes> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="0"/> + <reference ref="8"/> <object class="NSBitmapImageRep"> <object class="NSData" key="NSTIFFRepresentation"> <bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA @@ -320,7 +300,7 @@ AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS +AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABBxwAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> @@ -341,7 +321,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSFont" key="NSFont" id="419827241"> <string key="NSName">LucidaGrande</string> - <double key="NSSize">13</double> + <double key="NSSize">1.300000e+01</double> <int key="NSfFlags">1044</int> </object> </object> @@ -433,16 +413,16 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="NSClassName">GTMWidthBasedTweaker</string> </object> </object> - <string key="NSFrameSize">{314, 179}</string> + <string key="NSFrameSize">{314, 157}</string> <reference key="NSSuperview" ref="1006"/> <string key="NSClassName">InfoBubbleView</string> </object> </object> - <string key="NSFrameSize">{314, 179}</string> + <string key="NSFrameSize">{314, 157}</string> <reference key="NSSuperview"/> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSCustomObject" id="670916757"> <string key="NSClassName">ChromeUILocalizer</string> @@ -566,40 +546,34 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <int key="connectionID">37</int> </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">blockedResourcesField_</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="169749286"/> - </object> - <int key="connectionID">40</int> - </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBObjectRecord"> <int key="objectID">0</int> - <reference key="object" ref="0"/> + <object class="NSArray" key="object" id="134356264"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> <reference key="children" ref="1000"/> <nil key="parent"/> </object> <object class="IBObjectRecord"> <int key="objectID">-2</int> <reference key="object" ref="1001"/> - <reference key="parent" ref="0"/> - <string key="objectName">File's Owner</string> + <reference key="parent" ref="134356264"/> + <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string> </object> <object class="IBObjectRecord"> <int key="objectID">-1</int> <reference key="object" ref="1003"/> - <reference key="parent" ref="0"/> + <reference key="parent" ref="134356264"/> <string key="objectName">First Responder</string> </object> <object class="IBObjectRecord"> <int key="objectID">-3</int> <reference key="object" ref="1004"/> - <reference key="parent" ref="0"/> + <reference key="parent" ref="134356264"/> <string key="objectName">Application</string> </object> <object class="IBObjectRecord"> @@ -609,7 +583,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="1006"/> </object> - <reference key="parent" ref="0"/> + <reference key="parent" ref="134356264"/> </object> <object class="IBObjectRecord"> <int key="objectID">2</int> @@ -631,7 +605,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="730386640"/> <reference ref="395762087"/> <reference ref="242530517"/> - <reference ref="169749286"/> </object> <reference key="parent" ref="1006"/> </object> @@ -683,12 +656,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="IBObjectRecord"> <int key="objectID">20</int> <reference key="object" ref="670916757"/> - <reference key="parent" ref="0"/> + <reference key="parent" ref="134356264"/> </object> <object class="IBObjectRecord"> <int key="objectID">21</int> <reference key="object" ref="684547419"/> - <reference key="parent" ref="0"/> + <reference key="parent" ref="134356264"/> </object> <object class="IBObjectRecord"> <int key="objectID">28</int> @@ -759,25 +732,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="object" ref="640364338"/> <reference key="parent" ref="641116266"/> </object> - <object class="IBObjectRecord"> - <int key="objectID">38</int> - <reference key="object" ref="169749286"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="264536333"/> - </object> - <reference key="parent" ref="301729179"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">39</int> - <reference key="object" ref="264536333"/> - <reference key="parent" ref="169749286"/> - </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> + <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>-1.IBPluginDependency</string> <string>-2.IBPluginDependency</string> @@ -801,8 +760,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>21.IBPluginDependency</string> <string>33.IBPluginDependency</string> <string>34.IBPluginDependency</string> - <string>38.IBPluginDependency</string> - <string>39.IBPluginDependency</string> <string>4.IBPluginDependency</string> <string>7.IBPluginDependency</string> <string>8.IBPluginDependency</string> @@ -813,9 +770,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{641, 625}, {314, 179}}</string> + <string>{{32, 644}, {314, 157}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{641, 625}, {314, 179}}</string> + <string>{{32, 644}, {314, 157}}</string> <boolean value="NO"/> <string>{196, 240}</string> <string>{{357, 418}, {480, 270}}</string> @@ -836,13 +793,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> </object> <object class="NSMutableDictionary" key="unlocalizedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> </object> @@ -850,13 +807,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <nil key="activeLocalization"/> <object class="NSMutableDictionary" key="localizations"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> <nil key="sourceID"/> - <int key="maxID">40</int> + <int key="maxID">37</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -894,7 +853,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="superclassName">BaseBubbleController</string> <object class="NSMutableDictionary" key="actions"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> + <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>allowBlockToggled:</string> <string>closeBubble:</string> @@ -913,13 +872,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> + <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>allowBlockRadioGroup_</string> - <string>blockedResourcesField_</string> <string>contentsContainer_</string> <string>doneButton_</string> - <string>infoButton_</string> <string>loadAllPluginsButton_</string> <string>manageButton_</string> <string>titleLabel_</string> @@ -927,12 +884,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>NSMatrix</string> - <string>NSTextField</string> <string>NSView</string> <string>NSButton</string> <string>NSButton</string> <string>NSButton</string> - <string>NSButton</string> <string>NSTextField</string> </object> </object> @@ -946,7 +901,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="superclassName">NSObject</string> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> + <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>otherObjectToLocalize_</string> <string>owner_</string> @@ -969,7 +924,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="superclassName">NSObject</string> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> + <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>localizerOwner_</string> <string>localizer_</string> @@ -992,7 +947,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="superclassName">NSView</string> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> + <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>viewToResize_</string> <string>viewToSlideAndResize_</string> @@ -1073,714 +1028,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> </object> - <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBPartialClassDescription"> - <string key="className">NSActionCell</string> - <string key="superclassName">NSCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSActionCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <string key="superclassName">NSResponder</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="906419881"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSApplication.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="297019869"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="1020581467"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSHelpManager.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSPageLayout.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSBox</string> - <string key="superclassName">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSBox.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSButton</string> - <string key="superclassName">NSControl</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSButton.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSButtonCell</string> - <string key="superclassName">NSActionCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSCell</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSControl</string> - <string key="superclassName">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="287370542"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSControl.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSFormatter</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSMatrix</string> - <string key="superclassName">NSControl</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSMatrix.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSMenu</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="120889394"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSMenu.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AddressBook.framework/Headers/ABActions.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSAlert.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSAnimation.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="906419881"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="297019869"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSBrowser.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="1020581467"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSComboBox.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSComboBoxCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="287370542"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSDatePickerCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSDictionaryController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSDragging.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="140035882"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSDrawer.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSFontManager.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSFontPanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSImage.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSKeyValueBinding.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="120889394"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSNibLoading.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSOutlineView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSPasteboard.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSRuleEditor.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSavePanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSound.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSpeechRecognizer.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSpeechSynthesizer.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSplitView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTabView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTableView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSText.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTextStorage.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTextView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTokenField.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTokenFieldCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSToolbar.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="235596643"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="960729206"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSWindow.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSArchiver.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSClassDescription.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSConnection.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSError.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSMetadata.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSObject.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSObjectScripting.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSPort.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSPortCoder.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptClassDescription.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptWhoseTests.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSSpellServer.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSStream.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSThread.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSURL.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Print.framework/Headers/PDEPluginInterface.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">QuartzCore.framework/Headers/CIImageProvider.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">SecurityInterface.framework/Headers/SFAuthorizationView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">SecurityInterface.framework/Headers/SFCertificatePanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">SecurityInterface.framework/Headers/SFChooseIdentityPanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSResponder</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSInterfaceStyle.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSResponder</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSResponder.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSTextField</string> - <string key="superclassName">NSControl</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTextField.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSTextFieldCell</string> - <string key="superclassName">NSActionCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTextFieldCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSClipView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSMenuItem.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSRulerView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <string key="superclassName">NSResponder</string> - <reference key="sourceIdentifier" ref="235596643"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindow</string> - <reference key="sourceIdentifier" ref="140035882"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindow</string> - <string key="superclassName">NSResponder</string> - <reference key="sourceIdentifier" ref="960729206"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindow</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSWindowScripting.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindowController</string> - <string key="superclassName">NSResponder</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">showWindow:</string> - <string key="NS.object.0">id</string> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string> - </object> - </object> - </object> </object> <int key="IBDocument.localizationMode">0</int> - <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> - <integer value="1050" key="NS.object.0"/> - </object> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> - <integer value="1050" key="NS.object.0"/> - </object> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> - <integer value="3000" key="NS.object.0"/> - </object> - <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> <string key="IBDocument.LastKnownRelativeProjectPath">../../chrome.xcodeproj</string> <int key="IBDocument.defaultPropertyAccessControl">3</int> </data> diff --git a/chrome/browser/blocked_plugin_manager.cc b/chrome/browser/blocked_plugin_manager.cc index b073b1f..92b7c91 100644 --- a/chrome/browser/blocked_plugin_manager.cc +++ b/chrome/browser/blocked_plugin_manager.cc @@ -6,13 +6,9 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/command_line.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/host_content_settings_map.h" -#include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" -#include "chrome/common/chrome_switches.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -20,10 +16,7 @@ BlockedPluginManager::BlockedPluginManager(TabContents* tab_contents) : ConfirmInfoBarDelegate(tab_contents), tab_contents_(tab_contents) { } -void BlockedPluginManager::OnNonSandboxedPluginBlocked( - const std::string& plugin, - const string16& name) { - plugin_ = plugin; +void BlockedPluginManager::OnNonSandboxedPluginBlocked(const string16& name) { name_ = name; tab_contents_->AddInfoBar(this); } @@ -33,18 +26,12 @@ void BlockedPluginManager::OnBlockedPluginLoaded() { } int BlockedPluginManager::GetButtons() const { - int buttons = BUTTON_OK; - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableResourceContentSettings)) - buttons |= BUTTON_CANCEL; - return buttons; + return BUTTON_OK; } std::wstring BlockedPluginManager::GetButtonLabel(InfoBarButton button) const { if (button == BUTTON_OK) return l10n_util::GetString(IDS_PLUGIN_LOAD_SHORT); - if (button == BUTTON_CANCEL) - return l10n_util::GetString(IDS_BLOCKED_PLUGINS_UNBLOCK_SHORT); return ConfirmInfoBarDelegate::GetButtonLabel(button); } @@ -67,16 +54,6 @@ bool BlockedPluginManager::Accept() { return true; } -bool BlockedPluginManager::Cancel() { - DCHECK(CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableResourceContentSettings)); - tab_contents_->profile()->GetHostContentSettingsMap()->AddExceptionForURL( - tab_contents_->GetURL(), CONTENT_SETTINGS_TYPE_PLUGINS, plugin_, - CONTENT_SETTING_ALLOW); - tab_contents_->render_view_host()->LoadBlockedPlugins(); - return true; -} - bool BlockedPluginManager::LinkClicked(WindowOpenDisposition disposition) { // TODO(bauerb): Navigate to a help page explaining why we blocked the plugin, // once we have one. diff --git a/chrome/browser/blocked_plugin_manager.h b/chrome/browser/blocked_plugin_manager.h index a71c42b..e9f9506 100644 --- a/chrome/browser/blocked_plugin_manager.h +++ b/chrome/browser/blocked_plugin_manager.h @@ -15,8 +15,7 @@ class BlockedPluginManager : public RenderViewHostDelegate::BlockedPlugin, public: explicit BlockedPluginManager(TabContents* tab_contents); - virtual void OnNonSandboxedPluginBlocked(const std::string& plugin, - const string16& name); + virtual void OnNonSandboxedPluginBlocked(const string16& name); virtual void OnBlockedPluginLoaded(); // ConfirmInfoBarDelegate methods @@ -26,14 +25,12 @@ class BlockedPluginManager : public RenderViewHostDelegate::BlockedPlugin, virtual std::wstring GetLinkText(); virtual SkBitmap* GetIcon() const; virtual bool Accept(); - virtual bool Cancel(); virtual bool LinkClicked(WindowOpenDisposition disposition); private: // Owns us. TabContents* tab_contents_; string16 name_; - std::string plugin_; }; #endif // CHROME_BROWSER_BLOCKED_PLUGIN_MANAGER_H_ diff --git a/chrome/browser/cocoa/content_setting_bubble_cocoa.h b/chrome/browser/cocoa/content_setting_bubble_cocoa.h index ae6f422..ecdaaf9 100644 --- a/chrome/browser/cocoa/content_setting_bubble_cocoa.h +++ b/chrome/browser/cocoa/content_setting_bubble_cocoa.h @@ -37,8 +37,6 @@ typedef std::map<NSButton*, int> PopupLinks; // The info button of the cookies bubble. IBOutlet NSButton* infoButton_; - IBOutlet NSTextField* blockedResourcesField_; - scoped_ptr<ContentSettingBubbleModel> contentSettingBubbleModel_; content_setting_bubble::PopupLinks popupLinks_; } diff --git a/chrome/browser/cocoa/content_setting_bubble_cocoa.mm b/chrome/browser/cocoa/content_setting_bubble_cocoa.mm index 9d34f16..de4f73a 100644 --- a/chrome/browser/cocoa/content_setting_bubble_cocoa.mm +++ b/chrome/browser/cocoa/content_setting_bubble_cocoa.mm @@ -20,7 +20,6 @@ #include "grit/generated_resources.h" #include "skia/ext/skia_utils_mac.h" #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" -#include "webkit/glue/plugins/plugin_list.h" namespace { @@ -89,7 +88,6 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { title:(NSString*)title icon:(NSImage*)icon referenceFrame:(NSRect)referenceFrame; -- (void)initializeBlockedPluginsList; - (void)initializeTitle; - (void)initializeRadioGroup; - (void)initializePopupList; @@ -149,10 +147,6 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { if (!titleLabel_) return; - NSString* label = base::SysUTF8ToNSString( - contentSettingBubbleModel_->bubble_content().title); - [titleLabel_ setStringValue:label]; - // Layout title post-localization. CGFloat deltaY = [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:titleLabel_]; @@ -167,22 +161,20 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { - (void)initializeRadioGroup { // Configure the radio group. For now, only deal with the // strictly needed case of group containing 2 radio buttons. - const ContentSettingBubbleModel::RadioGroup& radio_group = + // TODO(joth): Implement the generic case, getting localized strings from the + // bubble model instead of the xib, or remove it if it's never needed. + // http://crbug.com/38432 + const ContentSettingBubbleModel::RadioGroup& radioGroup = contentSettingBubbleModel_->bubble_content().radio_group; // Select appropriate radio button. [allowBlockRadioGroup_ selectCellWithTag: - radio_group.default_item == 0 ? kAllowTag : kBlockTag]; + radioGroup.default_item == 0 ? kAllowTag : kBlockTag]; - const ContentSettingBubbleModel::RadioItems& radio_items = - radio_group.radio_items; - DCHECK_EQ(2u, radio_items.size()) << "Only 2 radio items per group supported"; - // Set radio group labels from model. + // Copy |host_| into radio group label. NSCell* radioCell = [allowBlockRadioGroup_ cellWithTag:kAllowTag]; - [radioCell setTitle:base::SysUTF8ToNSString(radio_items[0])]; - - radioCell = [allowBlockRadioGroup_ cellWithTag:kBlockTag]; - [radioCell setTitle:base::SysUTF8ToNSString(radio_items[1])]; + [radioCell setTitle:cocoa_l10n_util::ReplaceNSStringPlaceholders( + [radioCell title], UTF8ToUTF16(radioGroup.url.host()), NULL)]; // Layout radio group labels post-localization. [GTMUILocalizerAndLayoutTweaker @@ -227,37 +219,6 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { return button; } -- (void)initializeBlockedPluginsList { - NSMutableArray* pluginArray = [NSMutableArray array]; - const std::set<std::string>& plugins = - contentSettingBubbleModel_->bubble_content().resource_identifiers; - if (plugins.empty()) { - int delta = NSMinY([titleLabel_ frame]) - - NSMinY([blockedResourcesField_ frame]); - [blockedResourcesField_ removeFromSuperview]; - NSRect frame = [[self window] frame]; - frame.size.height -= delta; - [[self window] setFrame:frame display:NO]; - } else { - for (std::set<std::string>::iterator it = plugins.begin(); - it != plugins.end(); ++it) { - WebPluginInfo plugin; - NSString* name; - if (NPAPI::PluginList::Singleton()-> - GetPluginInfoByPath(FilePath(*it), &plugin)) { - name = base::SysUTF16ToNSString(plugin.name); - } else { - name = base::SysUTF8ToNSString(*it); - } - [pluginArray addObject:name]; - } - [blockedResourcesField_ - setStringValue:[pluginArray componentsJoinedByString:@"\n"]]; - [GTMUILocalizerAndLayoutTweaker - sizeToFitFixedWidthTextField:blockedResourcesField_]; - } -} - - (void)initializePopupList { // I didn't put the buttons into a NSMatrix because then they are only one // entity in the key view loop. This way, one can tab through all of them. @@ -458,10 +419,8 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { [self initializeTitle]; ContentSettingsType type = contentSettingBubbleModel_->content_type(); - if (type == CONTENT_SETTINGS_TYPE_PLUGINS) { + if (type == CONTENT_SETTINGS_TYPE_PLUGINS) [self sizeToFitLoadPluginsButton]; - [self initializeBlockedPluginsList]; - } if (type == CONTENT_SETTINGS_TYPE_COOKIES) [self removeInfoButton]; if (allowBlockRadioGroup_) // not bound in cookie bubble xib diff --git a/chrome/browser/content_setting_bubble_model.cc b/chrome/browser/content_setting_bubble_model.cc index fd0cae1..7fc7462 100644 --- a/chrome/browser/content_setting_bubble_model.cc +++ b/chrome/browser/content_setting_bubble_model.cc @@ -29,43 +29,21 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { : ContentSettingBubbleModel(tab_contents, profile, content_type) { // Notifications do not have a bubble. DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); - SetBlockedResources(); SetTitle(); SetManageLink(); } private: - void SetBlockedResources() { - TabSpecificContentSettings* settings = - tab_contents()->GetTabSpecificContentSettings(); - const std::set<std::string>& resources = settings->BlockedResourcesForType( - content_type()); - for (std::set<std::string>::const_iterator it = resources.begin(); - it != resources.end(); ++it) { - AddBlockedResource(*it); - } - } - void SetTitle() { static const int kBlockedTitleIDs[] = { IDS_BLOCKED_COOKIES_TITLE, IDS_BLOCKED_IMAGES_TITLE, IDS_BLOCKED_JAVASCRIPT_TITLE, - IDS_BLOCKED_PLUGINS_MESSAGE, + IDS_BLOCKED_PLUGINS_TITLE, IDS_BLOCKED_POPUPS_TITLE, 0, // Geolocation does not have an overall title. 0, // Notifications do not have a bubble. }; - // Fields as for kBlockedTitleIDs, above. - static const int kResourceSpecificBlockedTitleIDs[] = { - 0, - 0, - 0, - IDS_BLOCKED_PLUGINS_TITLE, - 0, - 0, - 0, - }; static const int kAccessedTitleIDs[] = { IDS_ACCESSED_COOKIES_TITLE, 0, @@ -79,9 +57,6 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { Need_a_setting_for_every_content_settings_type); COMPILE_ASSERT(arraysize(kBlockedTitleIDs) == CONTENT_SETTINGS_NUM_TYPES, Need_a_setting_for_every_content_settings_type); - COMPILE_ASSERT(arraysize(kResourceSpecificBlockedTitleIDs) == - CONTENT_SETTINGS_NUM_TYPES, - Need_a_setting_for_every_content_settings_type); const int *title_ids = kBlockedTitleIDs; if (tab_contents() && tab_contents()->GetTabSpecificContentSettings()->IsContentAccessed( @@ -89,11 +64,8 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { !tab_contents()->GetTabSpecificContentSettings()->IsContentBlocked( content_type()) && !CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableCookiePrompt)) { + switches::kEnableCookiePrompt)) title_ids = kAccessedTitleIDs; - } else if (!bubble_content().resource_identifiers.empty()) { - title_ids = kResourceSpecificBlockedTitleIDs; - } if (title_ids[content_type()]) set_title(l10n_util::GetStringUTF8(title_ids[content_type()])); } @@ -179,9 +151,6 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel { &display_host_wide, NULL, NULL); std::string display_host(WideToUTF8(display_host_wide)); - const std::set<std::string>& resources = - bubble_content().resource_identifiers; - RadioGroup radio_group; radio_group.url = url; @@ -189,31 +158,16 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel { 0, // We don't manage cookies here. IDS_BLOCKED_IMAGES_UNBLOCK, IDS_BLOCKED_JAVASCRIPT_UNBLOCK, - IDS_BLOCKED_PLUGINS_UNBLOCK_ALL, + IDS_BLOCKED_PLUGINS_UNBLOCK, IDS_BLOCKED_POPUPS_UNBLOCK, 0, // We don't manage geolocation here. 0, // Notifications do not have a bubble. }; COMPILE_ASSERT(arraysize(kAllowIDs) == CONTENT_SETTINGS_NUM_TYPES, Need_a_setting_for_every_content_settings_type); - // Fields as for kAllowIDs, above. - static const int kResourceSpecificAllowIDs[] = { - 0, - 0, - 0, - IDS_BLOCKED_PLUGINS_UNBLOCK, - 0, - 0, - 0, - }; - COMPILE_ASSERT( - arraysize(kResourceSpecificAllowIDs) == CONTENT_SETTINGS_NUM_TYPES, - Need_a_setting_for_every_content_settings_type); std::string radio_allow_label; - const int* allowIDs = resources.empty() ? - kAllowIDs : kResourceSpecificAllowIDs; radio_allow_label = l10n_util::GetStringFUTF8( - allowIDs[content_type()], UTF8ToUTF16(display_host)); + kAllowIDs[content_type()], UTF8ToUTF16(display_host)); static const int kBlockIDs[] = { 0, // We don't manage cookies here. @@ -232,48 +186,18 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel { radio_group.radio_items.push_back(radio_allow_label); radio_group.radio_items.push_back(radio_block_label); - HostContentSettingsMap* map = profile()->GetHostContentSettingsMap(); - if (resources.empty()) { - ContentSetting setting = map->GetContentSetting(url, content_type(), - std::string()); - radio_group.default_item = (setting == CONTENT_SETTING_ALLOW) ? 0 : 1; - } else { - // The default item is "block" if at least one of the resources - // is blocked. - radio_group.default_item = 0; - for (std::set<std::string>::const_iterator it = resources.begin(); - it != resources.end(); ++it) { - ContentSetting setting = map->GetContentSetting( - url, content_type(), *it); - if (setting == CONTENT_SETTING_BLOCK) { - radio_group.default_item = 1; - break; - } - } - } + radio_group.default_item = + profile()->GetHostContentSettingsMap()->GetContentSetting(url, + content_type(), "") == CONTENT_SETTING_ALLOW ? 0 : 1; set_radio_group(radio_group); } - void AddException(ContentSetting setting, - const std::string& resource_identifier) { - profile()->GetHostContentSettingsMap()->AddExceptionForURL( - bubble_content().radio_group.url, content_type(), resource_identifier, - setting); - } - virtual void OnRadioClicked(int radio_index) { - ContentSetting setting = - radio_index == 0 ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; - const std::set<std::string>& resources = - bubble_content().resource_identifiers; - if (resources.empty()) { - AddException(setting, std::string()); - } else { - for (std::set<std::string>::const_iterator it = resources.begin(); - it != resources.end(); ++it) { - AddException(setting, *it); - } - } + profile()->GetHostContentSettingsMap()->AddExceptionForURL( + bubble_content().radio_group.url, + content_type(), + "", + radio_index == 0 ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK); } }; @@ -462,11 +386,6 @@ ContentSettingBubbleModel::ContentSettingBubbleModel( ContentSettingBubbleModel::~ContentSettingBubbleModel() { } -void ContentSettingBubbleModel::AddBlockedResource( - const std::string& resource_identifier) { - bubble_content_.resource_identifiers.insert(resource_identifier); -} - void ContentSettingBubbleModel::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { diff --git a/chrome/browser/content_setting_bubble_model.h b/chrome/browser/content_setting_bubble_model.h index 97664d8..3d7c08a 100644 --- a/chrome/browser/content_setting_bubble_model.h +++ b/chrome/browser/content_setting_bubble_model.h @@ -58,7 +58,6 @@ class ContentSettingBubbleModel : public NotificationObserver { PopupItems popup_items; RadioGroup radio_group; std::vector<DomainList> domain_lists; - std::set<std::string> resource_identifiers; std::string manage_link; std::string clear_link; std::string info_link; @@ -112,7 +111,6 @@ class ContentSettingBubbleModel : public NotificationObserver { void set_load_plugins_link_enabled(bool enabled) { bubble_content_.load_plugins_link_enabled = enabled; } - void AddBlockedResource(const std::string& resource_identifier); private: TabContents* tab_contents_; diff --git a/chrome/browser/content_setting_bubble_model_unittest.cc b/chrome/browser/content_setting_bubble_model_unittest.cc index 3f443cf..7a77fb9 100644 --- a/chrome/browser/content_setting_bubble_model_unittest.cc +++ b/chrome/browser/content_setting_bubble_model_unittest.cc @@ -47,8 +47,7 @@ class ContentSettingBubbleModelTest : public RenderViewHostTestHarness { TEST_F(ContentSettingBubbleModelTest, ImageRadios) { TabSpecificContentSettings* content_settings = contents()->GetTabSpecificContentSettings(); - content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, - std::string()); + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES); scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( ContentSettingBubbleModel::CreateContentSettingBubbleModel( @@ -66,8 +65,7 @@ TEST_F(ContentSettingBubbleModelTest, ImageRadios) { TEST_F(ContentSettingBubbleModelTest, Cookies) { TabSpecificContentSettings* content_settings = contents()->GetTabSpecificContentSettings(); - content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, - std::string()); + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES); scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( ContentSettingBubbleModel::CreateContentSettingBubbleModel( @@ -84,8 +82,7 @@ TEST_F(ContentSettingBubbleModelTest, Cookies) { TEST_F(ContentSettingBubbleModelTest, Plugins) { TabSpecificContentSettings* content_settings = contents()->GetTabSpecificContentSettings(); - content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS, - std::string()); + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS); scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( ContentSettingBubbleModel::CreateContentSettingBubbleModel( diff --git a/chrome/browser/content_setting_image_model.cc b/chrome/browser/content_setting_image_model.cc index 0593991..e45aead 100644 --- a/chrome/browser/content_setting_image_model.cc +++ b/chrome/browser/content_setting_image_model.cc @@ -61,7 +61,7 @@ const int ContentSettingBlockedImageModel::kBlockedTooltipIDs[] = { IDS_BLOCKED_COOKIES_TITLE, IDS_BLOCKED_IMAGES_TITLE, IDS_BLOCKED_JAVASCRIPT_TITLE, - IDS_BLOCKED_PLUGINS_MESSAGE, + IDS_BLOCKED_PLUGINS_TITLE, IDS_BLOCKED_POPUPS_TOOLTIP, }; diff --git a/chrome/browser/content_setting_image_model_unittest.cc b/chrome/browser/content_setting_image_model_unittest.cc index f16ab93..32aed3e 100644 --- a/chrome/browser/content_setting_image_model_unittest.cc +++ b/chrome/browser/content_setting_image_model_unittest.cc @@ -35,8 +35,7 @@ TEST_F(ContentSettingImageModelTest, UpdateFromTabContents) { EXPECT_EQ(0, content_setting_image_model->get_icon()); EXPECT_EQ(std::string(), content_setting_image_model->get_tooltip()); - content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, - std::string()); + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES); content_setting_image_model->UpdateFromTabContents(&tab_contents); EXPECT_TRUE(content_setting_image_model->is_visible()); diff --git a/chrome/browser/gtk/content_setting_bubble_gtk.cc b/chrome/browser/gtk/content_setting_bubble_gtk.cc index d9edf39..d0d4a56 100644 --- a/chrome/browser/gtk/content_setting_bubble_gtk.cc +++ b/chrome/browser/gtk/content_setting_bubble_gtk.cc @@ -6,7 +6,6 @@ #include "app/l10n_util.h" #include "base/i18n/rtl.h" -#include "base/utf_string_conversions.h" #include "chrome/browser/blocked_popup_container.h" #include "chrome/browser/content_setting_bubble_model.h" #include "chrome/browser/gtk/gtk_chrome_link_button.h" @@ -22,7 +21,6 @@ #include "gfx/gtk_util.h" #include "grit/app_resources.h" #include "grit/generated_resources.h" -#include "webkit/glue/plugins/plugin_list.h" // Padding between content and edge of info bubble. static const int kContentBorder = 7; @@ -81,33 +79,6 @@ void ContentSettingBubbleGtk::BuildBubble() { gtk_box_pack_start(GTK_BOX(bubble_content), label, FALSE, FALSE, 0); } - const std::set<std::string>& plugins = content.resource_identifiers; - if (!plugins.empty()) { - GtkWidget* list_content = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); - - for (std::set<std::string>::const_iterator it = plugins.begin(); - it != plugins.end(); ++it) { - WebPluginInfo plugin; - std::string name; - if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath(FilePath(*it), - &plugin)) { - name = UTF16ToUTF8(plugin.name); - } else { - name = *it; - } - - GtkWidget* label = gtk_label_new(name.c_str()); - GtkWidget* label_box = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(label_box), label, FALSE, FALSE, 0); - - gtk_box_pack_start(GTK_BOX(list_content), - label_box, - FALSE, FALSE, 0); - } - gtk_box_pack_start(GTK_BOX(bubble_content), list_content, FALSE, FALSE, - gtk_util::kControlSpacing); - } - if (content_setting_bubble_model_->content_type() == CONTENT_SETTINGS_TYPE_POPUPS) { const std::vector<ContentSettingBubbleModel::PopupItem>& popup_items = diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc index 0e10e25..dabdc96 100644 --- a/chrome/browser/host_content_settings_map.cc +++ b/chrome/browser/host_content_settings_map.cc @@ -279,7 +279,7 @@ ContentSetting HostContentSettingsMap::GetNonDefaultContentSetting( return GetNonDefaultContentSettings(url).settings[content_type]; if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableResourceContentSettings)) { + switches::kEnableClickToPlay)) { DCHECK(!resource_identifier.empty()); } @@ -405,8 +405,11 @@ void HostContentSettingsMap::GetSettingsForOneType( ContentSettingsType content_type, const std::string& resource_identifier, SettingsForOneType* settings) const { - DCHECK(RequiresResourceIdentifier(content_type) != - resource_identifier.empty()); + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableClickToPlay)) { + DCHECK(!RequiresResourceIdentifier(content_type) || + !resource_identifier.empty()); + } DCHECK(settings); settings->clear(); @@ -482,8 +485,11 @@ void HostContentSettingsMap::SetContentSetting( ContentSetting setting) { DCHECK(kTypeNames[content_type] != NULL); // Don't call this for Geolocation. DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - DCHECK(RequiresResourceIdentifier(content_type) != - resource_identifier.empty()); + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableClickToPlay)) { + DCHECK(!RequiresResourceIdentifier(content_type) || + !resource_identifier.empty()); + } bool early_exit = false; std::string pattern_str(pattern.AsString()); @@ -650,12 +656,14 @@ void HostContentSettingsMap::ClearSettingsForOneType( bool HostContentSettingsMap::RequiresResourceIdentifier( ContentSettingsType content_type) const { +// TODO(bauerb): Enable once all call sites are adopted. +#if 0 if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableResourceContentSettings)) { + switches::kEnableClickToPlay)) return kRequiresResourceIdentifier[content_type]; - } else { + else +#endif return false; - } } void HostContentSettingsMap::SetBlockThirdPartyCookies(bool block) { diff --git a/chrome/browser/host_content_settings_map_unittest.cc b/chrome/browser/host_content_settings_map_unittest.cc index f19f7a2..7690c86 100644 --- a/chrome/browser/host_content_settings_map_unittest.cc +++ b/chrome/browser/host_content_settings_map_unittest.cc @@ -550,6 +550,9 @@ TEST_F(HostContentSettingsMapTest, NonDefaultSettings) { EXPECT_TRUE(SettingsEqual(desired_settings, settings)); } +// TODO(bauerb): Enable once HostContentSettingsMap::RequiersResourceIdentifier +// is changed. +#if 0 TEST_F(HostContentSettingsMapTest, ResourceIdentifier) { // This feature is currently behind a flag. CommandLine cl(*CommandLine::ForCurrentProcess()); @@ -581,8 +584,7 @@ TEST_F(HostContentSettingsMapTest, ResourceIdentifier) { TEST_F(HostContentSettingsMapTest, ResourceIdentifierPrefs) { // This feature is currently behind a flag. CommandLine cl(*CommandLine::ForCurrentProcess()); - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableResourceContentSettings); + CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableClickToPlay); TestingProfile profile; profile.GetPrefs()->SetUserPref(prefs::kContentSettingsPatterns, @@ -619,5 +621,6 @@ TEST_F(HostContentSettingsMapTest, ResourceIdentifierPrefs) { prefs_as_json.c_str()); *CommandLine::ForCurrentProcess() = cl; } +#endif } // namespace diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 98397cd..a9af09a 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -577,7 +577,6 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer( switches::kDisableOutdatedPlugins, switches::kEnableRemoting, switches::kEnableClickToPlay, - switches::kEnableResourceContentSettings, switches::kPrelaunchGpuProcess, switches::kEnableContentPrefetch, switches::kDisableContentPrefetch, diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index a03f4e4..b957d28 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -1536,12 +1536,11 @@ void RenderViewHost::OnMissingPluginStatus(int status) { integration_delegate->OnMissingPluginStatus(status); } -void RenderViewHost::OnNonSandboxedPluginBlocked(const std::string& plugin, - const string16& name) { +void RenderViewHost::OnNonSandboxedPluginBlocked(const string16& name) { RenderViewHostDelegate::BlockedPlugin* blocked_plugin_delegate = delegate_->GetBlockedPluginDelegate(); if (blocked_plugin_delegate) { - blocked_plugin_delegate->OnNonSandboxedPluginBlocked(plugin, name); + blocked_plugin_delegate->OnNonSandboxedPluginBlocked(name); } } @@ -1997,12 +1996,11 @@ void RenderViewHost::OnPageTranslated(int32 page_id, translated_lang, error_type); } -void RenderViewHost::OnContentBlocked(ContentSettingsType type, - const std::string& resource_identifier) { +void RenderViewHost::OnContentBlocked(ContentSettingsType type) { RenderViewHostDelegate::ContentSettings* content_settings_delegate = delegate_->GetContentSettingsDelegate(); if (content_settings_delegate) - content_settings_delegate->OnContentBlocked(type, resource_identifier); + content_settings_delegate->OnContentBlocked(type); } void RenderViewHost::OnAppCacheAccessed(const GURL& manifest_url, diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 9e489e9..b47bb57 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -599,8 +599,7 @@ class RenderViewHost : public RenderWidgetHost { void OnUserMetricsRecordAction(const std::string& action); void OnMissingPluginStatus(int status); - void OnNonSandboxedPluginBlocked(const std::string& plugin, - const string16& name); + void OnNonSandboxedPluginBlocked(const string16& name); void OnBlockedPluginLoaded(); void OnCrashedPlugin(const FilePath& plugin_path); void OnDisabledOutdatedPlugin(const string16& name, const GURL& update_url); @@ -652,8 +651,7 @@ class RenderViewHost : public RenderWidgetHost { const std::string& original_lang, const std::string& translated_lang, TranslateErrors::Type error_type); - void OnContentBlocked(ContentSettingsType type, - const std::string& resource_identifier); + void OnContentBlocked(ContentSettingsType type); void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); void OnWebDatabaseAccessed(const GURL& url, const string16& name, diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 13c728e..0be5784 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -344,8 +344,7 @@ class RenderViewHostDelegate { public: // Called when content in the current page was blocked due to the user's // content settings. - virtual void OnContentBlocked(ContentSettingsType type, - const std::string& resource_identifier) = 0; + virtual void OnContentBlocked(ContentSettingsType type) = 0; // Called when a specific cookie in the current page was accessed. // |blocked_by_policy| should be true, if the cookie was blocked due to the @@ -545,8 +544,7 @@ class RenderViewHostDelegate { class BlockedPlugin { public: - virtual void OnNonSandboxedPluginBlocked(const std::string& plugin, - const string16& name) = 0; + virtual void OnNonSandboxedPluginBlocked(const string16& name) = 0; virtual void OnBlockedPluginLoaded() = 0; }; diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index c06ef55..c123007 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -716,7 +716,6 @@ void ResourceMessageFilter::OnGetPluginInfo(const GURL& url, const std::string& mime_type, bool* found, WebPluginInfo* info, - ContentSetting* setting, std::string* actual_mime_type) { bool allow_wildcard = true; *found = NPAPI::PluginList::Singleton()->GetPluginInfo(url, @@ -727,14 +726,6 @@ void ResourceMessageFilter::OnGetPluginInfo(const GURL& url, if (*found) { info->enabled = info->enabled && plugin_service_->PrivatePluginAllowedForURL(info->path, policy_url); - HostContentSettingsMap* map = profile_->GetHostContentSettingsMap(); - *setting = map->GetNonDefaultContentSetting( - policy_url, CONTENT_SETTINGS_TYPE_PLUGINS, info->path.ToString()); - if (*setting == CONTENT_SETTING_DEFAULT && - map->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS) == - CONTENT_SETTING_BLOCK) { - *setting = CONTENT_SETTING_BLOCK; - } } } diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 152d978..19320e0 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -24,7 +24,6 @@ #include "build/build_config.h" #include "chrome/browser/net/resolve_proxy_msg_helper.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" -#include "chrome/common/content_settings.h" #include "chrome/common/window_container_type.h" #include "gfx/native_widget_types.h" #include "ipc/ipc_channel_proxy.h" @@ -184,7 +183,6 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, const std::string& mime_type, bool* found, WebPluginInfo* info, - ContentSetting* setting, std::string* actual_mime_type); void OnOpenChannelToPlugin(const GURL& url, const std::string& mime_type, diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 30e74e7..42f63db 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -1512,8 +1512,7 @@ void TabContents::AddPopup(TabContents* new_contents, if (!blocked_popups_) blocked_popups_ = new BlockedPopupContainer(this); blocked_popups_->AddTabContents(new_contents, initial_pos); - content_settings_delegate_->OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS, - std::string()); + content_settings_delegate_->OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS); } } diff --git a/chrome/browser/tab_contents/tab_specific_content_settings.cc b/chrome/browser/tab_contents/tab_specific_content_settings.cc index 2070eb7..14a921e 100644 --- a/chrome/browser/tab_contents/tab_specific_content_settings.cc +++ b/chrome/browser/tab_contents/tab_specific_content_settings.cc @@ -47,35 +47,12 @@ bool TabSpecificContentSettings::IsContentAccessed( return content_accessed_[content_type]; } -const std::set<std::string>& - TabSpecificContentSettings::BlockedResourcesForType( - ContentSettingsType content_type) const { - if (blocked_resources_[content_type].get()) { - return *blocked_resources_[content_type]; - } else { - static std::set<std::string> empty_set; - return empty_set; - } -} - -void TabSpecificContentSettings::AddBlockedResource( - ContentSettingsType content_type, - const std::string& resource_identifier) { - if (!blocked_resources_[content_type].get()) - blocked_resources_[content_type].reset(new std::set<std::string>()); - blocked_resources_[content_type]->insert(resource_identifier); -} - -void TabSpecificContentSettings::OnContentBlocked( - ContentSettingsType type, - const std::string& resource_identifier) { +void TabSpecificContentSettings::OnContentBlocked(ContentSettingsType type) { DCHECK(type != CONTENT_SETTINGS_TYPE_GEOLOCATION) << "Geolocation settings handled by OnGeolocationPermissionSet"; content_accessed_[type] = true; if (!content_blocked_[type]) { content_blocked_[type] = true; - if (!resource_identifier.empty()) - AddBlockedResource(type, resource_identifier); if (delegate_) delegate_->OnContentSettingsAccessed(true); } @@ -98,7 +75,7 @@ void TabSpecificContentSettings::OnCookieAccessed( if (blocked_by_policy) { blocked_local_shared_objects_.cookies()->SetCookieWithOptions( url, cookie_line, options); - OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); + OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES); } else { allowed_local_shared_objects_.cookies()->SetCookieWithOptions( url, cookie_line, options); @@ -118,7 +95,7 @@ void TabSpecificContentSettings::OnLocalStorageAccessed( helper->AddLocalStorage(url); if (blocked_by_policy) - OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); + OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES); else OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES); } @@ -132,7 +109,7 @@ void TabSpecificContentSettings::OnWebDatabaseAccessed( if (blocked_by_policy) { blocked_local_shared_objects_.databases()->AddDatabase( url, UTF16ToUTF8(name), UTF16ToUTF8(display_name)); - OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); + OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES); } else { allowed_local_shared_objects_.databases()->AddDatabase( url, UTF16ToUTF8(name), UTF16ToUTF8(display_name)); @@ -144,7 +121,7 @@ void TabSpecificContentSettings::OnAppCacheAccessed( const GURL& manifest_url, bool blocked_by_policy) { if (blocked_by_policy) { blocked_local_shared_objects_.appcaches()->AddAppCache(manifest_url); - OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); + OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES); } else { allowed_local_shared_objects_.appcaches()->AddAppCache(manifest_url); OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES); @@ -173,7 +150,6 @@ TabSpecificContentSettings::TabSpecificContentSettings( void TabSpecificContentSettings::ClearBlockedContentSettings() { for (size_t i = 0; i < arraysize(content_blocked_); ++i) { - blocked_resources_[i].reset(); content_blocked_[i] = false; content_accessed_[i] = false; } diff --git a/chrome/browser/tab_contents/tab_specific_content_settings.h b/chrome/browser/tab_contents/tab_specific_content_settings.h index f6ec971..82976c4 100644 --- a/chrome/browser/tab_contents/tab_specific_content_settings.h +++ b/chrome/browser/tab_contents/tab_specific_content_settings.h @@ -60,9 +60,6 @@ class TabSpecificContentSettings // only tracks cookies. bool IsContentAccessed(ContentSettingsType content_type) const; - const std::set<std::string>& BlockedResourcesForType( - ContentSettingsType content_type) const; - // Returns the GeolocationSettingsState that controls the // geolocation API usage on this page. const GeolocationSettingsState& geolocation_settings_state() const { @@ -81,8 +78,7 @@ class TabSpecificContentSettings } // RenderViewHostDelegate::ContentSettings implementation. - virtual void OnContentBlocked(ContentSettingsType type, - const std::string& resource_identifier); + virtual void OnContentBlocked(ContentSettingsType type); virtual void OnCookieAccessed(const GURL& url, const std::string& cookie_line, bool blocked_by_policy); @@ -136,9 +132,6 @@ class TabSpecificContentSettings scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; }; - void AddBlockedResource(ContentSettingsType content_type, - const std::string& resource_identifier); - void OnContentAccessed(ContentSettingsType type); // Stores which content setting types actually have blocked content. @@ -147,11 +140,6 @@ class TabSpecificContentSettings // Stores which content setting types actually were accessed. bool content_accessed_[CONTENT_SETTINGS_NUM_TYPES]; - // Stores the blocked resources for each content type. - // Currently only used for plugins. - scoped_ptr<std::set<std::string> > - blocked_resources_[CONTENT_SETTINGS_NUM_TYPES]; - // Stores the blocked/allowed cookies. LocalSharedObjectsContainer allowed_local_shared_objects_; LocalSharedObjectsContainer blocked_local_shared_objects_; diff --git a/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc b/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc index ed4d836..6129f7d 100644 --- a/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc +++ b/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc @@ -55,8 +55,7 @@ TEST(TabSpecificContentSettingsTest, BlockedContent) { EXPECT_TRUE(test_delegate.SettingsChanged()); EXPECT_FALSE(test_delegate.ContentBlocked()); test_delegate.Reset(); - content_settings.OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, - std::string()); + content_settings.OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES); EXPECT_TRUE(test_delegate.SettingsChanged()); EXPECT_TRUE(test_delegate.ContentBlocked()); test_delegate.Reset(); diff --git a/chrome/browser/views/content_setting_bubble_views.cc b/chrome/browser/views/content_setting_bubble_views.cc index 769f5a2..f0f541e 100644 --- a/chrome/browser/views/content_setting_bubble_views.cc +++ b/chrome/browser/views/content_setting_bubble_views.cc @@ -27,7 +27,6 @@ #include "views/controls/separator.h" #include "views/grid_layout.h" #include "views/standard_layout.h" -#include "webkit/glue/plugins/plugin_list.h" class ContentSettingBubbleContents::Favicon : public views::ImageView { public: @@ -202,24 +201,6 @@ void ContentSettingBubbleContents::InitControlLayout() { layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); } - const std::set<std::string>& plugins = bubble_content.resource_identifiers; - if (!plugins.empty()) { - for (std::set<std::string>::const_iterator it = plugins.begin(); - it != plugins.end(); ++it) { - WebPluginInfo plugin; - std::wstring name; - if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath( - FilePath::FromString(*it), &plugin)) { - name = UTF16ToWide(plugin.name); - } else { - name = UTF8ToWide(*it); - } - layout->StartRow(0, single_column_set_id); - layout->AddView(new views::Label(name)); - } - layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); - } - if (content_setting_bubble_model_->content_type() == CONTENT_SETTINGS_TYPE_POPUPS) { const int popup_column_set_id = 2; diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 53cc519..3f8b0f5 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -396,10 +396,6 @@ const char kEnableNaCl[] = "enable-nacl"; // Enable Native Web Worker support. const char kEnableNativeWebWorkers[] = "enable-native-web-workers"; -// Enable content settings based on host *and* plug-in. -const char kEnableResourceContentSettings[] = - "enable-resource-content-settings"; - // Enable speculative TCP/IP preconnection. const char kEnablePreconnect[] = "enable-preconnect"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index bd2f42b..dde93de 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -131,7 +131,6 @@ extern const char kEnableNativeWebWorkers[]; extern const char kEnablePreconnect[]; extern const char kEnablePreparsedJsCaching[]; extern const char kEnablePrintPreview[]; -extern const char kEnableResourceContentSettings[]; extern const char kEnableSearchProviderApiV2[]; extern const char kEnableSpeechInput[]; extern const char kEnableStatsTable[]; diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 68df701..7eb594d 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -1268,23 +1268,12 @@ IPC_BEGIN_MESSAGES(ViewHost) // Return information about a plugin for the given URL and MIME type. If there // is no matching plugin, |found| is set to false. - // If |enabled| in the WebPluginInfo struct is false, the plug-in is basically - // treated as if it was not installed at all. - // If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is blocked by the - // content settings for |policy_url|. It still appears in navigator.plugins in - // Javascript though, and can be loaded via click-to-play. - // If |setting| is set to CONTENT_SETTING_ALLOW, the domain is explicitly - // white-listed for the plug-in. - // If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is neither - // blocked nor white-listed, which means that it's allowed by default and - // can still be blocked if it's non-sandboxed. - IPC_SYNC_MESSAGE_CONTROL3_4(ViewHostMsg_GetPluginInfo, + IPC_SYNC_MESSAGE_CONTROL3_3(ViewHostMsg_GetPluginInfo, GURL /* url */, GURL /* policy_url */, std::string /* mime_type */, bool /* found */, WebPluginInfo /* plugin info */, - ContentSetting /* setting */, std::string /* actual_mime_type */) // Requests spellcheck for a word. @@ -1315,9 +1304,8 @@ IPC_BEGIN_MESSAGES(ViewHost) // Tells the browser that content in the current page was blocked due to the // user's content settings. - IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked, - ContentSettingsType, /* type of blocked content */ - std::string /* resource identifier */) + IPC_MESSAGE_ROUTED1(ViewHostMsg_ContentBlocked, + ContentSettingsType /* type of blocked content */) // Tells the browser that a specific Appcache manifest in the current page // was accessed. @@ -1705,8 +1693,7 @@ IPC_BEGIN_MESSAGES(ViewHost) int /* status */) // Notifies when a non-sandboxed plugin was blocked. - IPC_MESSAGE_ROUTED2(ViewHostMsg_NonSandboxedPluginBlocked, - std::string /* plugin */, + IPC_MESSAGE_ROUTED1(ViewHostMsg_NonSandboxedPluginBlocked, string16 /* name */) // Notifies when a blocked plugin was loaded via click-to-load. diff --git a/chrome/renderer/blocked_plugin.cc b/chrome/renderer/blocked_plugin.cc index 89e64a5..b3c0973 100644 --- a/chrome/renderer/blocked_plugin.cc +++ b/chrome/renderer/blocked_plugin.cc @@ -57,7 +57,7 @@ BlockedPlugin::BlockedPlugin(RenderView* render_view, values.SetString(L"updatePlugin", l10n_util::GetStringUTF16(IDS_PLUGIN_UPDATE)); values.SetString(L"message", - l10n_util::GetStringUTF16(IDS_BLOCKED_PLUGINS_MESSAGE)); + l10n_util::GetStringUTF16(IDS_BLOCKED_PLUGINS_TITLE)); if (group) values.Set(L"pluginGroup", group->GetDataForUI()); diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 234b056..07595ea 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -560,11 +560,10 @@ WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, const WebPluginParams& params) { WebPluginInfo info; bool found; - ContentSetting setting; std::string mime_type; Send(new ViewHostMsg_GetPluginInfo( params.url, frame->top()->url(), params.mimeType.utf8(), &found, - &info, &setting, &mime_type)); + &info, &mime_type)); if (!found || !info.enabled) return NULL; scoped_refptr<pepper::PluginModule> pepper_module = @@ -2256,8 +2255,6 @@ void RenderView::runModal() { WebPlugin* RenderView::createPlugin(WebFrame* frame, const WebPluginParams& params) { bool found = false; - ContentSetting setting = CONTENT_SETTING_DEFAULT; - CommandLine* cmd = CommandLine::ForCurrentProcess(); WebPluginInfo info; GURL url(params.url); std::string actual_mime_type; @@ -2266,7 +2263,6 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame, params.mimeType.utf8(), &found, &info, - &setting, &actual_mime_type)); if (!found) @@ -2276,7 +2272,8 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame, group->AddPlugin(info, 0); if (!info.enabled) { - if (cmd->HasSwitch(switches::kDisableOutdatedPlugins) && + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableOutdatedPlugins) && group->IsVulnerable()) { Send(new ViewHostMsg_DisabledOutdatedPlugin(routing_id_, group->GetGroupName(), @@ -2287,13 +2284,10 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame, } if (info.path.value() != kDefaultPluginLibraryName) { - std::string resource; - if (cmd->HasSwitch(switches::kEnableResourceContentSettings)) { - resource = info.path.ToString(); - } - if (setting == CONTENT_SETTING_BLOCK) { - DCHECK(cmd->HasSwitch(switches::kEnableClickToPlay)); - DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, resource); + if (!AllowContentType(CONTENT_SETTINGS_TYPE_PLUGINS)) { + DCHECK(CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableClickToPlay)); + didNotAllowPlugins(frame); return CreatePluginPlaceholder(frame, params, NULL); } scoped_refptr<pepper::PluginModule> pepper_module = @@ -2301,10 +2295,8 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame, if (pepper_module) return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kBlockNonSandboxedPlugins) && - setting != CONTENT_SETTING_ALLOW) { + switches::kBlockNonSandboxedPlugins)) { Send(new ViewHostMsg_NonSandboxedPluginBlocked(routing_id_, - resource, group->GetGroupName())); return CreatePluginPlaceholder(frame, params, NULL); } @@ -2447,7 +2439,7 @@ bool RenderView::allowImages(WebFrame* frame, bool enabled_per_settings) { if (IsWhitelistedForContentSettings(frame)) return true; - DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES, std::string()); + DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES); return false; // Other protocols fall through here. } @@ -3248,11 +3240,11 @@ bool RenderView::allowDatabase( return result; } void RenderView::didNotAllowScript(WebKit::WebFrame* frame) { - DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string()); + DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT); } void RenderView::didNotAllowPlugins(WebKit::WebFrame* frame) { - DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, std::string()); + DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); } void RenderView::didExhaustMemoryAvailableForScript(WebFrame* frame) { @@ -3803,12 +3795,10 @@ bool RenderView::AllowContentType(ContentSettingsType settings_type) { CONTENT_SETTING_BLOCK; } -void RenderView::DidBlockContentType(ContentSettingsType settings_type, - const std::string& resource_identifier) { +void RenderView::DidBlockContentType(ContentSettingsType settings_type) { if (!content_blocked_[settings_type]) { content_blocked_[settings_type] = true; - Send(new ViewHostMsg_ContentBlocked(routing_id_, settings_type, - resource_identifier)); + Send(new ViewHostMsg_ContentBlocked(routing_id_, settings_type)); } } diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index f2b0484..53e3d6d 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -881,8 +881,7 @@ class RenderView : public RenderWidget, PluginGroup* group); // Sends an IPC notification that the specified content type was blocked. - void DidBlockContentType(ContentSettingsType settings_type, - const std::string& resource_identifier); + void DidBlockContentType(ContentSettingsType settings_type); // This callback is triggered when DownloadImage completes, either // succesfully or with a failure. See DownloadImage for more details. |