summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 15:36:59 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 15:36:59 +0000
commite1796d57db05121ddd7fbf913a276fc52ec75008 (patch)
tree03a1b658285e58f29af4aeb1521b42a6ad62bd5c /chrome
parent670a9a2182a6b344a873bd0b86be61b1ea67febc (diff)
downloadchromium_src-e1796d57db05121ddd7fbf913a276fc52ec75008.zip
chromium_src-e1796d57db05121ddd7fbf913a276fc52ec75008.tar.gz
chromium_src-e1796d57db05121ddd7fbf913a276fc52ec75008.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd13
-rw-r--r--chrome/app/nibs/ContentBlockedPlugins.xib887
-rw-r--r--chrome/browser/blocked_plugin_manager.cc27
-rw-r--r--chrome/browser/blocked_plugin_manager.h5
-rw-r--r--chrome/browser/cocoa/content_setting_bubble_cocoa.h2
-rw-r--r--chrome/browser/cocoa/content_setting_bubble_cocoa.mm59
-rw-r--r--chrome/browser/content_setting_bubble_model.cc105
-rw-r--r--chrome/browser/content_setting_bubble_model.h2
-rw-r--r--chrome/browser/content_setting_bubble_model_unittest.cc9
-rw-r--r--chrome/browser/content_setting_image_model.cc2
-rw-r--r--chrome/browser/content_setting_image_model_unittest.cc3
-rw-r--r--chrome/browser/gtk/content_setting_bubble_gtk.cc29
-rw-r--r--chrome/browser/host_content_settings_map.cc24
-rw-r--r--chrome/browser/host_content_settings_map_unittest.cc7
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc1
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc10
-rw-r--r--chrome/browser/renderer_host/render_view_host.h6
-rw-r--r--chrome/browser/renderer_host/render_view_host_delegate.h6
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc9
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc3
-rw-r--r--chrome/browser/tab_contents/tab_specific_content_settings.cc34
-rw-r--r--chrome/browser/tab_contents/tab_specific_content_settings.h14
-rw-r--r--chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc3
-rw-r--r--chrome/browser/views/content_setting_bubble_views.cc19
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/render_messages_internal.h21
-rw-r--r--chrome/renderer/blocked_plugin.cc2
-rw-r--r--chrome/renderer/render_view.cc36
-rw-r--r--chrome/renderer/render_view.h3
31 files changed, 1193 insertions, 155 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index fbb44ce..c790942 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -2376,12 +2376,18 @@ 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="Tooltip and bubble info header text when a page is not allowed to display plug-ins.">
+ <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.">
Plug-ins were blocked on this page.
</message>
- <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.">
+ <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.">
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>
@@ -2391,6 +2397,9 @@ 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 574dc74..0fa7627 100644
--- a/chrome/app/nibs/ContentBlockedPlugins.xib
+++ b/chrome/app/nibs/ContentBlockedPlugins.xib
@@ -1,14 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <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>
+ <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>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="35"/>
+ <integer value="4"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -16,7 +20,7 @@
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -37,12 +41,12 @@
<object class="NSWindowTemplate" id="1005">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{196, 353}, {314, 157}}</string>
+ <string key="NSWindowRect">{{196, 353}, {314, 179}}</string>
<int key="NSWTFlags">536873984</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">InfoBubbleWindow</string>
<nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="1006">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -53,6 +57,42 @@
<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">&lt;Do not localize&gt;</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>
@@ -68,11 +108,7 @@
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134348800</int>
<string key="NSContents">^IDS_BLOCKED_PLUGINS_LOAD_ALL</string>
- <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="NSSupport" ref="26"/>
<reference key="NSControlView" ref="641116266"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">164</int>
@@ -90,7 +126,7 @@
<object class="NSTextField" id="266815090">
<reference key="NSNextResponder" ref="301729179"/>
<int key="NSvFlags">266</int>
- <string key="NSFrame">{{17, 123}, {280, 14}}</string>
+ <string key="NSFrame">{{17, 145}, {280, 14}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="157361777">
@@ -99,24 +135,8 @@
<string key="NSContents">^IDS_BLOCKED_PLUGINS_TITLE</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="266815090"/>
- <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>
+ <reference key="NSBackgroundColor" ref="657398381"/>
+ <reference key="NSTextColor" ref="96266275"/>
</object>
</object>
<object class="NSMatrix" id="126329017">
@@ -134,8 +154,8 @@
<int key="NSCellFlags2">131072</int>
<string key="NSContents">^IDS_BLOCKED_PLUGINS_UNBLOCK</string>
<reference key="NSSupport" ref="26"/>
- <int key="NSTag">1</int>
<reference key="NSControlView" ref="126329017"/>
+ <int key="NSTag">1</int>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">0</int>
<object class="NSButtonImageSource" key="NSAlternateImage" id="564397696">
@@ -151,8 +171,8 @@
<int key="NSCellFlags2">131072</int>
<string key="NSContents">^IDS_BLOCKED_PLUGINS_NO_ACTION</string>
<reference key="NSSupport" ref="26"/>
- <int key="NSTag">2</int>
<reference key="NSControlView" ref="126329017"/>
+ <int key="NSTag">2</int>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">0</int>
<object class="NSImage" key="NSNormalImage">
@@ -162,7 +182,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="0" id="8"/>
+ <integer value="0"/>
<object class="NSBitmapImageRep">
<object class="NSData" key="NSTIFFRepresentation">
<bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
@@ -188,7 +208,7 @@ AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu
AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB
AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
-AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABBxwAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
+AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw
cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@@ -274,7 +294,7 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="8"/>
+ <integer value="0"/>
<object class="NSBitmapImageRep">
<object class="NSData" key="NSTIFFRepresentation">
<bytes key="NS.bytes">TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA
@@ -300,7 +320,7 @@ AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu
AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB
AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
-AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABBxwAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
+AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS
AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
@@ -321,7 +341,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSFont" key="NSFont" id="419827241">
<string key="NSName">LucidaGrande</string>
- <double key="NSSize">1.300000e+01</double>
+ <double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
</object>
@@ -413,16 +433,16 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="NSClassName">GTMWidthBasedTweaker</string>
</object>
</object>
- <string key="NSFrameSize">{314, 157}</string>
+ <string key="NSFrameSize">{314, 179}</string>
<reference key="NSSuperview" ref="1006"/>
<string key="NSClassName">InfoBubbleView</string>
</object>
</object>
- <string key="NSFrameSize">{314, 157}</string>
+ <string key="NSFrameSize">{314, 179}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
- <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
</object>
<object class="NSCustomObject" id="670916757">
<string key="NSClassName">ChromeUILocalizer</string>
@@ -546,34 +566,40 @@ 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>
- <object class="NSArray" key="object" id="134356264">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="object" ref="0"/>
<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="134356264"/>
- <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1003"/>
- <reference key="parent" ref="134356264"/>
+ <reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1004"/>
- <reference key="parent" ref="134356264"/>
+ <reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
@@ -583,7 +609,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1006"/>
</object>
- <reference key="parent" ref="134356264"/>
+ <reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
@@ -605,6 +631,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference ref="730386640"/>
<reference ref="395762087"/>
<reference ref="242530517"/>
+ <reference ref="169749286"/>
</object>
<reference key="parent" ref="1006"/>
</object>
@@ -656,12 +683,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="IBObjectRecord">
<int key="objectID">20</int>
<reference key="object" ref="670916757"/>
- <reference key="parent" ref="134356264"/>
+ <reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">21</int>
<reference key="object" ref="684547419"/>
- <reference key="parent" ref="134356264"/>
+ <reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">28</int>
@@ -732,11 +759,25 @@ 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="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
@@ -760,6 +801,8 @@ 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>
@@ -770,9 +813,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{32, 644}, {314, 157}}</string>
+ <string>{{641, 625}, {314, 179}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{32, 644}, {314, 157}}</string>
+ <string>{{641, 625}, {314, 179}}</string>
<boolean value="NO"/>
<string>{196, 240}</string>
<string>{{357, 418}, {480, 270}}</string>
@@ -793,13 +836,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>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
@@ -807,15 +850,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">37</int>
+ <int key="maxID">40</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -853,7 +894,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="superclassName">BaseBubbleController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>allowBlockToggled:</string>
<string>closeBubble:</string>
@@ -872,11 +913,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" 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>
@@ -884,10 +927,12 @@ 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>
@@ -901,7 +946,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>otherObjectToLocalize_</string>
<string>owner_</string>
@@ -924,7 +969,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>localizerOwner_</string>
<string>localizer_</string>
@@ -947,7 +992,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="superclassName">NSView</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>viewToResize_</string>
<string>viewToSlideAndResize_</string>
@@ -1028,8 +1073,714 @@ 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 92b7c91..b073b1f 100644
--- a/chrome/browser/blocked_plugin_manager.cc
+++ b/chrome/browser/blocked_plugin_manager.cc
@@ -6,9 +6,13 @@
#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"
@@ -16,7 +20,10 @@ BlockedPluginManager::BlockedPluginManager(TabContents* tab_contents)
: ConfirmInfoBarDelegate(tab_contents),
tab_contents_(tab_contents) { }
-void BlockedPluginManager::OnNonSandboxedPluginBlocked(const string16& name) {
+void BlockedPluginManager::OnNonSandboxedPluginBlocked(
+ const std::string& plugin,
+ const string16& name) {
+ plugin_ = plugin;
name_ = name;
tab_contents_->AddInfoBar(this);
}
@@ -26,12 +33,18 @@ void BlockedPluginManager::OnBlockedPluginLoaded() {
}
int BlockedPluginManager::GetButtons() const {
- return BUTTON_OK;
+ int buttons = BUTTON_OK;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableResourceContentSettings))
+ buttons |= BUTTON_CANCEL;
+ return buttons;
}
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);
}
@@ -54,6 +67,16 @@ 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 e9f9506..a71c42b 100644
--- a/chrome/browser/blocked_plugin_manager.h
+++ b/chrome/browser/blocked_plugin_manager.h
@@ -15,7 +15,8 @@ class BlockedPluginManager : public RenderViewHostDelegate::BlockedPlugin,
public:
explicit BlockedPluginManager(TabContents* tab_contents);
- virtual void OnNonSandboxedPluginBlocked(const string16& name);
+ virtual void OnNonSandboxedPluginBlocked(const std::string& plugin,
+ const string16& name);
virtual void OnBlockedPluginLoaded();
// ConfirmInfoBarDelegate methods
@@ -25,12 +26,14 @@ 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 ecdaaf9..ae6f422 100644
--- a/chrome/browser/cocoa/content_setting_bubble_cocoa.h
+++ b/chrome/browser/cocoa/content_setting_bubble_cocoa.h
@@ -37,6 +37,8 @@ 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 de4f73a..9d34f16 100644
--- a/chrome/browser/cocoa/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/cocoa/content_setting_bubble_cocoa.mm
@@ -20,6 +20,7 @@
#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 {
@@ -88,6 +89,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
title:(NSString*)title
icon:(NSImage*)icon
referenceFrame:(NSRect)referenceFrame;
+- (void)initializeBlockedPluginsList;
- (void)initializeTitle;
- (void)initializeRadioGroup;
- (void)initializePopupList;
@@ -147,6 +149,10 @@ 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_];
@@ -161,20 +167,22 @@ 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.
- // 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 =
+ const ContentSettingBubbleModel::RadioGroup& radio_group =
contentSettingBubbleModel_->bubble_content().radio_group;
// Select appropriate radio button.
[allowBlockRadioGroup_ selectCellWithTag:
- radioGroup.default_item == 0 ? kAllowTag : kBlockTag];
+ radio_group.default_item == 0 ? kAllowTag : kBlockTag];
- // Copy |host_| into radio group label.
+ 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.
NSCell* radioCell = [allowBlockRadioGroup_ cellWithTag:kAllowTag];
- [radioCell setTitle:cocoa_l10n_util::ReplaceNSStringPlaceholders(
- [radioCell title], UTF8ToUTF16(radioGroup.url.host()), NULL)];
+ [radioCell setTitle:base::SysUTF8ToNSString(radio_items[0])];
+
+ radioCell = [allowBlockRadioGroup_ cellWithTag:kBlockTag];
+ [radioCell setTitle:base::SysUTF8ToNSString(radio_items[1])];
// Layout radio group labels post-localization.
[GTMUILocalizerAndLayoutTweaker
@@ -219,6 +227,37 @@ 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.
@@ -419,8 +458,10 @@ 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 7fc7462..fd0cae1 100644
--- a/chrome/browser/content_setting_bubble_model.cc
+++ b/chrome/browser/content_setting_bubble_model.cc
@@ -29,21 +29,43 @@ 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_TITLE,
+ IDS_BLOCKED_PLUGINS_MESSAGE,
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,
@@ -57,6 +79,9 @@ 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(
@@ -64,8 +89,11 @@ 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()]));
}
@@ -151,6 +179,9 @@ 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;
@@ -158,16 +189,31 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel {
0, // We don't manage cookies here.
IDS_BLOCKED_IMAGES_UNBLOCK,
IDS_BLOCKED_JAVASCRIPT_UNBLOCK,
- IDS_BLOCKED_PLUGINS_UNBLOCK,
+ IDS_BLOCKED_PLUGINS_UNBLOCK_ALL,
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(
- kAllowIDs[content_type()], UTF8ToUTF16(display_host));
+ allowIDs[content_type()], UTF8ToUTF16(display_host));
static const int kBlockIDs[] = {
0, // We don't manage cookies here.
@@ -186,18 +232,48 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel {
radio_group.radio_items.push_back(radio_allow_label);
radio_group.radio_items.push_back(radio_block_label);
- radio_group.default_item =
- profile()->GetHostContentSettingsMap()->GetContentSetting(url,
- content_type(), "") == CONTENT_SETTING_ALLOW ? 0 : 1;
+ 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;
+ }
+ }
+ }
set_radio_group(radio_group);
}
- virtual void OnRadioClicked(int radio_index) {
+ void AddException(ContentSetting setting,
+ const std::string& resource_identifier) {
profile()->GetHostContentSettingsMap()->AddExceptionForURL(
- bubble_content().radio_group.url,
- content_type(),
- "",
- radio_index == 0 ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK);
+ 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);
+ }
+ }
}
};
@@ -386,6 +462,11 @@ 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 3d7c08a..97664d8 100644
--- a/chrome/browser/content_setting_bubble_model.h
+++ b/chrome/browser/content_setting_bubble_model.h
@@ -58,6 +58,7 @@ 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;
@@ -111,6 +112,7 @@ 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 7a77fb9..3f443cf 100644
--- a/chrome/browser/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/content_setting_bubble_model_unittest.cc
@@ -47,7 +47,8 @@ class ContentSettingBubbleModelTest : public RenderViewHostTestHarness {
TEST_F(ContentSettingBubbleModelTest, ImageRadios) {
TabSpecificContentSettings* content_settings =
contents()->GetTabSpecificContentSettings();
- content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES);
+ content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES,
+ std::string());
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
@@ -65,7 +66,8 @@ TEST_F(ContentSettingBubbleModelTest, ImageRadios) {
TEST_F(ContentSettingBubbleModelTest, Cookies) {
TabSpecificContentSettings* content_settings =
contents()->GetTabSpecificContentSettings();
- content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES);
+ content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string());
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
@@ -82,7 +84,8 @@ TEST_F(ContentSettingBubbleModelTest, Cookies) {
TEST_F(ContentSettingBubbleModelTest, Plugins) {
TabSpecificContentSettings* content_settings =
contents()->GetTabSpecificContentSettings();
- content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS);
+ content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS,
+ std::string());
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 e45aead..0593991 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_TITLE,
+ IDS_BLOCKED_PLUGINS_MESSAGE,
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 32aed3e..f16ab93 100644
--- a/chrome/browser/content_setting_image_model_unittest.cc
+++ b/chrome/browser/content_setting_image_model_unittest.cc
@@ -35,7 +35,8 @@ 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);
+ content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES,
+ std::string());
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 d0d4a56..d9edf39 100644
--- a/chrome/browser/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/gtk/content_setting_bubble_gtk.cc
@@ -6,6 +6,7 @@
#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"
@@ -21,6 +22,7 @@
#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;
@@ -79,6 +81,33 @@ 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 dabdc96..0e10e25 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::kEnableClickToPlay)) {
+ switches::kEnableResourceContentSettings)) {
DCHECK(!resource_identifier.empty());
}
@@ -405,11 +405,8 @@ void HostContentSettingsMap::GetSettingsForOneType(
ContentSettingsType content_type,
const std::string& resource_identifier,
SettingsForOneType* settings) const {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay)) {
- DCHECK(!RequiresResourceIdentifier(content_type) ||
- !resource_identifier.empty());
- }
+ DCHECK(RequiresResourceIdentifier(content_type) !=
+ resource_identifier.empty());
DCHECK(settings);
settings->clear();
@@ -485,11 +482,8 @@ void HostContentSettingsMap::SetContentSetting(
ContentSetting setting) {
DCHECK(kTypeNames[content_type] != NULL); // Don't call this for Geolocation.
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay)) {
- DCHECK(!RequiresResourceIdentifier(content_type) ||
- !resource_identifier.empty());
- }
+ DCHECK(RequiresResourceIdentifier(content_type) !=
+ resource_identifier.empty());
bool early_exit = false;
std::string pattern_str(pattern.AsString());
@@ -656,14 +650,12 @@ 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::kEnableClickToPlay))
+ switches::kEnableResourceContentSettings)) {
return kRequiresResourceIdentifier[content_type];
- else
-#endif
+ } else {
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 7690c86..f19f7a2 100644
--- a/chrome/browser/host_content_settings_map_unittest.cc
+++ b/chrome/browser/host_content_settings_map_unittest.cc
@@ -550,9 +550,6 @@ 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());
@@ -584,7 +581,8 @@ TEST_F(HostContentSettingsMapTest, ResourceIdentifier) {
TEST_F(HostContentSettingsMapTest, ResourceIdentifierPrefs) {
// This feature is currently behind a flag.
CommandLine cl(*CommandLine::ForCurrentProcess());
- CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableClickToPlay);
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableResourceContentSettings);
TestingProfile profile;
profile.GetPrefs()->SetUserPref(prefs::kContentSettingsPatterns,
@@ -621,6 +619,5 @@ 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 a9af09a..98397cd 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -577,6 +577,7 @@ 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 b957d28..a03f4e4 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -1536,11 +1536,12 @@ void RenderViewHost::OnMissingPluginStatus(int status) {
integration_delegate->OnMissingPluginStatus(status);
}
-void RenderViewHost::OnNonSandboxedPluginBlocked(const string16& name) {
+void RenderViewHost::OnNonSandboxedPluginBlocked(const std::string& plugin,
+ const string16& name) {
RenderViewHostDelegate::BlockedPlugin* blocked_plugin_delegate =
delegate_->GetBlockedPluginDelegate();
if (blocked_plugin_delegate) {
- blocked_plugin_delegate->OnNonSandboxedPluginBlocked(name);
+ blocked_plugin_delegate->OnNonSandboxedPluginBlocked(plugin, name);
}
}
@@ -1996,11 +1997,12 @@ void RenderViewHost::OnPageTranslated(int32 page_id,
translated_lang, error_type);
}
-void RenderViewHost::OnContentBlocked(ContentSettingsType type) {
+void RenderViewHost::OnContentBlocked(ContentSettingsType type,
+ const std::string& resource_identifier) {
RenderViewHostDelegate::ContentSettings* content_settings_delegate =
delegate_->GetContentSettingsDelegate();
if (content_settings_delegate)
- content_settings_delegate->OnContentBlocked(type);
+ content_settings_delegate->OnContentBlocked(type, resource_identifier);
}
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 b47bb57..9e489e9 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -599,7 +599,8 @@ class RenderViewHost : public RenderWidgetHost {
void OnUserMetricsRecordAction(const std::string& action);
void OnMissingPluginStatus(int status);
- void OnNonSandboxedPluginBlocked(const string16& name);
+ void OnNonSandboxedPluginBlocked(const std::string& plugin,
+ const string16& name);
void OnBlockedPluginLoaded();
void OnCrashedPlugin(const FilePath& plugin_path);
void OnDisabledOutdatedPlugin(const string16& name, const GURL& update_url);
@@ -651,7 +652,8 @@ class RenderViewHost : public RenderWidgetHost {
const std::string& original_lang,
const std::string& translated_lang,
TranslateErrors::Type error_type);
- void OnContentBlocked(ContentSettingsType type);
+ void OnContentBlocked(ContentSettingsType type,
+ const std::string& resource_identifier);
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 0be5784..13c728e 100644
--- a/chrome/browser/renderer_host/render_view_host_delegate.h
+++ b/chrome/browser/renderer_host/render_view_host_delegate.h
@@ -344,7 +344,8 @@ class RenderViewHostDelegate {
public:
// Called when content in the current page was blocked due to the user's
// content settings.
- virtual void OnContentBlocked(ContentSettingsType type) = 0;
+ virtual void OnContentBlocked(ContentSettingsType type,
+ const std::string& resource_identifier) = 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
@@ -544,7 +545,8 @@ class RenderViewHostDelegate {
class BlockedPlugin {
public:
- virtual void OnNonSandboxedPluginBlocked(const string16& name) = 0;
+ virtual void OnNonSandboxedPluginBlocked(const std::string& plugin,
+ 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 c123007..c06ef55 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -716,6 +716,7 @@ 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,
@@ -726,6 +727,14 @@ 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 19320e0..152d978 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -24,6 +24,7 @@
#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"
@@ -183,6 +184,7 @@ 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 42f63db..30e74e7 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1512,7 +1512,8 @@ 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);
+ content_settings_delegate_->OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS,
+ std::string());
}
}
diff --git a/chrome/browser/tab_contents/tab_specific_content_settings.cc b/chrome/browser/tab_contents/tab_specific_content_settings.cc
index 14a921e..2070eb7 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings.cc
+++ b/chrome/browser/tab_contents/tab_specific_content_settings.cc
@@ -47,12 +47,35 @@ bool TabSpecificContentSettings::IsContentAccessed(
return content_accessed_[content_type];
}
-void TabSpecificContentSettings::OnContentBlocked(ContentSettingsType 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) {
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);
}
@@ -75,7 +98,7 @@ void TabSpecificContentSettings::OnCookieAccessed(
if (blocked_by_policy) {
blocked_local_shared_objects_.cookies()->SetCookieWithOptions(
url, cookie_line, options);
- OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES);
+ OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string());
} else {
allowed_local_shared_objects_.cookies()->SetCookieWithOptions(
url, cookie_line, options);
@@ -95,7 +118,7 @@ void TabSpecificContentSettings::OnLocalStorageAccessed(
helper->AddLocalStorage(url);
if (blocked_by_policy)
- OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES);
+ OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string());
else
OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES);
}
@@ -109,7 +132,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);
+ OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string());
} else {
allowed_local_shared_objects_.databases()->AddDatabase(
url, UTF16ToUTF8(name), UTF16ToUTF8(display_name));
@@ -121,7 +144,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);
+ OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string());
} else {
allowed_local_shared_objects_.appcaches()->AddAppCache(manifest_url);
OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES);
@@ -150,6 +173,7 @@ 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 82976c4..f6ec971 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings.h
+++ b/chrome/browser/tab_contents/tab_specific_content_settings.h
@@ -60,6 +60,9 @@ 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 {
@@ -78,7 +81,8 @@ class TabSpecificContentSettings
}
// RenderViewHostDelegate::ContentSettings implementation.
- virtual void OnContentBlocked(ContentSettingsType type);
+ virtual void OnContentBlocked(ContentSettingsType type,
+ const std::string& resource_identifier);
virtual void OnCookieAccessed(const GURL& url,
const std::string& cookie_line,
bool blocked_by_policy);
@@ -132,6 +136,9 @@ 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.
@@ -140,6 +147,11 @@ 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 6129f7d..ed4d836 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc
+++ b/chrome/browser/tab_contents/tab_specific_content_settings_unittest.cc
@@ -55,7 +55,8 @@ TEST(TabSpecificContentSettingsTest, BlockedContent) {
EXPECT_TRUE(test_delegate.SettingsChanged());
EXPECT_FALSE(test_delegate.ContentBlocked());
test_delegate.Reset();
- content_settings.OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES);
+ content_settings.OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES,
+ std::string());
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 f0f541e..769f5a2 100644
--- a/chrome/browser/views/content_setting_bubble_views.cc
+++ b/chrome/browser/views/content_setting_bubble_views.cc
@@ -27,6 +27,7 @@
#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:
@@ -201,6 +202,24 @@ 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 3f8b0f5..53cc519 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -396,6 +396,10 @@ 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 dde93de..bd2f42b 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -131,6 +131,7 @@ 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 7eb594d..68df701 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -1268,12 +1268,23 @@ 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.
- IPC_SYNC_MESSAGE_CONTROL3_3(ViewHostMsg_GetPluginInfo,
+ // 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,
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.
@@ -1304,8 +1315,9 @@ IPC_BEGIN_MESSAGES(ViewHost)
// Tells the browser that content in the current page was blocked due to the
// user's content settings.
- IPC_MESSAGE_ROUTED1(ViewHostMsg_ContentBlocked,
- ContentSettingsType /* type of blocked content */)
+ IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
+ ContentSettingsType, /* type of blocked content */
+ std::string /* resource identifier */)
// Tells the browser that a specific Appcache manifest in the current page
// was accessed.
@@ -1693,7 +1705,8 @@ IPC_BEGIN_MESSAGES(ViewHost)
int /* status */)
// Notifies when a non-sandboxed plugin was blocked.
- IPC_MESSAGE_ROUTED1(ViewHostMsg_NonSandboxedPluginBlocked,
+ IPC_MESSAGE_ROUTED2(ViewHostMsg_NonSandboxedPluginBlocked,
+ std::string /* plugin */,
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 b3c0973..89e64a5 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_TITLE));
+ l10n_util::GetStringUTF16(IDS_BLOCKED_PLUGINS_MESSAGE));
if (group)
values.Set(L"pluginGroup", group->GetDataForUI());
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 07595ea..234b056 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -560,10 +560,11 @@ 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, &mime_type));
+ &info, &setting, &mime_type));
if (!found || !info.enabled)
return NULL;
scoped_refptr<pepper::PluginModule> pepper_module =
@@ -2255,6 +2256,8 @@ 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;
@@ -2263,6 +2266,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
params.mimeType.utf8(),
&found,
&info,
+ &setting,
&actual_mime_type));
if (!found)
@@ -2272,8 +2276,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
group->AddPlugin(info, 0);
if (!info.enabled) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableOutdatedPlugins) &&
+ if (cmd->HasSwitch(switches::kDisableOutdatedPlugins) &&
group->IsVulnerable()) {
Send(new ViewHostMsg_DisabledOutdatedPlugin(routing_id_,
group->GetGroupName(),
@@ -2284,10 +2287,13 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
}
if (info.path.value() != kDefaultPluginLibraryName) {
- if (!AllowContentType(CONTENT_SETTINGS_TYPE_PLUGINS)) {
- DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay));
- didNotAllowPlugins(frame);
+ 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);
return CreatePluginPlaceholder(frame, params, NULL);
}
scoped_refptr<pepper::PluginModule> pepper_module =
@@ -2295,8 +2301,10 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
if (pepper_module)
return CreatePepperPlugin(frame, params, info.path, pepper_module.get());
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kBlockNonSandboxedPlugins)) {
+ switches::kBlockNonSandboxedPlugins) &&
+ setting != CONTENT_SETTING_ALLOW) {
Send(new ViewHostMsg_NonSandboxedPluginBlocked(routing_id_,
+ resource,
group->GetGroupName()));
return CreatePluginPlaceholder(frame, params, NULL);
}
@@ -2439,7 +2447,7 @@ bool RenderView::allowImages(WebFrame* frame, bool enabled_per_settings) {
if (IsWhitelistedForContentSettings(frame))
return true;
- DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES);
+ DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES, std::string());
return false; // Other protocols fall through here.
}
@@ -3240,11 +3248,11 @@ bool RenderView::allowDatabase(
return result;
}
void RenderView::didNotAllowScript(WebKit::WebFrame* frame) {
- DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT);
+ DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string());
}
void RenderView::didNotAllowPlugins(WebKit::WebFrame* frame) {
- DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
+ DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, std::string());
}
void RenderView::didExhaustMemoryAvailableForScript(WebFrame* frame) {
@@ -3795,10 +3803,12 @@ bool RenderView::AllowContentType(ContentSettingsType settings_type) {
CONTENT_SETTING_BLOCK;
}
-void RenderView::DidBlockContentType(ContentSettingsType settings_type) {
+void RenderView::DidBlockContentType(ContentSettingsType settings_type,
+ const std::string& resource_identifier) {
if (!content_blocked_[settings_type]) {
content_blocked_[settings_type] = true;
- Send(new ViewHostMsg_ContentBlocked(routing_id_, settings_type));
+ Send(new ViewHostMsg_ContentBlocked(routing_id_, settings_type,
+ resource_identifier));
}
}
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 53e3d6d..f2b0484 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -881,7 +881,8 @@ class RenderView : public RenderWidget,
PluginGroup* group);
// Sends an IPC notification that the specified content type was blocked.
- void DidBlockContentType(ContentSettingsType settings_type);
+ void DidBlockContentType(ContentSettingsType settings_type,
+ const std::string& resource_identifier);
// This callback is triggered when DownloadImage completes, either
// succesfully or with a failure. See DownloadImage for more details.