diff options
-rw-r--r-- | chrome/app/nibs/en.lproj/ClearBrowsingData.xib | 697 | ||||
-rw-r--r-- | chrome/app/nibs/en.lproj/MainMenu.xib | 86 | ||||
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 17 | ||||
-rw-r--r-- | chrome/browser/browser.cc | 4 | ||||
-rw-r--r-- | chrome/browser/browser.h | 2 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa.mm | 8 | ||||
-rw-r--r-- | chrome/browser/cocoa/clear_browsing_data_controller.h | 67 | ||||
-rw-r--r-- | chrome/browser/cocoa/clear_browsing_data_controller.mm | 157 | ||||
-rw-r--r-- | chrome/browser/cocoa/throbber_view.h | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/throbber_view.mm | 99 | ||||
-rw-r--r-- | chrome/chrome.gyp | 6 |
11 files changed, 895 insertions, 252 deletions
diff --git a/chrome/app/nibs/en.lproj/ClearBrowsingData.xib b/chrome/app/nibs/en.lproj/ClearBrowsingData.xib index e3b32b3..bb2a675 100644 --- a/chrome/app/nibs/en.lproj/ClearBrowsingData.xib +++ b/chrome/app/nibs/en.lproj/ClearBrowsingData.xib @@ -26,7 +26,7 @@ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSCustomObject" id="1001"> - <string key="NSClassName">NSObject</string> + <string key="NSClassName">ClearBrowsingDataController</string> </object> <object class="NSCustomObject" id="1003"> <string key="NSClassName">FirstResponder</string> @@ -37,34 +37,34 @@ <object class="NSWindowTemplate" id="1005"> <int key="NSWindowStyleMask">1</int> <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{196, 265}, {349, 245}}</string> + <string key="NSWindowRect">{{196, 211}, {331, 299}}</string> <int key="NSWTFlags">536871936</int> - <string key="NSWindowTitle">Window</string> + <string key="NSWindowTitle">Clear Browsing Data</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="1006"> <reference key="NSNextResponder"/> - <int key="NSvFlags">256</int> + <int key="NSvFlags">292</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTextField" id="15241909"> + <object class="NSTextField" id="960437817"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{39, 208}, {196, 17}}</string> + <string key="NSFrame">{{39, 262}, {196, 17}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="440356547"> + <object class="NSTextFieldCell" key="NSCell" id="169418329"> <int key="NSCellFlags">68288064</int> <int key="NSCellFlags2">272630784</int> <string key="NSContents">Obliterate the following items:</string> - <object class="NSFont" key="NSSupport" id="702312928"> + <object class="NSFont" key="NSSupport" id="561508160"> <string key="NSName">LucidaGrande</string> <double key="NSSize">1.300000e+01</double> <int key="NSfFlags">1044</int> </object> - <reference key="NSControlView" ref="15241909"/> - <object class="NSColor" key="NSBackgroundColor" id="940253065"> + <reference key="NSControlView" ref="960437817"/> + <object class="NSColor" key="NSBackgroundColor" id="373482755"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> <string key="NSColorName">controlColor</string> @@ -73,7 +73,7 @@ <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes> </object> </object> - <object class="NSColor" key="NSTextColor" id="598722955"> + <object class="NSColor" key="NSTextColor" id="824982308"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> <string key="NSColorName">controlTextColor</string> @@ -84,25 +84,25 @@ </object> </object> </object> - <object class="NSButton" id="448636557"> + <object class="NSButton" id="94476998"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{53, 170}, {167, 32}}</string> + <string key="NSFrame">{{53, 224}, {167, 32}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="982034678"> + <object class="NSButtonCell" key="NSCell" id="317213760"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">0</int> <string key="NSContents">Clear browsing history</string> - <reference key="NSSupport" ref="702312928"/> - <reference key="NSControlView" ref="448636557"/> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="94476998"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">130</int> - <object class="NSCustomResource" key="NSNormalImage" id="491391846"> + <object class="NSCustomResource" key="NSNormalImage" id="333895445"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSSwitch</string> </object> - <object class="NSButtonImageSource" key="NSAlternateImage" id="57169226"> + <object class="NSButtonImageSource" key="NSAlternateImage" id="255044096"> <string key="NSImageName">NSSwitch</string> </object> <string key="NSAlternateContents"/> @@ -111,156 +111,166 @@ <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSButton" id="723805392"> + <object class="NSButton" id="787203054"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{53, 146}, {171, 32}}</string> + <string key="NSFrame">{{53, 200}, {171, 32}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="444100629"> + <object class="NSButtonCell" key="NSCell" id="903695415"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">0</int> <string key="NSContents">Clear download history</string> - <reference key="NSSupport" ref="702312928"/> - <reference key="NSControlView" ref="723805392"/> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="787203054"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">130</int> - <reference key="NSNormalImage" ref="491391846"/> - <reference key="NSAlternateImage" ref="57169226"/> + <reference key="NSNormalImage" ref="333895445"/> + <reference key="NSAlternateImage" ref="255044096"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> <int key="NSPeriodicDelay">200</int> <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSButton" id="210409428"> + <object class="NSButton" id="712572294"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{52, 124}, {167, 32}}</string> + <string key="NSFrame">{{52, 175}, {167, 32}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="476613293"> + <object class="NSButtonCell" key="NSCell" id="93196919"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">0</int> <string key="NSContents">Empty the cache</string> - <reference key="NSSupport" ref="702312928"/> - <reference key="NSControlView" ref="210409428"/> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="712572294"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">130</int> - <reference key="NSNormalImage" ref="491391846"/> - <reference key="NSAlternateImage" ref="57169226"/> + <reference key="NSNormalImage" ref="333895445"/> + <reference key="NSAlternateImage" ref="255044096"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> <int key="NSPeriodicDelay">200</int> <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSButton" id="827752490"> + <object class="NSButton" id="234232048"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{52, 96}, {167, 32}}</string> + <string key="NSFrame">{{52, 150}, {167, 32}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="967836673"> + <object class="NSButtonCell" key="NSCell" id="398687204"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">0</int> <string key="NSContents">Delete cookies</string> - <reference key="NSSupport" ref="702312928"/> - <reference key="NSControlView" ref="827752490"/> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="234232048"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">130</int> - <reference key="NSNormalImage" ref="491391846"/> - <reference key="NSAlternateImage" ref="57169226"/> + <reference key="NSNormalImage" ref="333895445"/> + <reference key="NSAlternateImage" ref="255044096"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> <int key="NSPeriodicDelay">200</int> <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSButton" id="729464060"> + <object class="NSButton" id="889683632"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{52, 70}, {167, 32}}</string> + <string key="NSFrame">{{52, 124}, {167, 32}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="77466605"> + <object class="NSButtonCell" key="NSCell" id="558713458"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">0</int> <string key="NSContents">Clear saved passwords</string> - <reference key="NSSupport" ref="702312928"/> - <reference key="NSControlView" ref="729464060"/> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="889683632"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">130</int> - <reference key="NSNormalImage" ref="491391846"/> - <reference key="NSAlternateImage" ref="57169226"/> + <reference key="NSNormalImage" ref="333895445"/> + <reference key="NSAlternateImage" ref="255044096"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> <int key="NSPeriodicDelay">200</int> <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSPopUpButton" id="160050045"> + <object class="NSPopUpButton" id="836936583"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{148, 35}, {100, 26}}</string> + <string key="NSFrame">{{148, 56}, {145, 26}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSPopUpButtonCell" key="NSCell" id="80361031"> + <object class="NSPopUpButtonCell" key="NSCell" id="744820906"> <int key="NSCellFlags">-2076049856</int> <int key="NSCellFlags2">2048</int> - <reference key="NSSupport" ref="702312928"/> - <reference key="NSControlView" ref="160050045"/> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="836936583"/> <int key="NSButtonFlags">109199615</int> <int key="NSButtonFlags2">129</int> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> <int key="NSPeriodicDelay">400</int> <int key="NSPeriodicInterval">75</int> - <object class="NSMenuItem" key="NSMenuItem" id="654387211"> - <reference key="NSMenu" ref="592968330"/> - <string key="NSTitle">Item 1</string> + <object class="NSMenuItem" key="NSMenuItem" id="1043594244"> + <reference key="NSMenu" ref="212748305"/> + <string key="NSTitle">Last day</string> <string key="NSKeyEquiv"/> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> <int key="NSState">1</int> - <object class="NSCustomResource" key="NSOnImage" id="401629603"> + <object class="NSCustomResource" key="NSOnImage" id="445490828"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSMenuCheckmark</string> </object> - <object class="NSCustomResource" key="NSMixedImage" id="603693456"> + <object class="NSCustomResource" key="NSMixedImage" id="175775312"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSMenuMixedState</string> </object> <string key="NSAction">_popUpItemAction:</string> - <reference key="NSTarget" ref="80361031"/> + <reference key="NSTarget" ref="744820906"/> </object> <bool key="NSMenuItemRespectAlignment">YES</bool> - <object class="NSMenu" key="NSMenu" id="592968330"> + <object class="NSMenu" key="NSMenu" id="212748305"> <string key="NSTitle">OtherViews</string> <object class="NSMutableArray" key="NSMenuItems"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="654387211"/> - <object class="NSMenuItem" id="416227170"> - <reference key="NSMenu" ref="592968330"/> - <string key="NSTitle">Item 2</string> + <reference ref="1043594244"/> + <object class="NSMenuItem" id="130294077"> + <reference key="NSMenu" ref="212748305"/> + <string key="NSTitle">Last week</string> <string key="NSKeyEquiv"/> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="401629603"/> - <reference key="NSMixedImage" ref="603693456"/> + <reference key="NSOnImage" ref="445490828"/> + <reference key="NSMixedImage" ref="175775312"/> <string key="NSAction">_popUpItemAction:</string> - <reference key="NSTarget" ref="80361031"/> + <reference key="NSTarget" ref="744820906"/> </object> - <object class="NSMenuItem" id="232654559"> - <reference key="NSMenu" ref="592968330"/> - <string key="NSTitle">Item 3</string> + <object class="NSMenuItem" id="723360047"> + <reference key="NSMenu" ref="212748305"/> + <string key="NSTitle">Last 4 weeks</string> <string key="NSKeyEquiv"/> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="401629603"/> - <reference key="NSMixedImage" ref="603693456"/> + <reference key="NSOnImage" ref="445490828"/> + <reference key="NSMixedImage" ref="175775312"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="744820906"/> + </object> + <object class="NSMenuItem" id="445409450"> + <reference key="NSMenu" ref="212748305"/> + <string key="NSTitle">Everything</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="445490828"/> + <reference key="NSMixedImage" ref="175775312"/> <string key="NSAction">_popUpItemAction:</string> - <reference key="NSTarget" ref="80361031"/> + <reference key="NSTarget" ref="744820906"/> </object> </object> </object> @@ -270,24 +280,93 @@ <int key="NSArrowPosition">2</int> </object> </object> - <object class="NSTextField" id="416826391"> + <object class="NSTextField" id="278389306"> <reference key="NSNextResponder" ref="1006"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{39, 42}, {107, 17}}</string> + <string key="NSFrame">{{39, 63}, {107, 17}}</string> <reference key="NSSuperview" ref="1006"/> <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="1032953363"> + <object class="NSTextFieldCell" key="NSCell" id="691799240"> <int key="NSCellFlags">68288064</int> <int key="NSCellFlags2">272630784</int> <string key="NSContents">Clear data from:</string> - <reference key="NSSupport" ref="702312928"/> - <reference key="NSControlView" ref="416826391"/> - <reference key="NSBackgroundColor" ref="940253065"/> - <reference key="NSTextColor" ref="598722955"/> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="278389306"/> + <reference key="NSBackgroundColor" ref="373482755"/> + <reference key="NSTextColor" ref="824982308"/> </object> </object> + <object class="NSButton" id="340114853"> + <reference key="NSNextResponder" ref="1006"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{221, 12}, {96, 32}}</string> + <reference key="NSSuperview" ref="1006"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="817836045"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents">Clear</string> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="340114853"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="110601986"> + <reference key="NSNextResponder" ref="1006"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{125, 12}, {96, 32}}</string> + <reference key="NSSuperview" ref="1006"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="158868682"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents">Cancel</string> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="110601986"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="485872479"> + <reference key="NSNextResponder" ref="1006"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{53, 104}, {121, 18}}</string> + <reference key="NSSuperview" ref="1006"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="1025693685"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Clear form data</string> + <reference key="NSSupport" ref="561508160"/> + <reference key="NSControlView" ref="485872479"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">130</int> + <reference key="NSNormalImage" ref="333895445"/> + <reference key="NSAlternateImage" ref="255044096"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSCustomView" id="1005756006"> + <reference key="NSNextResponder" ref="1006"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{20, 24}, {16, 16}}</string> + <reference key="NSSuperview" ref="1006"/> + <string key="NSClassName">ThrobberView</string> + </object> </object> - <string key="NSFrameSize">{349, 245}</string> + <string key="NSFrameSize">{331, 299}</string> <reference key="NSSuperview"/> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> @@ -297,6 +376,231 @@ <object class="IBObjectContainer" key="IBDocument.Objects"> <object class="NSMutableArray" key="connectionRecords"> <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cancel:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="110601986"/> + </object> + <int key="connectionID">32</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">window</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="1005"/> + </object> + <int key="connectionID">33</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="1005"/> + <reference key="destination" ref="1001"/> + </object> + <int key="connectionID">34</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">value: clearBrowsingHistory</string> + <reference key="source" ref="94476998"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="94476998"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">value: clearBrowsingHistory</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">clearBrowsingHistory</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">40</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">value: clearDownloadHistory</string> + <reference key="source" ref="787203054"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="787203054"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">value: clearDownloadHistory</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">clearDownloadHistory</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">42</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">value: emptyCache</string> + <reference key="source" ref="712572294"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="712572294"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">value: emptyCache</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">emptyCache</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">44</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">value: deleteCookies</string> + <reference key="source" ref="234232048"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="234232048"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">value: deleteCookies</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">deleteCookies</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">46</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">value: clearSavedPasswords</string> + <reference key="source" ref="889683632"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="889683632"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">value: clearSavedPasswords</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">clearSavedPasswords</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">48</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">value: clearFormData</string> + <reference key="source" ref="485872479"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="485872479"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">value: clearFormData</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">clearFormData</string> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">50</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">selectedIndex: timePeriod</string> + <reference key="source" ref="836936583"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="836936583"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">selectedIndex: timePeriod</string> + <string key="NSBinding">selectedIndex</string> + <string key="NSKeyPath">timePeriod</string> + <object class="NSDictionary" key="NSOptions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSAllowsEditingMultipleValuesSelection</string> + <string>NSConditionallySetsEnabled</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <boolean value="NO" id="6"/> + <reference ref="6"/> + </object> + </object> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">54</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">clearData:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="340114853"/> + </object> + <int key="connectionID">55</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">enabled: isClearing</string> + <reference key="source" ref="340114853"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="340114853"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">enabled: isClearing</string> + <string key="NSBinding">enabled</string> + <string key="NSKeyPath">isClearing</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">58</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">enabled: isClearing</string> + <reference key="source" ref="110601986"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="110601986"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">enabled: isClearing</string> + <string key="NSBinding">enabled</string> + <string key="NSKeyPath">isClearing</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">63</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBBindingConnection" key="connection"> + <string key="label">hidden: isClearing</string> + <reference key="source" ref="1005756006"/> + <reference key="destination" ref="1001"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="1005756006"/> + <reference key="NSDestination" ref="1001"/> + <string key="NSLabel">hidden: isClearing</string> + <string key="NSBinding">hidden</string> + <string key="NSKeyPath">isClearing</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">70</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">progress_</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="1005756006"/> + </object> + <int key="connectionID">71</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -341,158 +645,215 @@ <reference key="object" ref="1006"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="15241909"/> - <reference ref="448636557"/> - <reference ref="723805392"/> - <reference ref="210409428"/> - <reference ref="827752490"/> - <reference ref="729464060"/> - <reference ref="160050045"/> - <reference ref="416826391"/> + <reference ref="960437817"/> + <reference ref="94476998"/> + <reference ref="787203054"/> + <reference ref="234232048"/> + <reference ref="889683632"/> + <reference ref="836936583"/> + <reference ref="278389306"/> + <reference ref="485872479"/> + <reference ref="712572294"/> + <reference ref="340114853"/> + <reference ref="110601986"/> + <reference ref="1005756006"/> </object> <reference key="parent" ref="1005"/> </object> <object class="IBObjectRecord"> <int key="objectID">3</int> - <reference key="object" ref="15241909"/> + <reference key="object" ref="960437817"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="440356547"/> + <reference ref="169418329"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">4</int> - <reference key="object" ref="440356547"/> - <reference key="parent" ref="15241909"/> + <reference key="object" ref="169418329"/> + <reference key="parent" ref="960437817"/> </object> <object class="IBObjectRecord"> <int key="objectID">5</int> - <reference key="object" ref="448636557"/> + <reference key="object" ref="94476998"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="982034678"/> + <reference ref="317213760"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">6</int> - <reference key="object" ref="982034678"/> - <reference key="parent" ref="448636557"/> + <reference key="object" ref="317213760"/> + <reference key="parent" ref="94476998"/> </object> <object class="IBObjectRecord"> <int key="objectID">7</int> - <reference key="object" ref="723805392"/> + <reference key="object" ref="787203054"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="444100629"/> + <reference ref="903695415"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">8</int> - <reference key="object" ref="444100629"/> - <reference key="parent" ref="723805392"/> + <reference key="object" ref="903695415"/> + <reference key="parent" ref="787203054"/> </object> <object class="IBObjectRecord"> <int key="objectID">11</int> - <reference key="object" ref="210409428"/> + <reference key="object" ref="712572294"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="476613293"/> + <reference ref="93196919"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">12</int> - <reference key="object" ref="476613293"/> - <reference key="parent" ref="210409428"/> + <reference key="object" ref="93196919"/> + <reference key="parent" ref="712572294"/> </object> <object class="IBObjectRecord"> <int key="objectID">13</int> - <reference key="object" ref="827752490"/> + <reference key="object" ref="234232048"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="967836673"/> + <reference ref="398687204"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">14</int> - <reference key="object" ref="967836673"/> - <reference key="parent" ref="827752490"/> + <reference key="object" ref="398687204"/> + <reference key="parent" ref="234232048"/> </object> <object class="IBObjectRecord"> <int key="objectID">15</int> - <reference key="object" ref="729464060"/> + <reference key="object" ref="889683632"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="77466605"/> + <reference ref="558713458"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">16</int> - <reference key="object" ref="77466605"/> - <reference key="parent" ref="729464060"/> + <reference key="object" ref="558713458"/> + <reference key="parent" ref="889683632"/> </object> <object class="IBObjectRecord"> <int key="objectID">19</int> - <reference key="object" ref="160050045"/> + <reference key="object" ref="836936583"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="80361031"/> + <reference ref="744820906"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">20</int> - <reference key="object" ref="80361031"/> + <reference key="object" ref="744820906"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="592968330"/> + <reference ref="212748305"/> </object> - <reference key="parent" ref="160050045"/> + <reference key="parent" ref="836936583"/> </object> <object class="IBObjectRecord"> <int key="objectID">21</int> - <reference key="object" ref="592968330"/> + <reference key="object" ref="212748305"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="654387211"/> - <reference ref="416227170"/> - <reference ref="232654559"/> + <reference ref="1043594244"/> + <reference ref="130294077"/> + <reference ref="723360047"/> + <reference ref="445409450"/> </object> - <reference key="parent" ref="80361031"/> + <reference key="parent" ref="744820906"/> </object> <object class="IBObjectRecord"> <int key="objectID">22</int> - <reference key="object" ref="654387211"/> - <reference key="parent" ref="592968330"/> + <reference key="object" ref="1043594244"/> + <reference key="parent" ref="212748305"/> </object> <object class="IBObjectRecord"> <int key="objectID">23</int> - <reference key="object" ref="416227170"/> - <reference key="parent" ref="592968330"/> + <reference key="object" ref="130294077"/> + <reference key="parent" ref="212748305"/> </object> <object class="IBObjectRecord"> <int key="objectID">24</int> - <reference key="object" ref="232654559"/> - <reference key="parent" ref="592968330"/> + <reference key="object" ref="723360047"/> + <reference key="parent" ref="212748305"/> </object> <object class="IBObjectRecord"> <int key="objectID">25</int> - <reference key="object" ref="416826391"/> + <reference key="object" ref="278389306"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1032953363"/> + <reference ref="691799240"/> </object> <reference key="parent" ref="1006"/> </object> <object class="IBObjectRecord"> <int key="objectID">26</int> - <reference key="object" ref="1032953363"/> - <reference key="parent" ref="416826391"/> + <reference key="object" ref="691799240"/> + <reference key="parent" ref="278389306"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">27</int> + <reference key="object" ref="340114853"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="817836045"/> + </object> + <reference key="parent" ref="1006"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">28</int> + <reference key="object" ref="817836045"/> + <reference key="parent" ref="340114853"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">29</int> + <reference key="object" ref="110601986"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="158868682"/> + </object> + <reference key="parent" ref="1006"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">30</int> + <reference key="object" ref="158868682"/> + <reference key="parent" ref="110601986"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">35</int> + <reference key="object" ref="445409450"/> + <reference key="parent" ref="212748305"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">36</int> + <reference key="object" ref="485872479"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1025693685"/> + </object> + <reference key="parent" ref="1006"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">37</int> + <reference key="object" ref="1025693685"/> + <reference key="parent" ref="485872479"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">64</int> + <reference key="object" ref="1005756006"/> + <reference key="parent" ref="1006"/> </object> </object> </object> @@ -525,10 +886,18 @@ <string>24.IBPluginDependency</string> <string>25.IBPluginDependency</string> <string>26.IBPluginDependency</string> + <string>27.IBPluginDependency</string> + <string>28.IBPluginDependency</string> + <string>29.IBPluginDependency</string> <string>3.IBPluginDependency</string> + <string>30.IBPluginDependency</string> + <string>35.IBPluginDependency</string> + <string>36.IBPluginDependency</string> + <string>37.IBPluginDependency</string> <string>4.IBPluginDependency</string> <string>5.IBPluginDependency</string> <string>6.IBPluginDependency</string> + <string>64.IBPluginDependency</string> <string>7.IBPluginDependency</string> <string>8.IBPluginDependency</string> </object> @@ -537,10 +906,10 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{1281, 231}, {349, 245}}</string> + <string>{{1529, 161}, {331, 299}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{1281, 231}, {349, 245}}</string> - <integer value="1"/> + <string>{{1529, 161}, {331, 299}}</string> + <reference ref="6"/> <string>{196, 240}</string> <string>{{357, 418}, {480, 270}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -552,7 +921,15 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{914, 532}, {113, 63}}</string> + <string>{{1666, 160}, {156, 83}}</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>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>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -587,11 +964,55 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">26</int> + <int key="maxID">71</int> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <object class="NSMutableArray" key="referencedPartialClassDescriptions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBPartialClassDescription"> + <string key="className">ClearBrowsingDataController</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>cancel:</string> + <string>clearData:</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>id</string> + <string>id</string> + </object> + </object> + <object class="NSMutableDictionary" key="outlets"> + <string key="NS.key.0">progress_</string> + <string key="NS.object.0">ThrobberView</string> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">browser/cocoa/clear_browsing_data_controller.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">browser/cocoa/tab_strip_model_observer_bridge.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">ThrobberView</string> + <string key="superclassName">NSView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">browser/cocoa/throbber_view.h</string> + </object> + </object> + </object> </object> - <object class="IBClassDescriber" key="IBDocument.Classes"/> <int key="IBDocument.localizationMode">0</int> - <nil key="IBDocument.LastKnownRelativeProjectPath"/> + <string key="IBDocument.LastKnownRelativeProjectPath">../../../chrome.xcodeproj</string> <int key="IBDocument.defaultPropertyAccessControl">3</int> </data> </archive> diff --git a/chrome/app/nibs/en.lproj/MainMenu.xib b/chrome/app/nibs/en.lproj/MainMenu.xib index e0a917c..00f489b 100644 --- a/chrome/app/nibs/en.lproj/MainMenu.xib +++ b/chrome/app/nibs/en.lproj/MainMenu.xib @@ -8,7 +8,7 @@ <string key="IBDocument.HIToolboxVersion">352.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="81"/> + <integer value="515"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -103,6 +103,7 @@ <int key="NSMnemonicLoc">2147483647</int> <reference key="NSOnImage" ref="353210768"/> <reference key="NSMixedImage" ref="549394948"/> + <int key="NSTag">40013</int> </object> <object class="NSMenuItem" id="481834944"> <reference key="NSMenu" ref="110575045"/> @@ -905,25 +906,6 @@ <reference key="NSOnImage" ref="353210768"/> <reference key="NSMixedImage" ref="549394948"/> </object> - <object class="NSMenuItem" id="761864546"> - <reference key="NSMenu" ref="436720301"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="854840957"> - <reference key="NSMenu" ref="436720301"/> - <string key="NSTitle">Clear Browsing Data</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - <int key="NSTag">40013</int> - </object> </object> </object> </object> @@ -1496,14 +1478,6 @@ <object class="IBActionConnection" key="connection"> <string key="label">commandDispatch:</string> <reference key="source" ref="1014"/> - <reference key="destination" ref="854840957"/> - </object> - <int key="connectionID">548</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">commandDispatch:</string> - <reference key="source" ref="1014"/> <reference key="destination" ref="64100325"/> </object> <int key="connectionID">549</int> @@ -1590,6 +1564,14 @@ </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> + <string key="label">commandDispatch:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="52470633"/> + </object> + <int key="connectionID">624</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> <string key="label">orderFrontStandardAboutPanel:</string> <reference key="source" ref="168151378"/> <reference key="destination" ref="238522557"/> @@ -1951,13 +1933,13 @@ <reference ref="632727374"/> <reference ref="646227648"/> <reference ref="609285721"/> - <reference ref="481834944"/> <reference ref="304266470"/> <reference ref="1046388886"/> <reference ref="1056857174"/> <reference ref="342932134"/> - <reference ref="52470633"/> <reference ref="446911629"/> + <reference ref="481834944"/> + <reference ref="52470633"/> </object> <reference key="parent" ref="694149608"/> </object> @@ -1992,11 +1974,6 @@ <reference key="parent" ref="110575045"/> </object> <object class="IBObjectRecord"> - <int key="objectID">143</int> - <reference key="object" ref="481834944"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">236</int> <reference key="object" ref="304266470"/> <reference key="parent" ref="110575045"/> @@ -2268,11 +2245,6 @@ <reference key="parent" ref="1049"/> </object> <object class="IBObjectRecord"> - <int key="objectID">491</int> - <reference key="object" ref="52470633"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">492</int> <reference key="object" ref="446911629"/> <reference key="parent" ref="110575045"/> @@ -2361,8 +2333,6 @@ <reference ref="792145602"/> <reference ref="64100325"/> <reference ref="517951834"/> - <reference ref="761864546"/> - <reference ref="854840957"/> </object> <reference key="parent" ref="445514911"/> </object> @@ -2427,16 +2397,6 @@ <reference key="parent" ref="436720301"/> </object> <object class="IBObjectRecord"> - <int key="objectID">546</int> - <reference key="object" ref="761864546"/> - <reference key="parent" ref="436720301"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">547</int> - <reference key="object" ref="854840957"/> - <reference key="parent" ref="436720301"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">550</int> <reference key="object" ref="238061183"/> <reference key="parent" ref="835318025"/> @@ -2446,6 +2406,16 @@ <reference key="object" ref="710833675"/> <reference key="parent" ref="835318025"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">143</int> + <reference key="object" ref="481834944"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">491</int> + <reference key="object" ref="52470633"/> + <reference key="parent" ref="110575045"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -2641,8 +2611,6 @@ <string>541.IBPluginDependency</string> <string>544.IBPluginDependency</string> <string>545.IBPluginDependency</string> - <string>546.IBPluginDependency</string> - <string>547.IBPluginDependency</string> <string>550.IBPluginDependency</string> <string>551.IBPluginDependency</string> <string>56.IBPluginDependency</string> @@ -2745,7 +2713,7 @@ <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> - <string>{{603, 458}, {243, 263}}</string> + <string>{{687, 801}, {243, 263}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{197, 734}, {243, 243}}</string> @@ -2855,9 +2823,7 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{697, 568}, {230, 153}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{781, 941}, {188, 123}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -2875,7 +2841,7 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> - <string>{{467, 508}, {244, 213}}</string> + <string>{{551, 851}, {244, 213}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{23, 794}, {245, 183}}</string> @@ -2927,7 +2893,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">623</int> + <int key="maxID">624</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 1016bcf1..32afd0b 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -14,6 +14,7 @@ #include "chrome/browser/browser_shutdown.h" #import "chrome/browser/cocoa/about_window_controller.h" #import "chrome/browser/cocoa/bookmark_menu_bridge.h" +#import "chrome/browser/cocoa/clear_browsing_data_controller.h" #import "chrome/browser/cocoa/encoding_menu_controller_delegate_mac.h" #import "chrome/browser/cocoa/menu_localizer.h" #import "chrome/browser/cocoa/preferences_window_controller.h" @@ -289,21 +290,28 @@ // command is supported and doesn't check, otherwise it would have been disabled // in the UI in validateUserInterfaceItem:. - (void)commandDispatch:(id)sender { - Profile* default_profile = [self defaultProfile]; + Profile* defaultProfile = [self defaultProfile]; NSInteger tag = [sender tag]; switch (tag) { case IDC_NEW_WINDOW: - Browser::OpenEmptyWindow(default_profile); + Browser::OpenEmptyWindow(defaultProfile); break; case IDC_NEW_INCOGNITO_WINDOW: - Browser::OpenURLOffTheRecord(default_profile, GURL()); + Browser::OpenURLOffTheRecord(defaultProfile, GURL()); break; case IDC_OPEN_FILE: - Browser::OpenEmptyWindow(default_profile); + Browser::OpenEmptyWindow(defaultProfile); BrowserList::GetLastActive()-> ExecuteCommandWithDisposition(IDC_OPEN_FILE, CURRENT_TAB); break; + case IDC_CLEAR_BROWSING_DATA: + // There may not be a browser open, so use the default profile. + scoped_nsobject<ClearBrowsingDataController> controller( + [[ClearBrowsingDataController alloc] + initWithProfile:defaultProfile]); + [controller runModalDialog]; + break; }; } @@ -330,6 +338,7 @@ menuState_->UpdateCommandEnabled(IDC_NEW_WINDOW, true); menuState_->UpdateCommandEnabled(IDC_NEW_INCOGNITO_WINDOW, true); menuState_->UpdateCommandEnabled(IDC_OPEN_FILE, true); + menuState_->UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, true); // TODO(pinkerton): ...more to come... } diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index ca94066..bdb7fca 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1135,12 +1135,10 @@ void Browser::OpenPasswordManager() { } #endif -#if defined(OS_WIN) || defined(OS_LINUX) void Browser::OpenImportSettingsDialog() { UserMetrics::RecordAction(L"Import_ShowDlg", profile_); window_->ShowImportDialog(); } -#endif void Browser::OpenAboutChromeDialog() { UserMetrics::RecordAction(L"AboutChrome", profile_); @@ -1359,10 +1357,8 @@ void Browser::ExecuteCommandWithDisposition( case IDC_EDIT_SEARCH_ENGINES: OpenKeywordEditor(); break; case IDC_VIEW_PASSWORDS: OpenPasswordManager(); break; #endif -#if defined(OS_WIN) || defined(OS_LINUX) case IDC_CLEAR_BROWSING_DATA: OpenClearBrowsingDataDialog(); break; case IDC_IMPORT_SETTINGS: OpenImportSettingsDialog(); break; -#endif case IDC_ABOUT: OpenAboutChromeDialog(); break; case IDC_HELP_PAGE: OpenHelpTab(); break; diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index ad74df5..bb1c136 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -376,9 +376,7 @@ class Browser : public TabStripModelDelegate, void OpenKeywordEditor(); void OpenPasswordManager(); #endif -#if defined(OS_WIN) || defined(OS_LINUX) void OpenImportSettingsDialog(); -#endif void OpenAboutChromeDialog(); void OpenHelpTab(); diff --git a/chrome/browser/cocoa/browser_window_cocoa.mm b/chrome/browser/cocoa/browser_window_cocoa.mm index 447d42c..429c0be 100644 --- a/chrome/browser/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/cocoa/browser_window_cocoa.mm @@ -7,7 +7,8 @@ #include "base/sys_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_utils.h" #include "chrome/browser/cocoa/browser_window_cocoa.h" -#include "chrome/browser/cocoa/browser_window_controller.h" +#import "chrome/browser/cocoa/browser_window_controller.h" +#import "chrome/browser/cocoa/clear_browsing_data_controller.h" #include "chrome/browser/browser.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" @@ -186,7 +187,10 @@ void BrowserWindowCocoa::ShowReportBugDialog() { } void BrowserWindowCocoa::ShowClearBrowsingDataDialog() { - NOTIMPLEMENTED(); + scoped_nsobject<ClearBrowsingDataController> controller( + [[ClearBrowsingDataController alloc] + initWithProfile:browser_->profile()]); + [controller runModalDialog]; } void BrowserWindowCocoa::ShowImportDialog() { diff --git a/chrome/browser/cocoa/clear_browsing_data_controller.h b/chrome/browser/cocoa/clear_browsing_data_controller.h new file mode 100644 index 0000000..78ef39c --- /dev/null +++ b/chrome/browser/cocoa/clear_browsing_data_controller.h @@ -0,0 +1,67 @@ +// Copyright (c) 2009 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. + +#ifndef CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ +#define CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ + +#import <Cocoa/Cocoa.h> + +#include "base/scoped_ptr.h" + +class BrowsingDataRemover; +class ClearBrowsingObserver; +class Profile; +@class ThrobberView; + +// A window controller for managing the "Clear Browsing Data" feature. Modally +// presents a dialog offering the user a set of choices of what browsing data +// to delete and does so if the user chooses. + +@interface ClearBrowsingDataController : NSWindowController { + @private + Profile* profile_; // Weak, owned by browser. + // If non-null means there is a removal in progress. Member used mainly for + // automated tests. The remove deletes itself when it's done, so this is a + // weak reference. + BrowsingDataRemover* remover_; + scoped_ptr<ClearBrowsingObserver> observer_; + BOOL isClearing_; // YES while clearing data is ongoing. + IBOutlet ThrobberView* progress_; + + // Values for checkboxes, kept in sync with bindings. These values get + // persisted into prefs if the user accepts the dialog. + BOOL clearBrowsingHistory_; + BOOL clearDownloadHistory_; + BOOL emptyCache_; + BOOL deleteCookies_; + BOOL clearSavedPasswords_; + BOOL clearFormData_; + NSInteger timePeriod_; +} + +// Create the controller with the given profile (which must not be NULL). +- (id)initWithProfile:(Profile*)profile; + +// Run the dialog with an application-modal event loop. If the user accepts, +// performs the deletion of the selected browsing data. The values of the +// checkboxes will be persisted into prefs for next time. +- (void)runModalDialog; + +// IBActions for the dialog buttons +- (IBAction)clearData:(id)sender; +- (IBAction)cancel:(id)sender; + +// Properties for bindings +@property BOOL clearBrowsingHistory; +@property BOOL clearDownloadHistory; +@property BOOL emptyCache; +@property BOOL deleteCookies; +@property BOOL clearSavedPasswords; +@property BOOL clearFormData; +@property NSInteger timePeriod; +@property BOOL isClearing; + +@end + +#endif // CHROME_BROWSER_COCOA_CLEAR_BROWSING_DATA_CONTROLLER_ diff --git a/chrome/browser/cocoa/clear_browsing_data_controller.mm b/chrome/browser/cocoa/clear_browsing_data_controller.mm new file mode 100644 index 0000000..f8ca39a --- /dev/null +++ b/chrome/browser/cocoa/clear_browsing_data_controller.mm @@ -0,0 +1,157 @@ +// Copyright (c) 2009 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. + +#import "chrome/browser/cocoa/clear_browsing_data_controller.h" + +#include "base/mac_util.h" +#include "base/scoped_nsobject.h" +#include "chrome/browser/browsing_data_remover.h" +#include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" +#include "chrome/browser/profile.h" + +@interface ClearBrowsingDataController(Private) +- (void)initFromPrefs; +- (void)persistToPrefs; +- (void)dataRemoverDidFinish; +@end + +class ClearBrowsingObserver : public BrowsingDataRemover::Observer { + public: + ClearBrowsingObserver(ClearBrowsingDataController* controller) + : controller_(controller) { } + void OnBrowsingDataRemoverDone() { [controller_ dataRemoverDidFinish]; } + private: + ClearBrowsingDataController* controller_; +}; + +@implementation ClearBrowsingDataController + +@synthesize clearBrowsingHistory = clearBrowsingHistory_; +@synthesize clearDownloadHistory = clearDownloadHistory_; +@synthesize emptyCache = emptyCache_; +@synthesize deleteCookies = deleteCookies_; +@synthesize clearSavedPasswords = clearSavedPasswords_; +@synthesize clearFormData = clearFormData_; +@synthesize timePeriod = timePeriod_; +@synthesize isClearing = isClearing_; + + +- (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:@"ClearBrowsingData" + ofType:@"nib"]; + if ((self = [super initWithWindowNibPath:nibpath owner:self])) { + profile_ = profile; + observer_.reset(new ClearBrowsingObserver(self)); + [self initFromPrefs]; + } + return self; +} + +- (void)dealloc { + if (remover_) { + // We were destroyed while clearing history was in progress. This can only + // occur during automated tests (normally the user can't close the dialog + // while clearing is in progress as the dialog is modal and not closeable). + remover_->RemoveObserver(observer_.get()); + } + [super dealloc]; +} + +// Called when outlets are available. Set the throbber icon. +- (void)awakeFromNib { + NSString *imagePath = [mac_util::MainAppBundle() + pathForResource:@"throbber" + ofType:@"png"]; + scoped_nsobject<NSImage> throbberImage( + [[NSImage alloc] initWithContentsOfFile:imagePath]); + [progress_ setImage:throbberImage]; +} + +// Run application modal. +- (void)runModalDialog { + [[NSApplication sharedApplication] runModalForWindow:[self window]]; +} + +// Called when the user clicks the "clear" button. Do the work and persist +// the prefs for next time. We don't stop the modal session until we get +// the callback from the BrowsingDataRemover so the window stays on the screen. +// While we're working, dim the buttons so the user can't click them. +- (IBAction)clearData:(id)sender { + // Set that we're working so that the buttons disable. + [self setIsClearing:YES]; + + [self persistToPrefs]; + + int removeMask = 0L; + if (clearBrowsingHistory_) + removeMask |= BrowsingDataRemover::REMOVE_HISTORY; + if (clearDownloadHistory_) + removeMask |= BrowsingDataRemover::REMOVE_DOWNLOADS; + if (emptyCache_) + removeMask |= BrowsingDataRemover::REMOVE_CACHE; + if (deleteCookies_) + removeMask |= BrowsingDataRemover::REMOVE_COOKIES; + if (clearSavedPasswords_) + removeMask |= BrowsingDataRemover::REMOVE_PASSWORDS; + if (clearFormData_) + removeMask |= BrowsingDataRemover::REMOVE_PASSWORDS; + + // BrowsingDataRemover deletes itself when done. + remover_ = new BrowsingDataRemover(profile_, + static_cast<BrowsingDataRemover::TimePeriod>(timePeriod_), + base::Time()); + remover_->AddObserver(observer_.get()); + remover_->Remove(removeMask); +} + +// Called when the user clicks the cancel button. All we need to do is stop +// the modal session. +- (IBAction)cancel:(id)sender { + [[NSApplication sharedApplication] stopModal]; + [[self window] orderOut:self]; +} + +// Initialize the bools from prefs using the setters to be KVO-compliant. +- (void)initFromPrefs { + PrefService* prefs = profile_->GetPrefs(); + [self setClearBrowsingHistory: + prefs->GetBoolean(prefs::kDeleteBrowsingHistory)]; + [self setClearDownloadHistory: + prefs->GetBoolean(prefs::kDeleteDownloadHistory)]; + [self setEmptyCache:prefs->GetBoolean(prefs::kDeleteCache)]; + [self setDeleteCookies:prefs->GetBoolean(prefs::kDeleteCookies)]; + [self setClearSavedPasswords:prefs->GetBoolean(prefs::kDeletePasswords)]; + [self setClearFormData:prefs->GetBoolean(prefs::kDeleteFormData)]; + [self setTimePeriod:prefs->GetInteger(prefs::kDeleteTimePeriod)]; +} + +// Save the checkbox values to the preferences. +- (void)persistToPrefs { + PrefService* prefs = profile_->GetPrefs(); + prefs->SetBoolean(prefs::kDeleteBrowsingHistory, + [self clearBrowsingHistory]); + prefs->SetBoolean(prefs::kDeleteDownloadHistory, + [self clearDownloadHistory]); + prefs->SetBoolean(prefs::kDeleteCache, [self emptyCache]); + prefs->SetBoolean(prefs::kDeleteCookies, [self deleteCookies]); + prefs->SetBoolean(prefs::kDeletePasswords, [self clearSavedPasswords]); + prefs->SetBoolean(prefs::kDeleteFormData, [self clearFormData]); + prefs->SetInteger(prefs::kDeleteTimePeriod, [self timePeriod]); +} + +// Called when the data remover object is done with its work. Close the window. +// The remover will delete itself. End the modal session at this point. +- (void)dataRemoverDidFinish { + [[NSApplication sharedApplication] stopModal]; + [[self window] orderOut:self]; + [self setIsClearing:NO]; + remover_ = NULL; +} + +@end diff --git a/chrome/browser/cocoa/throbber_view.h b/chrome/browser/cocoa/throbber_view.h index 00f83ed..e0b06ba 100644 --- a/chrome/browser/cocoa/throbber_view.h +++ b/chrome/browser/cocoa/throbber_view.h @@ -32,6 +32,10 @@ // the width. Takes ownership of |image|. - (id)initWithFrame:(NSRect)frame image:(NSImage*)image; +// Allows changing the image once the view has been created, such as when the +// view is loaded from a nib. The same restrictions as above apply. +- (void)setImage:(NSImage*)image; + @end #endif // CHROME_BROWSER_COCOA_THROBBER_VIEW_H_ diff --git a/chrome/browser/cocoa/throbber_view.mm b/chrome/browser/cocoa/throbber_view.mm index 26f8ec5..2f9b491 100644 --- a/chrome/browser/cocoa/throbber_view.mm +++ b/chrome/browser/cocoa/throbber_view.mm @@ -39,48 +39,7 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows - (id)initWithFrame:(NSRect)frame image:(NSImage*)image { if ((self = [super initWithFrame:frame])) { - // Ensure that the height divides evenly into the width. Cache the - // number of frames in the animation for later. - NSSize imageSize = [image size]; - DCHECK(imageSize.height && imageSize.width); - if (!imageSize.height) - return nil; - DCHECK((int)imageSize.width % (int)imageSize.height == 0); - numFrames_ = (int)imageSize.width / (int)imageSize.height; - DCHECK(numFrames_); - - // First check if we have a bitmap image rep and use it, otherwise fall - // back to creating one. - NSBitmapImageRep* rep = [[image representations] objectAtIndex:0]; - if (![rep isKindOfClass:[NSBitmapImageRep class]]) { - [image lockFocus]; - NSRect imageRect = NSMakeRect(0, 0, imageSize.width, imageSize.height); - rep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect:imageRect] - autorelease]; - [image unlockFocus]; - } - image_.reset([[CIImage alloc] initWithBitmapImageRep:rep]); - -#if 0 -// TODO(pinkerton): The invalidation of the view to trigger re-draw causes -// the entire title-bar to redraw (you can see it with QuartzDebug). For some -// reason, setting isOpaque on this view, or any of its parent views, doesn't -// help. As a result, enabling this timer causes new tab to take a very long -// time on a loaded machine, crushing our perf bot when it's under load. For -// now, I'm disabling the timer so we draw the first frame of the animation, -// but nothing more. There are a couple of ways we can fix this: -// 1) Try to figure out why the invalidate is invalidating the entire title bar -// 2) Find some way to draw only the pixels we want and nothing else, but I -// don't know how we'd do that. - // Start a timer for the animation frames. - target_.reset([[TimerTarget alloc] initWithThrobber:self]); - timer_ = - [NSTimer scheduledTimerWithTimeInterval:kAnimationIntervalSeconds - target:target_.get() - selector:@selector(animate:) - userInfo:nil - repeats:YES]; -#endif + [self setImage:image]; } return self; } @@ -116,4 +75,60 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows fraction:1.0]; } +// Stores the internal representation of the image from |image|. We use +// CoreImage for speed (though this doesn't seem to help perf issues). We +// validate that the image is of the appropriate ratio. If the image has more +// than one frame, restarts the timer. +- (void)setImage:(NSImage*)image { + // Reset the animation counter so there's no chance we are off the end. + animationFrame_ = 0; + [timer_ invalidate]; + timer_ = nil; + + // Ensure that the height divides evenly into the width. Cache the + // number of frames in the animation for later. + NSSize imageSize = [image size]; + DCHECK(imageSize.height && imageSize.width); + if (!imageSize.height) + return; + DCHECK((int)imageSize.width % (int)imageSize.height == 0); + numFrames_ = (int)imageSize.width / (int)imageSize.height; + DCHECK(numFrames_); + + // First check if we have a bitmap image rep and use it, otherwise fall + // back to creating one. + NSBitmapImageRep* rep = [[image representations] objectAtIndex:0]; + if (![rep isKindOfClass:[NSBitmapImageRep class]]) { + [image lockFocus]; + NSRect imageRect = NSMakeRect(0, 0, imageSize.width, imageSize.height); + rep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect:imageRect] + autorelease]; + [image unlockFocus]; + } + image_.reset([[CIImage alloc] initWithBitmapImageRep:rep]); + +#if 0 +// TODO(pinkerton): The invalidation of the view to trigger re-draw causes +// the entire title-bar to redraw (you can see it with QuartzDebug). For some +// reason, setting isOpaque on this view, or any of its parent views, doesn't +// help. As a result, enabling this timer causes new tab to take a very long +// time on a loaded machine, crushing our perf bot when it's under load. For +// now, I'm disabling the timer so we draw the first frame of the animation, +// but nothing more. There are a couple of ways we can fix this: +// 1) Try to figure out why the invalidate is invalidating the entire title bar +// 2) Find some way to draw only the pixels we want and nothing else, but I +// don't know how we'd do that. + if (numFrames_ > 1) { + // Start a timer for the animation frames. + target_.reset([[TimerTarget alloc] initWithThrobber:self]); + timer_ = + [NSTimer scheduledTimerWithTimeInterval:kAnimationIntervalSeconds + target:target_.get() + selector:@selector(animate:) + userInfo:nil + repeats:YES]; + } +#endif +} + @end diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 883ce43..957c79a 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -672,6 +672,8 @@ 'browser/cocoa/browser_window_cocoa.mm', 'browser/cocoa/browser_window_controller.h', 'browser/cocoa/browser_window_controller.mm', + 'browser/cocoa/clear_browsing_data_controller.h', + 'browser/cocoa/clear_browsing_data_controller.mm', 'browser/cocoa/cocoa_test_helper.h', 'browser/cocoa/command_observer_bridge.h', 'browser/cocoa/command_observer_bridge.mm', @@ -2107,6 +2109,7 @@ # them. 'app/nibs/en.lproj/About.xib', 'app/nibs/en.lproj/BrowserWindow.xib', + 'app/nibs/en.lproj/ClearBrowsingData.xib', 'app/nibs/en.lproj/FindBar.xib', 'app/nibs/en.lproj/FirstRunDialog.xib', 'app/nibs/en.lproj/MainMenu.xib', @@ -2875,8 +2878,11 @@ 'browser/download/save_page_uitest.cc', 'browser/login_prompt_uitest.cc', 'browser/metrics/metrics_service_uitest.cc', + # leaves an extra window on screen after test completes. 'browser/sessions/session_restore_uitest.cc', + # hangs indefinitely but doesn't crash. 'browser/tab_restore_uitest.cc', + # puts up modal dialogs. 'browser/unload_uitest.cc', 'test/reliability/page_load_test.cc', 'test/ui/layout_plugin_uitest.cc', |