summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/nibs/en.lproj/Preferences.xib390
-rw-r--r--chrome/browser/app_controller_mac.mm17
-rw-r--r--chrome/browser/cocoa/preferences_window_controller.h47
-rw-r--r--chrome/browser/cocoa/preferences_window_controller.mm372
-rw-r--r--chrome/browser/cocoa/preferences_window_controller_unittest.mm10
-rw-r--r--chrome/browser/shell_integration.h2
-rw-r--r--chrome/browser/shell_integration_mac.mm49
-rw-r--r--chrome/chrome.gyp4
-rw-r--r--chrome/common/pref_member.h3
-rw-r--r--chrome/common/pref_names.cc5
-rw-r--r--chrome/common/pref_names.h1
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc2
12 files changed, 814 insertions, 88 deletions
diff --git a/chrome/app/nibs/en.lproj/Preferences.xib b/chrome/app/nibs/en.lproj/Preferences.xib
index fe2e515..0249d7c 100644
--- a/chrome/app/nibs/en.lproj/Preferences.xib
+++ b/chrome/app/nibs/en.lproj/Preferences.xib
@@ -2,12 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
<string key="IBDocument.InterfaceBuilderVersion">677</string>
- <string key="IBDocument.AppKitVersion">949.43</string>
- <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
+ <string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="5"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -25,7 +26,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">NSWindowController</string>
+ <string key="NSClassName">PreferencesWindowController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -34,23 +35,23 @@
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="871378074">
- <int key="NSWindowStyleMask">15</int>
+ <int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{196, 7}, {559, 503}}</string>
+ <string key="NSWindowRect">{{196, -5}, {559, 515}}</string>
<int key="NSWTFlags">1677722624</int>
<string key="NSWindowTitle">Preferences</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="408649839">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTabView" id="838559838">
<reference key="NSNextResponder" ref="408649839"/>
<int key="NSvFlags">36</int>
- <string key="NSFrame">{{13, 10}, {533, 487}}</string>
+ <string key="NSFrame">{{13, 10}, {533, 499}}</string>
<reference key="NSSuperview" ref="408649839"/>
<object class="NSMutableArray" key="NSTabViewItems">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -64,7 +65,7 @@
<object class="NSButton" id="810089388">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{273, 263}, {182, 23}}</string>
+ <string key="NSFrame">{{273, 275}, {182, 23}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="788559409">
@@ -88,7 +89,7 @@
<object class="NSButton" id="909713979">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{171, 263}, {52, 23}}</string>
+ <string key="NSFrame">{{171, 275}, {52, 23}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="709698869">
@@ -112,7 +113,7 @@
<object class="NSButton" id="940065158">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{222, 263}, {52, 23}}</string>
+ <string key="NSFrame">{{222, 275}, {52, 23}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="517413682">
@@ -136,7 +137,7 @@
<object class="NSTextField" id="881113898">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{41, 136}, {123, 17}}</string>
+ <string key="NSFrame">{{41, 148}, {123, 17}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="519689237">
@@ -172,7 +173,7 @@
<object class="NSButton" id="136601899">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{169, 132}, {236, 18}}</string>
+ <string key="NSFrame">{{169, 147}, {236, 18}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="131780438">
@@ -199,7 +200,7 @@
<object class="NSTextField" id="325467010">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{41, 409}, {123, 17}}</string>
+ <string key="NSFrame">{{41, 419}, {123, 17}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="542921234">
@@ -215,18 +216,18 @@
<object class="NSMatrix" id="1016627403">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{171, 356}, {300, 70}}</string>
+ <string key="NSFrame">{{171, 368}, {300, 70}}</string>
<reference key="NSSuperview" ref="412364894"/>
+ <bool key="NSEnabled">YES</bool>
<int key="NSNumRows">3</int>
<int key="NSNumCols">1</int>
<object class="NSMutableArray" key="NSCells">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButtonCell" id="866030183">
- <int key="NSCellFlags">-1543373312</int>
+ <int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Open the home page</string>
<reference key="NSSupport" ref="445696277"/>
- <int key="NSTag">1</int>
<reference key="NSControlView" ref="1016627403"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">128</int>
@@ -239,10 +240,11 @@
<int key="NSPeriodicInterval">25</int>
</object>
<object class="NSButtonCell" id="29669784">
- <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Restore the pages that were open last</string>
<reference key="NSSupport" ref="445696277"/>
+ <int key="NSTag">1</int>
<reference key="NSControlView" ref="1016627403"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">128</int>
@@ -347,10 +349,11 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA</bytes>
<int key="NSPeriodicInterval">75</int>
</object>
<object class="NSButtonCell" id="799465121">
- <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Open the following pages:</string>
<reference key="NSSupport" ref="445696277"/>
+ <int key="NSTag">2</int>
<reference key="NSControlView" ref="1016627403"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">128</int>
@@ -478,7 +481,7 @@ rwAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQgQXBwbGUsIEluYy4sIDIwMDkAA</bytes
<int key="NSMatrixFlags">1151868928</int>
<string key="NSCellClass">NSActionCell</string>
<object class="NSButtonCell" key="NSProtoCell" id="144354838">
- <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Radio</string>
<reference key="NSSupport" ref="445696277"/>
@@ -540,7 +543,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="306778908">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{169, 112}, {311, 18}}</string>
+ <string key="NSFrame">{{169, 124}, {311, 18}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="114177510">
@@ -562,7 +565,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="982570975">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{41, 213}, {123, 17}}</string>
+ <string key="NSFrame">{{41, 223}, {123, 17}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="901046858">
@@ -578,18 +581,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSMatrix" id="743261621">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{171, 184}, {300, 46}}</string>
+ <string key="NSFrame">{{171, 196}, {300, 46}}</string>
<reference key="NSSuperview" ref="412364894"/>
+ <bool key="NSEnabled">YES</bool>
<int key="NSNumRows">2</int>
<int key="NSNumCols">1</int>
<object class="NSMutableArray" key="NSCells">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButtonCell" id="182948450">
- <int key="NSCellFlags">-1543373312</int>
+ <int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Use the New Tab page</string>
<reference key="NSSupport" ref="445696277"/>
- <int key="NSTag">1</int>
<reference key="NSControlView" ref="743261621"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">128</int>
@@ -600,10 +603,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<int key="NSPeriodicInterval">25</int>
</object>
<object class="NSButtonCell" id="1001736883">
- <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Open this page:</string>
<reference key="NSSupport" ref="445696277"/>
+ <int key="NSTag">1</int>
<reference key="NSControlView" ref="743261621"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">128</int>
@@ -710,7 +714,7 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA</bytes>
<int key="NSMatrixFlags">1151868928</int>
<string key="NSCellClass">NSActionCell</string>
<object class="NSButtonCell" key="NSProtoCell" id="820915187">
- <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Radio</string>
<reference key="NSSupport" ref="445696277"/>
@@ -769,7 +773,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="495791200">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{41, 25}, {123, 17}}</string>
+ <string key="NSFrame">{{41, 37}, {123, 17}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="617938891">
@@ -785,7 +789,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="254133467">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{41, 58}, {123, 17}}</string>
+ <string key="NSFrame">{{41, 70}, {123, 17}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="952238196">
@@ -801,7 +805,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSComboBox" id="753227173">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{171, 53}, {161, 26}}</string>
+ <string key="NSFrame">{{171, 65}, {161, 26}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="317144895">
@@ -897,13 +901,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="192681043">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{165, 15}, {253, 32}}</string>
+ <string key="NSFrame">{{165, 27}, {270, 32}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="523146452">
- <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
- <string key="NSContents">Make Chrome My Default Browser</string>
+ <string key="NSContents">Make Chromium My Default Browser</string>
<reference key="NSSupport" ref="445696277"/>
<reference key="NSControlView" ref="192681043"/>
<int key="NSButtonFlags">-2038284033</int>
@@ -917,7 +921,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="188533588">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{295, 184}, {160, 22}}</string>
+ <string key="NSFrame">{{295, 196}, {160, 22}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="771835631">
@@ -939,7 +943,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSBox" id="198719913">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{9, 92}, {495, 5}}</string>
+ <string key="NSFrame">{{9, 104}, {495, 5}}</string>
<reference key="NSSuperview" ref="412364894"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1034,6 +1038,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<string key="NSFrame">{{1, 1}, {282, 63}}</string>
<reference key="NSSuperview" ref="54854923"/>
+ <reference key="NSNextKeyView" ref="165250101"/>
<reference key="NSDocView" ref="165250101"/>
<reference key="NSBGColor" ref="452188023"/>
<int key="NScvFlags">4</int>
@@ -1058,8 +1063,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<double key="NSPercent">5.714286e-01</double>
</object>
</object>
- <string key="NSFrame">{{171, 283}, {284, 65}}</string>
+ <string key="NSFrame">{{171, 295}, {284, 65}}</string>
<reference key="NSSuperview" ref="412364894"/>
+ <reference key="NSNextKeyView" ref="570210247"/>
<int key="NSsFlags">530</int>
<reference key="NSVScroller" ref="895676258"/>
<reference key="NSHScroller" ref="757862790"/>
@@ -1069,11 +1075,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="19477846">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{337, 49}, {124, 32}}</string>
+ <string key="NSFrame">{{337, 61}, {124, 32}}</string>
<reference key="NSSuperview" ref="412364894"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="580118686">
- <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags">-1543373312</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Manage</string>
<reference key="NSSupport" ref="445696277"/>
@@ -1094,7 +1100,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSBox" id="189791950">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{9, 245}, {495, 5}}</string>
+ <string key="NSFrame">{{9, 257}, {495, 5}}</string>
<reference key="NSSuperview" ref="412364894"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1116,7 +1122,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSBox" id="500443166">
<reference key="NSNextResponder" ref="412364894"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{9, 165}, {495, 5}}</string>
+ <string key="NSFrame">{{9, 177}, {495, 5}}</string>
<reference key="NSSuperview" ref="412364894"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1135,8 +1141,27 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<int key="NSTitlePosition">0</int>
<bool key="NSTransparent">NO</bool>
</object>
+ <object class="NSTextField" id="886397425">
+ <reference key="NSNextResponder" ref="412364894"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{168, 10}, {242, 17}}</string>
+ <reference key="NSSuperview" ref="412364894"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="245266980">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">272630784</int>
+ <string key="NSContents">Chromium is not the default browser.</string>
+ <reference key="NSSupport" ref="445696277"/>
+ <reference key="NSControlView" ref="886397425"/>
+ <reference key="NSBackgroundColor" ref="592613688"/>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAwIDAAA</bytes>
+ </object>
+ </object>
+ </object>
</object>
- <string key="NSFrame">{{10, 33}, {513, 441}}</string>
+ <string key="NSFrame">{{10, 33}, {513, 453}}</string>
<reference key="NSSuperview" ref="838559838"/>
</object>
<string key="NSLabel">Basics</string>
@@ -1153,7 +1178,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="173446497">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{22, 339}, {138, 17}}</string>
+ <string key="NSFrame">{{22, 351}, {138, 17}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="218087448">
@@ -1169,7 +1194,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="630848197">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 411}, {146, 17}}</string>
+ <string key="NSFrame">{{14, 423}, {146, 17}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="660352048">
@@ -1185,7 +1210,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSMatrix" id="1019357609">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{171, 318}, {300, 38}}</string>
+ <string key="NSFrame">{{171, 330}, {300, 38}}</string>
<reference key="NSSuperview" ref="712581699"/>
<int key="NSNumRows">2</int>
<int key="NSNumCols">1</int>
@@ -1384,7 +1409,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>NSFilenamesPboardType</string>
</object>
</object>
- <string key="NSFrame">{{161, 407}, {179, 26}}</string>
+ <string key="NSFrame">{{161, 419}, {179, 26}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPathCell" key="NSCell" id="25958950">
@@ -1402,7 +1427,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="928184762">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{169, 385}, {323, 18}}</string>
+ <string key="NSFrame">{{169, 397}, {323, 18}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="731161158">
@@ -1424,7 +1449,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="777041502">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{165, 226}, {267, 32}}</string>
+ <string key="NSFrame">{{165, 238}, {267, 32}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="526979400">
@@ -1444,7 +1469,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="667220499">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{165, 278}, {184, 32}}</string>
+ <string key="NSFrame">{{165, 290}, {184, 32}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="745829249">
@@ -1464,7 +1489,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="426298077">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{168, 211}, {337, 14}}</string>
+ <string key="NSFrame">{{168, 223}, {337, 14}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="944163640">
@@ -1480,7 +1505,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="199088880">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{2, 237}, {158, 17}}</string>
+ <string key="NSFrame">{{2, 249}, {158, 17}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="944457752">
@@ -1496,7 +1521,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="921350969">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{77, 165}, {83, 17}}</string>
+ <string key="NSFrame">{{77, 177}, {83, 17}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1066495099">
@@ -1519,7 +1544,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>NSColor pasteboard type</string>
</object>
</object>
- <string key="NSFrame">{{171, 161}, {91, 23}}</string>
+ <string key="NSFrame">{{171, 173}, {91, 23}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSIsBordered">YES</bool>
@@ -1531,7 +1556,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="105783425">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{264, 155}, {124, 32}}</string>
+ <string key="NSFrame">{{264, 167}, {124, 32}}</string>
<reference key="NSSuperview" ref="712581699"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="34650228">
@@ -1552,7 +1577,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSBox" id="792401600">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{9, 368}, {495, 5}}</string>
+ <string key="NSFrame">{{9, 380}, {495, 5}}</string>
<reference key="NSSuperview" ref="712581699"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1574,7 +1599,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSBox" id="1011607060">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{9, 268}, {495, 5}}</string>
+ <string key="NSFrame">{{9, 280}, {495, 5}}</string>
<reference key="NSSuperview" ref="712581699"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1596,7 +1621,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSBox" id="585343847">
<reference key="NSNextResponder" ref="712581699"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{9, 188}, {495, 5}}</string>
+ <string key="NSFrame">{{9, 200}, {495, 5}}</string>
<reference key="NSSuperview" ref="712581699"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1616,7 +1641,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bool key="NSTransparent">NO</bool>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {513, 441}}</string>
+ <string key="NSFrame">{{10, 33}, {513, 453}}</string>
</object>
<string key="NSLabel">Minor Tweaks</string>
<reference key="NSColor" ref="592613688"/>
@@ -1675,7 +1700,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<double key="NSPercent">5.060241e-01</double>
</object>
</object>
- <string key="NSFrame">{{17, 52}, {479, 386}}</string>
+ <string key="NSFrame">{{17, 64}, {479, 386}}</string>
<reference key="NSSuperview" ref="320699794"/>
<reference key="NSNextKeyView" ref="277407604"/>
<int key="NSsFlags">18</int>
@@ -1686,7 +1711,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButton" id="961419405">
<reference key="NSNextResponder" ref="320699794"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{354, 7}, {148, 32}}</string>
+ <string key="NSFrame">{{354, 19}, {148, 32}}</string>
<reference key="NSSuperview" ref="320699794"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="319834642">
@@ -1704,7 +1729,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {513, 441}}</string>
+ <string key="NSFrame">{{10, 33}, {513, 453}}</string>
</object>
<string key="NSLabel">Under the Hood</string>
<reference key="NSColor" ref="592613688"/>
@@ -1722,7 +1747,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
</object>
- <string key="NSFrameSize">{559, 503}</string>
+ <string key="NSFrameSize">{559, 515}</string>
+ <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
@@ -2325,6 +2351,194 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
</object>
<int key="connectionID">253</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: isHomepageURLEnabled</string>
+ <reference key="source" ref="188533588"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="188533588"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">enabled: isHomepageURLEnabled</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">isHomepageURLEnabled</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">280</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: homepageURL</string>
+ <reference key="source" ref="188533588"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="188533588"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">value: homepageURL</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">homepageURL</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">282</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">selectedIndex: restoreOnStartupIndex</string>
+ <reference key="source" ref="1016627403"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="1016627403"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">selectedIndex: restoreOnStartupIndex</string>
+ <string key="NSBinding">selectedIndex</string>
+ <string key="NSKeyPath">restoreOnStartupIndex</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">287</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: enableRestoreButtons</string>
+ <reference key="source" ref="909713979"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="909713979"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">enabled: enableRestoreButtons</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">enableRestoreButtons</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">290</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: enableRestoreButtons</string>
+ <reference key="source" ref="810089388"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="810089388"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">enabled: enableRestoreButtons</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">enableRestoreButtons</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">294</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: enableRestoreButtons</string>
+ <reference key="source" ref="940065158"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="940065158"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">enabled: enableRestoreButtons</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">enableRestoreButtons</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">295</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">selectedIndex: newTabPageIsHomePageIndex</string>
+ <reference key="source" ref="743261621"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="743261621"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">selectedIndex: newTabPageIsHomePageIndex</string>
+ <string key="NSBinding">selectedIndex</string>
+ <string key="NSKeyPath">newTabPageIsHomePageIndex</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">296</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: showHomeButton</string>
+ <reference key="source" ref="136601899"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="136601899"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">value: showHomeButton</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">showHomeButton</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">300</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: showPageOptionsButtons</string>
+ <reference key="source" ref="306778908"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="306778908"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">value: showPageOptionsButtons</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">showPageOptionsButtons</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">302</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">makeDefaultBrowser:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="192681043"/>
+ </object>
+ <int key="connectionID">306</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">hidden: isDefaultBrowser</string>
+ <reference key="source" ref="886397425"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="886397425"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">hidden: isDefaultBrowser</string>
+ <string key="NSBinding">hidden</string>
+ <string key="NSKeyPath">isDefaultBrowser</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">312</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: isDefaultBrowser</string>
+ <reference key="source" ref="192681043"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="192681043"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">enabled: isDefaultBrowser</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">isDefaultBrowser</string>
+ <object class="NSDictionary" key="NSOptions">
+ <string key="NS.key.0">NSValueTransformerName</string>
+ <string key="NS.object.0">NSNegateBoolean</string>
+ </object>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">315</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -2588,15 +2802,11 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1016627403"/>
- <reference ref="325467010"/>
<reference ref="881113898"/>
- <reference ref="136601899"/>
<reference ref="306778908"/>
<reference ref="495791200"/>
<reference ref="254133467"/>
<reference ref="753227173"/>
- <reference ref="192681043"/>
- <reference ref="982570975"/>
<reference ref="743261621"/>
<reference ref="188533588"/>
<reference ref="810089388"/>
@@ -2607,6 +2817,11 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
<reference ref="500443166"/>
<reference ref="198719913"/>
<reference ref="19477846"/>
+ <reference ref="136601899"/>
+ <reference ref="325467010"/>
+ <reference ref="982570975"/>
+ <reference ref="192681043"/>
+ <reference ref="886397425"/>
</object>
<reference key="parent" ref="1024664267"/>
</object>
@@ -3454,6 +3669,20 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
<reference key="object" ref="585343847"/>
<reference key="parent" ref="712581699"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">304</int>
+ <reference key="object" ref="886397425"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="245266980"/>
+ </object>
+ <reference key="parent" ref="412364894"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">305</int>
+ <reference key="object" ref="245266980"/>
+ <reference key="parent" ref="886397425"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -3547,6 +3776,8 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
<string>3.IBWindowTemplateEditedContentRect</string>
<string>3.NSWindowTemplate.visibleAtLaunch</string>
<string>30.IBPluginDependency</string>
+ <string>304.IBPluginDependency</string>
+ <string>305.IBPluginDependency</string>
<string>31.IBPluginDependency</string>
<string>32.IBPluginDependency</string>
<string>33.IBPluginDependency</string>
@@ -3702,8 +3933,8 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{712, 598}, {559, 503}}</string>
- <string>{{712, 598}, {559, 503}}</string>
+ <string>{{712, 586}, {559, 515}}</string>
+ <string>{{712, 586}, {559, 515}}</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3751,6 +3982,8 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</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>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{348, 210}, {482, 811}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3797,7 +4030,7 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">253</int>
+ <int key="maxID">315</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3809,6 +4042,27 @@ ZGVkIGZpbGVzIGRvbid0IG9wZW4gYXV0b21hdGljYWxseS4</string>
<string key="minorKey">browser/cocoa/tab_strip_model_observer_bridge.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">PreferencesWindowController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>makeDefaultBrowser:</string>
+ <string>showPreferences:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">browser/cocoa/preferences_window_controller.h</string>
+ </object>
+ </object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index a75c0e5..2261342 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -15,6 +15,8 @@
#import "chrome/browser/cocoa/bookmark_menu_bridge.h"
#import "chrome/browser/cocoa/preferences_window_controller.h"
#include "chrome/browser/command_updater.h"
+#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
#include "chrome/browser/profile_manager.h"
#include "chrome/common/temp_scaffolding_stubs.h"
@@ -28,12 +30,16 @@
@implementation AppController
+// This method is called very early in application startup (ie, before
+// the profile is loaded or any preferences have been registered). Defer any
+// user-data initialization until -applicationDidFinishLaunching:.
- (void)awakeFromNib {
// Set up the command updater for when there are no windows open
[self initMenuState];
- bookmarkMenuBridge_.reset(new BookmarkMenuBridge());
}
+// This is called after profiles have been loaded and preferences registered.
+// It is safe to access the default profile here.
- (void)applicationDidFinishLaunching:(NSNotification*)notify {
// Hold an extra ref to the BrowserProcess singleton so it doesn't go away
// when all the browser windows get closed. We'll release it on quit which
@@ -54,6 +60,12 @@
andSelector:@selector(openFiles:withReply:)
forEventClass:kCoreEventClass
andEventID:kAEOpenDocuments];
+
+ bookmarkMenuBridge_.reset(new BookmarkMenuBridge());
+
+ // Register any Mac-specific preferences.
+ PrefService* prefs = [self defaultProfile]->GetPrefs();
+ prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false);
}
- (void)dealloc {
@@ -243,9 +255,8 @@ void OpenURLs(const std::vector<GURL>& urls) {
// visible.
- (IBAction)showPreferences:(id)sender {
if (!prefsController_.get()) {
- PrefService* prefs = [self defaultProfile]->GetPrefs();
prefsController_.reset([[PreferencesWindowController alloc]
- initWithPrefs:prefs]);
+ initWithProfile:[self defaultProfile]]);
// Watch for a notification of when it goes away so that we can destroy
// the controller.
[[NSNotificationCenter defaultCenter]
diff --git a/chrome/browser/cocoa/preferences_window_controller.h b/chrome/browser/cocoa/preferences_window_controller.h
index 1b1fd28..1f24b75 100644
--- a/chrome/browser/cocoa/preferences_window_controller.h
+++ b/chrome/browser/cocoa/preferences_window_controller.h
@@ -4,19 +4,56 @@
#import <Cocoa/Cocoa.h>
+#include "base/scoped_ptr.h"
+#include "base/scoped_nsobject.h"
+#include "chrome/common/pref_member.h"
+
+class PrefObserverBridge;
class PrefService;
+class Profile;
+@class StartupURLDataSource;
-// A window controller that handles the preferences window.
+// A window controller that handles the preferences window. The bulk of the
+// work is handled via Cocoa Bindings and getter/setter methods that wrap
+// cross-platform PrefMember objects. When prefs change in the back-end
+// (that is, outside of this UI), our observer recieves a notification and can
+// tickle the KVO to update the UI so we are always in sync. The bindings are
+// specified in the nib file. Preferences are persisted into the back-end
+// as they are changed in the UI, and are thus immediately available even while
+// the window is still open. When the window closes, a notification is sent
+// via the system NotificationCenter. This can be used as a signal to
+// release this controller, as it's likely the client wants to enforce there
+// only being one (we don't do that internally as it makes it very difficult
+// to unit test).
@interface PreferencesWindowController : NSWindowController {
@private
- PrefService* prefs_; // weak ref
+ Profile* profile_; // weak ref
+ PrefService* prefs_; // weak ref - Obtained from profile_ for convenience.
+ scoped_ptr<PrefObserverBridge> observer_; // Watches for pref changes.
+
+ // Basics panel
+ IntegerPrefMember restoreOnStartup_;
+ scoped_nsobject<StartupURLDataSource> customPagesSource_;
+ BooleanPrefMember newTabPageIsHomePage_;
+ StringPrefMember homepage_;
+ BooleanPrefMember showHomeButton_;
+ BooleanPrefMember showPageOptionButtons_;
+
+ // Minor Tweaks panel
+
+ // Under the hood panel
}
-// Designated initializer. |prefs| should not be NULL.
-- (id)initWithPrefs:(PrefService*)prefs;
+// Designated initializer. |profile| should not be NULL.
+- (id)initWithProfile:(Profile*)profile;
// Show the preferences window.
-- (IBAction)showPreferences:(id)sender;
+- (void)showPreferences:(id)sender;
+
+// IBAction methods for responding to user actions.
+
+// Basics panel
+- (IBAction)makeDefaultBrowser:(id)sender;
@end
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm
index 632e9cc..8f079e6 100644
--- a/chrome/browser/cocoa/preferences_window_controller.mm
+++ b/chrome/browser/cocoa/preferences_window_controller.mm
@@ -5,38 +5,396 @@
#import "chrome/browser/cocoa/preferences_window_controller.h"
#include "base/mac_util.h"
+#include "base/string_util.h"
+#include "base/sys_string_conversions.h"
+#include "chrome/browser/metrics/user_metrics.h"
+#include "chrome/browser/net/url_fixer_upper.h"
+#include "chrome/browser/profile.h"
+#include "chrome/browser/session_startup_pref.h"
+#include "chrome/browser/shell_integration.h"
+#include "chrome/common/notification_details.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_type.h"
+#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
+#include "chrome/common/url_constants.h"
NSString* const kUserDoneEditingPrefsNotification =
@"kUserDoneEditingPrefsNotification";
+namespace {
+std::wstring GetNewTabUIURLString() {
+ return UTF8ToWide(chrome::kChromeUINewTabURL);
+}
+} // namespace
+
+// A data source object for the "startup urls" table.
+// TODO(pinkerton): hook this up to bindings.
+@interface StartupURLDataSource : NSObject {
+ @private
+ Profile* profile_; // weak, used to load icons
+}
+- (id)initWithProfile:(Profile*)profile;
+@end
+
+@implementation StartupURLDataSource
+- (id)initWithProfile:(Profile*)profile {
+ if ((self = [super init])) {
+ profile_ = profile;
+ }
+ return self;
+}
+@end
+
+//-------------------------------------------------------------------------
+
+@interface PreferencesWindowController(Private)
+// Callback when preferences are changed. |prefName| is the name of the
+// pref that has changed, or |NULL| if all prefs should be updated.
+- (void)prefChanged:(std::wstring*)prefName;
+// Record the user performed a certain action and save the preferences.
+- (void)recordUserAction:(const wchar_t*)action;
+- (void)registerPrefObservers;
+- (void)unregisterPrefObservers;
+
+// KVC setter methods.
+- (void)setNewTabPageIsHomePage:(NSInteger)val;
+- (void)setHomepageURL:(NSString*)urlString;
+- (void)setRestoreOnStartupIndex:(NSInteger)type;
+- (void)setShowHomeButton:(BOOL)value;
+- (void)setShowPageOptionsButtons:(BOOL)value;
+- (void)setDefaultBrowser:(BOOL)value;
+@end
+
+// A C++ class registered for changes in preferences. Bridges the
+// notification back to the PWC.
+class PrefObserverBridge : public NotificationObserver {
+ public:
+ PrefObserverBridge(PreferencesWindowController* controller)
+ : controller_(controller) { }
+ // Overridden from NotificationObserver:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ if (type == NotificationType::PREF_CHANGED)
+ [controller_ prefChanged:Details<std::wstring>(details).ptr()];
+ }
+ private:
+ PreferencesWindowController* controller_; // weak, owns us
+};
+
@implementation PreferencesWindowController
-- (id)initWithPrefs:(PrefService*)prefs {
- DCHECK(prefs);
+- (id)initWithProfile:(Profile*)profile {
+ DCHECK(profile);
// Use initWithWindowNibPath:: instead of initWithWindowNibName: so we
// can override it in a unit test.
NSString *nibpath = [mac_util::MainAppBundle()
pathForResource:@"Preferences"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
- prefs_ = prefs;
+ profile_ = profile;
+ prefs_ = profile->GetPrefs();
+ DCHECK(prefs_);
+ observer_.reset(new PrefObserverBridge(self));
+ customPagesSource_.reset([[StartupURLDataSource alloc]
+ initWithProfile:profile_]);
+ // This needs to be done before awakeFromNib: because the bindings set up
+ // in the nib rely on it.
+ [self registerPrefObservers];
}
return self;
}
- (void)awakeFromNib {
+ // TODO(pinkerton): save/restore size based on prefs.
+ [[self window] center];
+
+ // TODO(pinkerton): Ensure the "basics" tab is selected.
+}
+
+- (void)dealloc {
+ [self unregisterPrefObservers];
+ [super dealloc];
+}
+
+// Register our interest in the preferences we're displaying so if anything
+// else in the UI changes them we will be updated.
+- (void)registerPrefObservers {
+ if (!prefs_) return;
+
+ // Basics panel
+ prefs_->AddPrefObserver(prefs::kURLsToRestoreOnStartup, observer_.get());
+ restoreOnStartup_.Init(prefs::kRestoreOnStartup, prefs_, observer_.get());
+ newTabPageIsHomePage_.Init(prefs::kHomePageIsNewTabPage,
+ prefs_, observer_.get());
+ homepage_.Init(prefs::kHomePage, prefs_, observer_.get());
+ showHomeButton_.Init(prefs::kShowHomeButton, prefs_, observer_.get());
+ showPageOptionButtons_.Init(prefs::kShowPageOptionsButtons, prefs_,
+ observer_.get());
+ // TODO(pinkerton): Register Default search.
+
+ // TODO(pinkerton): do other panels...
+}
+
+// Clean up what was registered in -registerPrefObservers. We only have to
+// clean up the non-PrefMember registrations.
+- (void)unregisterPrefObservers {
+ if (!prefs_) return;
+
+ // Basics
+ prefs_->RemovePrefObserver(prefs::kURLsToRestoreOnStartup, observer_.get());
+
+ // TODO(pinkerton): do other panels...
+}
+
+// Record the user performed a certain action and save the preferences.
+- (void)recordUserAction:(const wchar_t*)action {
+ UserMetrics::RecordComputedAction(action, profile_);
+ if (prefs_)
+ prefs_->ScheduleSavePersistentPrefs();
+}
+
+// Returns the set of keys that |key| depends on for its value so it can be
+// re-computed when any of those change as well.
++ (NSSet*)keyPathsForValuesAffectingValueForKey:(NSString*)key {
+ NSSet* paths = [super keyPathsForValuesAffectingValueForKey:key];
+ if ([key isEqualToString:@"isHomepageURLEnabled"]) {
+ paths = [paths setByAddingObject:@"newTabPageIsHomePageIndex"];
+ } else if ([key isEqualToString:@"enableRestoreButtons"]) {
+ paths = [paths setByAddingObject:@"restoreOnStartupIndex"];
+ } else if ([key isEqualToString:@"isDefaultBrowser"]) {
+ paths = [paths setByAddingObject:@"isDefaultBrowser"];
+ }
+ return paths;
+}
+
+// Called when the user clicks the button to make Chromium the default
+// browser. Registers http and https.
+- (IBAction)makeDefaultBrowser:(id)sender {
+ ShellIntegration::SetAsDefaultBrowser();
+
+ // Tickle KVO so that the UI updates.
+ [self setDefaultBrowser:YES];
+}
+
+// A stub setter so that we can trick KVO into thinking the UI needs
+// to be updated.
+- (void)setDefaultBrowser:(BOOL)ignore {
+ // Do nothing.
+}
+
+// Returns if Chromium is the default browser.
+- (BOOL)isDefaultBrowser {
+ return ShellIntegration::IsDefaultBrowser() ? YES : NO;
+}
+
+//-------------------------------------------------------------------------
+// Basics panel
+
+// Sets the home page preferences for kNewTabPageIsHomePage and kHomePage. If a
+// blank string is passed in we revert to using NewTab page as the Home page.
+// When setting the Home Page to NewTab page, we preserve the old value of
+// kHomePage (we don't overwrite it). Note: using SetValue() causes the
+// observers not to fire, which is actually a good thing as we could end up in a
+// state where setting the homepage to an empty url would automatically reset
+// the prefs back to using the NTP, so we'd be never be able to change it.
+- (void)setHomepage:(const std::wstring&)homepage {
+ if (homepage.empty() || homepage == GetNewTabUIURLString()) {
+ newTabPageIsHomePage_.SetValue(true);
+ } else {
+ newTabPageIsHomePage_.SetValue(false);
+ homepage_.SetValue(homepage);
+ }
+}
+
+// Callback when preferences are changed by someone modifying the prefs backend
+// externally. |prefName| is the name of the pref that has changed. Unlike on
+// Windows, we don't need to use this method for initializing, that's handled by
+// Cocoa Bindings.
+// Handles prefs for the "Basics" panel.
+- (void)basicsPrefChanged:(std::wstring*)prefName {
+ if (*prefName == prefs::kRestoreOnStartup) {
+ const SessionStartupPref startupPref =
+ SessionStartupPref::GetStartupPref(prefs_);
+ [self setRestoreOnStartupIndex:startupPref.type];
+ }
+
+ // TODO(beng): Note that the kURLsToRestoreOnStartup pref is a mutable list,
+ // and changes to mutable lists aren't broadcast through the
+ // observer system, so the second half of this condition will
+ // never match. Once support for broadcasting such updates is
+ // added, this will automagically start to work, and this comment
+ // can be removed.
+ if (*prefName == prefs::kURLsToRestoreOnStartup) {
+ const SessionStartupPref startupPref =
+ SessionStartupPref::GetStartupPref(prefs_);
+ // Set table model.
+ NOTIMPLEMENTED();
+ }
+
+ if (*prefName == prefs::kHomePageIsNewTabPage) {
+ NSInteger useNewTabPage = newTabPageIsHomePage_.GetValue() ? 0 : 1;
+ [self setNewTabPageIsHomePage:useNewTabPage];
+ }
+ if (*prefName == prefs::kHomePage) {
+ NSString* value = base::SysWideToNSString(homepage_.GetValue());
+ [self setHomepageURL:value];
+ }
+
+ if (*prefName == prefs::kShowHomeButton) {
+ [self setShowHomeButton:showHomeButton_.GetValue() ? YES : NO];
+ }
+ if (*prefName == prefs::kShowPageOptionsButtons) {
+ [self setShowPageOptionsButtons:showPageOptionButtons_.GetValue() ?
+ YES : NO];
+ }
+}
+
+// Returns the index of the selected cell in the "on startup" matrix based
+// on the "restore on startup" pref. The ordering of the cells is in the
+// same order as the pref.
+- (NSInteger)restoreOnStartupIndex {
+ const SessionStartupPref startupPref =
+ SessionStartupPref::GetStartupPref(prefs_);
+ return startupPref.type;
+}
+
+// Sets the pref based on the index of the selected cell in the matrix and
+// marks the appropriate user metric.
+- (void)setRestoreOnStartupIndex:(NSInteger)type {
+ SessionStartupPref pref;
+ pref.type = static_cast<SessionStartupPref::Type>(type);
+ // TODO(pinkerton): list of pages in |pref.urls|
+ switch (pref.type) {
+ case SessionStartupPref::DEFAULT:
+ [self recordUserAction:L"Options_Startup_Homepage"];
+ break;
+ case SessionStartupPref::LAST:
+ [self recordUserAction:L"Options_Startup_LastSession"];
+ break;
+ case SessionStartupPref::URLS:
+ [self recordUserAction:L"Options_Startup_Custom"];
+ break;
+ default:
+ NOTREACHED();
+ }
+ SessionStartupPref::SetStartupPref(prefs_, pref);
+}
+
+// Returns whether or not the +/-/Current buttons should be enabled, based on
+// the current pref value for the startup urls.
+- (BOOL)enableRestoreButtons {
+ return [self restoreOnStartupIndex] == SessionStartupPref::URLS;
+}
+
+enum { kHomepageNewTabPage, kHomepageURL };
+
+// Returns the index of the selected cell in the "home page" marix based on
+// the "new tab is home page" pref. Sadly, the ordering is reversed from the
+// pref value.
+- (NSInteger)newTabPageIsHomePageIndex {
+ return newTabPageIsHomePage_.GetValue() ?
+ kHomepageNewTabPage : kHomepageURL;
+}
+// Sets the pref based on the given index into the matrix and marks the
+// appropriate user metric.
+- (void)setNewTabPageIsHomePageIndex:(NSInteger)index {
+ bool useNewTabPage = index == kHomepageNewTabPage ? true : false;
+ if (useNewTabPage)
+ [self recordUserAction:L"Options_Homepage_UseNewTab"];
+ else
+ [self recordUserAction:L"Options_Homepage_UseURL"];
+ newTabPageIsHomePage_.SetValue(useNewTabPage);
}
-// Synchronizes the window's UI elements with the values in |prefs_|.
-- (void)syncWithPrefs {
- // TODO(pinkerton): do it...
+// Returns whether or not the homepage URL text field should be enabled
+// based on if the new tab page is the home page.
+- (BOOL)isHomepageURLEnabled {
+ return newTabPageIsHomePage_.GetValue() ? NO : YES;
+}
+
+// Returns the homepage URL.
+- (NSString*)homepageURL {
+ NSString* value = base::SysWideToNSString(homepage_.GetValue());
+ return value;
+}
+
+// Sets the homepage URL to |urlString| with some fixing up.
+- (void)setHomepageURL:(NSString*)urlString {
+ // If the text field contains a valid URL, sync it to prefs. We run it
+ // through the fixer upper to allow input like "google.com" to be converted
+ // to something valid ("http://google.com").
+ std::wstring temp = base::SysNSStringToWide(urlString);
+ std::wstring fixedString = URLFixerUpper::FixupURL(temp, std::wstring());
+ if (GURL(WideToUTF8(fixedString)).is_valid())
+ [self setHomepage:fixedString];
+}
+
+// Returns whether the home button should be checked based on the preference.
+- (BOOL)showHomeButton {
+ return showHomeButton_.GetValue() ? YES : NO;
+}
+
+// Sets the backend pref for whether or not the home button should be displayed
+// based on |value|.
+- (void)setShowHomeButton:(BOOL)value {
+ if (value)
+ [self recordUserAction:L"Options_Homepage_ShowHomeButton"];
+ else
+ [self recordUserAction:L"Options_Homepage_HideHomeButton"];
+ showHomeButton_.SetValue(value ? true : false);
+}
+
+// Returns whether the page and options button should be checked based on the
+// preference.
+- (BOOL)showPageOptionsButtons {
+ return showPageOptionButtons_.GetValue() ? YES : NO;
+}
+
+// Sets the backend pref for whether or not the page and options buttons should
+// be displayed based on |value|.
+- (void)setShowPageOptionsButtons:(BOOL)value {
+ if (value)
+ [self recordUserAction:L"Options_Homepage_ShowPageOptionsButtons"];
+ else
+ [self recordUserAction:L"Options_Homepage_HidePageOptionsButtons"];
+ showPageOptionButtons_.SetValue(value ? true : false);
+}
+
+//-------------------------------------------------------------------------
+// Minor Tweaks panel
+
+// Callback when preferences are changed. |prefName| is the name of the
+// pref that has changed, or |NULL| if all prefs should be updated.
+// Handles prefs for the "Minor Tweaks" panel.
+- (void)minorTweaksPrefChanged:(std::wstring*)prefName {
+}
+
+//-------------------------------------------------------------------------
+// Under the hood panel
+
+// Callback when preferences are changed. |prefName| is the name of the
+// pref that has changed, or |NULL| if all prefs should be updated.
+// Handles prefs for the "Under the hood" panel.
+- (void)underHoodPrefChanged:(std::wstring*)prefName {
+}
+
+//-------------------------------------------------------------------------
+
+// Callback when preferences are changed. |prefName| is the name of the
+// pref that has changed and should not be NULL.
+- (void)prefChanged:(std::wstring*)prefName {
+ DCHECK(prefName);
+ if (!prefName) return;
+ [self basicsPrefChanged:prefName];
+ [self minorTweaksPrefChanged:prefName];
+ [self underHoodPrefChanged:prefName];
}
// Show the preferences window.
- (IBAction)showPreferences:(id)sender {
- [self syncWithPrefs];
[self showWindow:sender];
}
diff --git a/chrome/browser/cocoa/preferences_window_controller_unittest.mm b/chrome/browser/cocoa/preferences_window_controller_unittest.mm
index 33bc12b..e276bf2 100644
--- a/chrome/browser/cocoa/preferences_window_controller_unittest.mm
+++ b/chrome/browser/cocoa/preferences_window_controller_unittest.mm
@@ -8,6 +8,7 @@
#import "chrome/browser/cocoa/preferences_window_controller.h"
#include "chrome/browser/cocoa/browser_test_helper.h"
#include "chrome/browser/cocoa/cocoa_test_helper.h"
+#include "chrome/common/pref_names.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -31,9 +32,13 @@ namespace {
class PrefsControllerTest : public PlatformTest {
public:
PrefsControllerTest() {
+ // Since this is a platform-specific preference, it's not registered by
+ // any of the shared code. We have to register it ourselves.
PrefService* prefs = browser_helper_.profile()->GetPrefs();
+ prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false);
+
pref_controller_.reset([[PreferencesWindowController alloc]
- initWithPrefs:prefs]);
+ initWithProfile:browser_helper_.profile()]);
EXPECT_TRUE(pref_controller_.get());
}
@@ -46,8 +51,7 @@ class PrefsControllerTest : public PlatformTest {
// making sure we get the notification when it's closed.
TEST_F(PrefsControllerTest, ShowAndClose) {
#if 0
-// TODO(pinkerton): this works locally, but fails on the buildbot. Need to
-// investigate.
+// TODO(pinkerton): this crashes deep w/in performClose:. Need to investigate.
[pref_controller_ showPreferences:nil];
EXPECT_TRUE([[pref_controller_ window] isVisible]);
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index 8b32d7d..46219af 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -19,7 +19,7 @@ class ShellIntegration {
// text editor and ftp links with a FTP client).
static bool IsDefaultBrowser();
- // Returns true if IE is likely to be the default browser for the current
+ // Returns true if Firefox is likely to be the default browser for the current
// user. This method is very fast so it can be invoked in the UI thread.
static bool IsFirefoxDefaultBrowser();
};
diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm
new file mode 100644
index 0000000..28fdd8c
--- /dev/null
+++ b/chrome/browser/shell_integration_mac.mm
@@ -0,0 +1,49 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/shell_integration.h"
+
+#include "base/mac_util.h"
+#import "third_party/mozilla/include/NSWorkspace+Utils.h"
+
+// Sets Chromium as default browser (only for current user). Returns false if
+// this operation fails (which we can't check for).
+bool ShellIntegration::SetAsDefaultBrowser() {
+ NSBundle* mainBundle = mac_util::MainAppBundle();
+ NSString* identifier = [mainBundle bundleIdentifier];
+ [[NSWorkspace sharedWorkspace] setDefaultBrowserWithIdentifier:identifier];
+ return true;
+}
+
+namespace {
+
+// Returns true if |identifier| is the bundle id of the default browser.
+bool IsIdentifierDefaultBrowser(NSString* identifier) {
+ NSString* defaultBrowser =
+ [[NSWorkspace sharedWorkspace] defaultBrowserIdentifier];
+ if (!identifier || !defaultBrowser)
+ return false;
+ // We need to ensure we do the comparison case-insensitive as LS doesn't
+ // persist the case of our bundle id.
+ NSComparisonResult result =
+ [defaultBrowser caseInsensitiveCompare:identifier];
+ return result == NSOrderedSame;
+}
+
+} // namespace
+
+// Returns true if this instance of Chromium is the default browser. (Defined
+// as being the handler for the http/https protocols... we don't want to
+// report false here if the user has simply chosen to open HTML files in a
+// text editor and ftp links with a FTP client).
+bool ShellIntegration::IsDefaultBrowser() {
+ NSBundle* mainBundle = mac_util::MainAppBundle();
+ NSString* myIdentifier = [mainBundle bundleIdentifier];
+ return IsIdentifierDefaultBrowser(myIdentifier);
+}
+
+// Returns true if Firefox is the default browser for the current user.
+bool ShellIntegration::IsFirefoxDefaultBrowser() {
+ return IsIdentifierDefaultBrowser(@"org.mozilla.firefox");
+}
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 45f14d9..ea3765a 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -1189,6 +1189,7 @@
'browser/shell_dialogs.h',
'browser/shell_integration.cc',
'browser/shell_integration.h',
+ 'browser/shell_integration_mac.mm',
'browser/spellcheck_worditerator.cc',
'browser/spellcheck_worditerator.h',
'browser/spellchecker.cc',
@@ -1493,6 +1494,9 @@
'../third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.m',
'../third_party/GTM/AppKit/GTMNSColor+Luminance.m',
'../third_party/GTM/AppKit/GTMTheme.m',
+ # Build necessary Mozilla sources
+ '../third_party/mozilla/include/NSWorkspace+Utils.h',
+ '../third_party/mozilla/include/NSWorkspace+Utils.m',
],
'include_dirs': [
'../third_party/GTM',
diff --git a/chrome/common/pref_member.h b/chrome/common/pref_member.h
index 34db9bd..4b96907 100644
--- a/chrome/common/pref_member.h
+++ b/chrome/common/pref_member.h
@@ -18,7 +18,8 @@
// update if either the pref changes or if my_string_.SetValue is called.
//
// An optional observer can be passed into the Init method which can be used to
-// notify MyClass of changes.
+// notify MyClass of changes. Note that if you use SetValue(), the observer
+// will not be notified.
#ifndef CHROME_COMMON_PREF_MEMBER_H_
#define CHROME_COMMON_PREF_MEMBER_H_
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index aaf54cc..1cc0f1c 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -201,6 +201,11 @@ const wchar_t kIpcDisabledMessages[] = L"ipc_log_disabled_messages";
// visible on the toolbar.
const wchar_t kShowHomeButton[] = L"browser.show_home_button";
+// A boolean pref set to true if the Page and Options menu buttons should be
+// visible on the toolbar. This is only used for Mac where the default is to
+// have these menu in the main menubar, not as buttons on the toolbar.
+const wchar_t kShowPageOptionsButtons[] = L"browser.show_page_options_buttons";
+
// A string value which saves short list of recently user selected encodings
// separated with comma punctuation mark.
const wchar_t kRecentlySelectedEncoding[] =
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 53385fd..2dccc57 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -65,6 +65,7 @@ extern const wchar_t kDnsStartupPrefetchList[];
extern const wchar_t kDnsHostReferralList[];
extern const wchar_t kIpcDisabledMessages[];
extern const wchar_t kShowHomeButton[];
+extern const wchar_t kShowPageOptionsButtons[];
extern const wchar_t kRecentlySelectedEncoding[];
extern const wchar_t kDeleteBrowsingHistory[];
extern const wchar_t kDeleteDownloadHistory[];
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 1eee578..b4d87c8 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -121,6 +121,7 @@ void AutomationProvider::OnMessageFromExternalHost(
//--------------------------------------------------------------------------
+#if defined(OS_LINUX)
bool ShellIntegration::SetAsDefaultBrowser() {
NOTIMPLEMENTED();
return true;
@@ -130,6 +131,7 @@ bool ShellIntegration::IsDefaultBrowser() {
NOTIMPLEMENTED();
return true;
}
+#endif
//--------------------------------------------------------------------------