summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-06 04:18:04 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-06 04:18:04 +0000
commit8bdda244e2d7b826b81b73cf1f9469d4cfe26bcd (patch)
tree7538b2456ce6dbce9e2b6897d13229e7655c9e4b
parentc91122c0c8bb7e3e8f59b88d3498e4a2290fa6f3 (diff)
downloadchromium_src-8bdda244e2d7b826b81b73cf1f9469d4cfe26bcd.zip
chromium_src-8bdda244e2d7b826b81b73cf1f9469d4cfe26bcd.tar.gz
chromium_src-8bdda244e2d7b826b81b73cf1f9469d4cfe26bcd.tar.bz2
Mac: Make content bubbles wider in languages that have long translations of "Manage" and "Done.
xib changes: Anchor bubble view on right side, make it autoresize horizontally. Same for divider line, radio groups, and title. Make widthbased tweakers at bottom horizontally autoresize. Hook up manage and done buttons to controller. BUG=39393 TEST=See bug. Review URL: http://codereview.chromium.org/1527012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43698 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/nibs/ContentBlockedCookies.xib43
-rw-r--r--chrome/app/nibs/ContentBlockedImages.xib42
-rw-r--r--chrome/app/nibs/ContentBlockedJavaScript.xib42
-rw-r--r--chrome/app/nibs/ContentBlockedPlugins.xib42
-rw-r--r--chrome/app/nibs/ContentBlockedPopups.xib42
-rw-r--r--chrome/app/nibs/ContentBubbleGeolocation.xib32
-rw-r--r--chrome/browser/cocoa/content_blocked_bubble_controller.h3
-rw-r--r--chrome/browser/cocoa/content_blocked_bubble_controller.mm22
8 files changed, 215 insertions, 53 deletions
diff --git a/chrome/app/nibs/ContentBlockedCookies.xib b/chrome/app/nibs/ContentBlockedCookies.xib
index d214603..af1ffca 100644
--- a/chrome/app/nibs/ContentBlockedCookies.xib
+++ b/chrome/app/nibs/ContentBlockedCookies.xib
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="29"/>
+ <integer value="4"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,12 +50,12 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="301729179">
<reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">276</int>
+ <int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="266815090">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">268</int>
+ <int key="NSvFlags">266</int>
<string key="NSFrame">{{17, 54}, {282, 14}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -91,7 +91,7 @@
</object>
<object class="NSBox" id="913795455">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">36</int>
+ <int key="NSvFlags">34</int>
<string key="NSFrame">{{20, 43}, {276, 5}}</string>
<reference key="NSSuperview" ref="301729179"/>
<string key="NSOffsets">{0, 0}</string>
@@ -125,7 +125,7 @@
</object>
<object class="NSCustomView" id="730386640">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">294</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="91589614">
@@ -155,7 +155,7 @@
</object>
<object class="NSCustomView" id="395762087">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">289</int>
+ <int key="NSvFlags">291</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="433059244">
@@ -269,6 +269,22 @@
</object>
<int key="connectionID">30</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">manageButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="91589614"/>
+ </object>
+ <int key="connectionID">33</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">doneButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="433059244"/>
+ </object>
+ <int key="connectionID">34</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -475,7 +491,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">30</int>
+ <int key="maxID">34</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -520,12 +536,18 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>allowBlockRadioGroup_</string>
<string>bubble_</string>
+ <string>contentsContainer_</string>
+ <string>doneButton_</string>
+ <string>manageButton_</string>
<string>titleLabel_</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMatrix</string>
<string>InfoBubbleView</string>
+ <string>NSView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
<string>NSTextField</string>
</object>
</object>
@@ -634,6 +656,13 @@
<string key="className">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">browser/cocoa/chrome_browser_window.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSWindow</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
<string key="minorKey">browser/cocoa/themed_window.h</string>
</object>
</object>
diff --git a/chrome/app/nibs/ContentBlockedImages.xib b/chrome/app/nibs/ContentBlockedImages.xib
index 989ff0a..a1a4899b 100644
--- a/chrome/app/nibs/ContentBlockedImages.xib
+++ b/chrome/app/nibs/ContentBlockedImages.xib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9L30</string>
- <string key="IBDocument.InterfaceBuilderVersion">680</string>
+ <string key="IBDocument.SystemVersion">9L31a</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="9"/>
+ <integer value="1"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,12 +50,12 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="301729179">
<reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">276</int>
+ <int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="266815090">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">268</int>
+ <int key="NSvFlags">266</int>
<string key="NSFrame">{{17, 100}, {282, 14}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -91,7 +91,7 @@
</object>
<object class="NSMatrix" id="126329017">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<string key="NSFrame">{{20, 54}, {276, 38}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -297,7 +297,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSBox" id="913795455">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">36</int>
+ <int key="NSvFlags">34</int>
<string key="NSFrame">{{20, 43}, {276, 5}}</string>
<reference key="NSSuperview" ref="301729179"/>
<string key="NSOffsets">{0, 0}</string>
@@ -324,7 +324,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="730386640">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">294</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="91589614">
@@ -354,7 +354,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="395762087">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">289</int>
+ <int key="NSvFlags">291</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="433059244">
@@ -484,6 +484,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">30</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">manageButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="91589614"/>
+ </object>
+ <int key="connectionID">31</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">doneButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="433059244"/>
+ </object>
+ <int key="connectionID">32</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -725,7 +741,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">30</int>
+ <int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -770,12 +786,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<string>allowBlockRadioGroup_</string>
<string>bubble_</string>
+ <string>contentsContainer_</string>
+ <string>doneButton_</string>
+ <string>manageButton_</string>
<string>titleLabel_</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMatrix</string>
<string>InfoBubbleView</string>
+ <string>NSView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
<string>NSTextField</string>
</object>
</object>
diff --git a/chrome/app/nibs/ContentBlockedJavaScript.xib b/chrome/app/nibs/ContentBlockedJavaScript.xib
index e05a1ab..6741853 100644
--- a/chrome/app/nibs/ContentBlockedJavaScript.xib
+++ b/chrome/app/nibs/ContentBlockedJavaScript.xib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9L30</string>
- <string key="IBDocument.InterfaceBuilderVersion">680</string>
+ <string key="IBDocument.SystemVersion">9L31a</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="9"/>
+ <integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,12 +50,12 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="301729179">
<reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">276</int>
+ <int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="266815090">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">268</int>
+ <int key="NSvFlags">266</int>
<string key="NSFrame">{{17, 100}, {282, 14}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -91,7 +91,7 @@
</object>
<object class="NSMatrix" id="126329017">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<string key="NSFrame">{{20, 54}, {276, 38}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -297,7 +297,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSBox" id="913795455">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">36</int>
+ <int key="NSvFlags">34</int>
<string key="NSFrame">{{20, 43}, {276, 5}}</string>
<reference key="NSSuperview" ref="301729179"/>
<string key="NSOffsets">{0, 0}</string>
@@ -324,7 +324,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="730386640">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">294</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="91589614">
@@ -354,7 +354,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="395762087">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">289</int>
+ <int key="NSvFlags">291</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="433059244">
@@ -484,6 +484,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">30</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">manageButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="91589614"/>
+ </object>
+ <int key="connectionID">31</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">doneButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="433059244"/>
+ </object>
+ <int key="connectionID">32</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -725,7 +741,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">30</int>
+ <int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -770,12 +786,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<string>allowBlockRadioGroup_</string>
<string>bubble_</string>
+ <string>contentsContainer_</string>
+ <string>doneButton_</string>
+ <string>manageButton_</string>
<string>titleLabel_</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMatrix</string>
<string>InfoBubbleView</string>
+ <string>NSView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
<string>NSTextField</string>
</object>
</object>
diff --git a/chrome/app/nibs/ContentBlockedPlugins.xib b/chrome/app/nibs/ContentBlockedPlugins.xib
index 103439d..c83c9f5 100644
--- a/chrome/app/nibs/ContentBlockedPlugins.xib
+++ b/chrome/app/nibs/ContentBlockedPlugins.xib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9L30</string>
- <string key="IBDocument.InterfaceBuilderVersion">680</string>
+ <string key="IBDocument.SystemVersion">9L31a</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="9"/>
+ <integer value="4"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,12 +50,12 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="301729179">
<reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">276</int>
+ <int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="266815090">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">268</int>
+ <int key="NSvFlags">266</int>
<string key="NSFrame">{{17, 100}, {282, 14}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -91,7 +91,7 @@
</object>
<object class="NSMatrix" id="126329017">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<string key="NSFrame">{{20, 54}, {276, 38}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -297,7 +297,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSBox" id="913795455">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">36</int>
+ <int key="NSvFlags">34</int>
<string key="NSFrame">{{20, 43}, {276, 5}}</string>
<reference key="NSSuperview" ref="301729179"/>
<string key="NSOffsets">{0, 0}</string>
@@ -324,7 +324,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="730386640">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">294</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="91589614">
@@ -354,7 +354,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="395762087">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">289</int>
+ <int key="NSvFlags">291</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="433059244">
@@ -484,6 +484,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">30</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">manageButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="91589614"/>
+ </object>
+ <int key="connectionID">31</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">doneButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="433059244"/>
+ </object>
+ <int key="connectionID">32</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -725,7 +741,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">30</int>
+ <int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -770,12 +786,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<string>allowBlockRadioGroup_</string>
<string>bubble_</string>
+ <string>contentsContainer_</string>
+ <string>doneButton_</string>
+ <string>manageButton_</string>
<string>titleLabel_</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMatrix</string>
<string>InfoBubbleView</string>
+ <string>NSView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
<string>NSTextField</string>
</object>
</object>
diff --git a/chrome/app/nibs/ContentBlockedPopups.xib b/chrome/app/nibs/ContentBlockedPopups.xib
index 3926208..b5e1810 100644
--- a/chrome/app/nibs/ContentBlockedPopups.xib
+++ b/chrome/app/nibs/ContentBlockedPopups.xib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9L30</string>
- <string key="IBDocument.InterfaceBuilderVersion">680</string>
+ <string key="IBDocument.SystemVersion">9L31a</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="9"/>
+ <integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,12 +50,12 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="301729179">
<reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">276</int>
+ <int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="266815090">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">268</int>
+ <int key="NSvFlags">266</int>
<string key="NSFrame">{{17, 100}, {282, 14}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -91,7 +91,7 @@
</object>
<object class="NSMatrix" id="126329017">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<string key="NSFrame">{{20, 54}, {276, 38}}</string>
<reference key="NSSuperview" ref="301729179"/>
<bool key="NSEnabled">YES</bool>
@@ -297,7 +297,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSBox" id="913795455">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">36</int>
+ <int key="NSvFlags">34</int>
<string key="NSFrame">{{20, 43}, {276, 5}}</string>
<reference key="NSSuperview" ref="301729179"/>
<string key="NSOffsets">{0, 0}</string>
@@ -324,7 +324,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="730386640">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">294</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="91589614">
@@ -354,7 +354,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="395762087">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">289</int>
+ <int key="NSvFlags">291</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="433059244">
@@ -484,6 +484,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">30</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">manageButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="91589614"/>
+ </object>
+ <int key="connectionID">31</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">doneButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="433059244"/>
+ </object>
+ <int key="connectionID">32</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -725,7 +741,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">30</int>
+ <int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -770,12 +786,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<string>allowBlockRadioGroup_</string>
<string>bubble_</string>
+ <string>contentsContainer_</string>
+ <string>doneButton_</string>
+ <string>manageButton_</string>
<string>titleLabel_</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMatrix</string>
<string>InfoBubbleView</string>
+ <string>NSView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
<string>NSTextField</string>
</object>
</object>
diff --git a/chrome/app/nibs/ContentBubbleGeolocation.xib b/chrome/app/nibs/ContentBubbleGeolocation.xib
index 170d02f..f3a9046 100644
--- a/chrome/app/nibs/ContentBubbleGeolocation.xib
+++ b/chrome/app/nibs/ContentBubbleGeolocation.xib
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="4"/>
+ <integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -55,7 +55,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSBox" id="913795455">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">36</int>
+ <int key="NSvFlags">34</int>
<string key="NSFrame">{{20, 43}, {276, 5}}</string>
<reference key="NSSuperview" ref="301729179"/>
<string key="NSOffsets">{0, 0}</string>
@@ -89,7 +89,7 @@
</object>
<object class="NSCustomView" id="730386640">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">294</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="91589614">
@@ -123,7 +123,7 @@
</object>
<object class="NSCustomView" id="395762087">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">289</int>
+ <int key="NSvFlags">291</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="433059244">
@@ -153,7 +153,7 @@
</object>
<object class="NSCustomView" id="1034822360">
<reference key="NSNextResponder" ref="301729179"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">290</int>
<string key="NSFrame">{{20, 54}, {276, 14}}</string>
<reference key="NSSuperview" ref="301729179"/>
<string key="NSClassName">NSView</string>
@@ -244,6 +244,22 @@
</object>
<int key="connectionID">43</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">manageButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="91589614"/>
+ </object>
+ <int key="connectionID">45</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">doneButton_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="433059244"/>
+ </object>
+ <int key="connectionID">46</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -439,7 +455,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">44</int>
+ <int key="maxID">46</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -485,6 +501,8 @@
<string>allowBlockRadioGroup_</string>
<string>bubble_</string>
<string>contentsContainer_</string>
+ <string>doneButton_</string>
+ <string>manageButton_</string>
<string>titleLabel_</string>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -492,6 +510,8 @@
<string>NSMatrix</string>
<string>InfoBubbleView</string>
<string>NSView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
<string>NSTextField</string>
</object>
</object>
diff --git a/chrome/browser/cocoa/content_blocked_bubble_controller.h b/chrome/browser/cocoa/content_blocked_bubble_controller.h
index 6b325a4..669c437 100644
--- a/chrome/browser/cocoa/content_blocked_bubble_controller.h
+++ b/chrome/browser/cocoa/content_blocked_bubble_controller.h
@@ -31,6 +31,9 @@ typedef std::map<NSButton*, int> PopupLinks;
IBOutlet NSTextField* titleLabel_;
IBOutlet NSMatrix* allowBlockRadioGroup_;
+ IBOutlet NSButton* manageButton_;
+ IBOutlet NSButton* doneButton_;
+
// The container for the bubble contents of the geolocation bubble.
IBOutlet NSView* contentsContainer_;
diff --git a/chrome/browser/cocoa/content_blocked_bubble_controller.mm b/chrome/browser/cocoa/content_blocked_bubble_controller.mm
index 684a70b..0bd90a4 100644
--- a/chrome/browser/cocoa/content_blocked_bubble_controller.mm
+++ b/chrome/browser/cocoa/content_blocked_bubble_controller.mm
@@ -53,6 +53,8 @@ const int kGeoPadding = 8;
// Padding between host names in the geolocation bubble.
const int kGeoHostPadding = 4;
+// Minimal padding between "Manage" and "Done" buttons.
+const int kManageDonePadding = 8;
// Like |ReplaceStringPlaceholders(const string16&, const string16&, size_t*)|,
// but for a NSString formatString.
@@ -97,6 +99,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
- (void)initializeRadioGroup;
- (void)initializePopupList;
- (void)initializeGeoLists;
+- (void)sizeToFitManageDoneButtons;
- (void)popupLinkClicked:(id)sender;
- (void)clearGeolocationForCurrentHost:(id)sender;
@end
@@ -348,6 +351,22 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
[contentsContainer_ setFrame:containerFrame];
}
+- (void)sizeToFitManageDoneButtons {
+ CGFloat actualWidth = NSWidth([[[self window] contentView] frame]);
+ CGFloat requiredWidth = NSMaxX([manageButton_ frame]) + kManageDonePadding +
+ NSWidth([[doneButton_ superview] frame]) - NSMinX([doneButton_ frame]);
+ if (requiredWidth <= actualWidth || !doneButton_ || !manageButton_)
+ return;
+
+ // Resize window, autoresizing takes care of the rest.
+ NSSize size = NSMakeSize(requiredWidth - actualWidth, 0);
+ size = [[[self window] contentView] convertSize:size toView:nil];
+ NSRect frame = [[self window] frame];
+ frame.origin.x -= size.width;
+ frame.size.width += size.width;
+ [[self window] setFrame:frame display:NO];
+}
+
- (void)awakeFromNib {
DCHECK([self window]);
DCHECK_EQ(self, [[self window] delegate]);
@@ -355,6 +374,9 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
[bubble_ setBubbleType:kWhiteInfoBubble];
[bubble_ setArrowLocation:kTopRight];
+ // Adapt window size to bottom buttons. Do this before all other layouting.
+ [self sizeToFitManageDoneButtons];
+
[self initializeTitle];
if (allowBlockRadioGroup_) // not bound in cookie bubble xib
[self initializeRadioGroup];