summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-28 20:04:22 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-28 20:04:22 +0000
commitbb8fe2d11ed91844f93d804aa86d4242d0b264c7 (patch)
tree6f55e5d2bde671f3a2074e008e280a4a148c5183
parentbeeb134984c5dd8cae93de8fc135384789c253ad (diff)
downloadchromium_src-bb8fe2d11ed91844f93d804aa86d4242d0b264c7.zip
chromium_src-bb8fe2d11ed91844f93d804aa86d4242d0b264c7.tar.gz
chromium_src-bb8fe2d11ed91844f93d804aa86d4242d0b264c7.tar.bz2
AutoFill Help Link added on Mac
Adds a link to http://www.google.com/support/chrome/bin/answer.py?answer=142893 on the AutoFill settings dialog. Nib changes: Adds button with link cell connected to |openHelp:| action. BUG=42780 TEST=manual, open dialog and click help button. Review URL: http://codereview.chromium.org/2825027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51032 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/app/nibs/AutoFillDialog.xib86
-rw-r--r--chrome/browser/autofill/autofill_dialog_controller_mac.h6
-rw-r--r--chrome/browser/autofill/autofill_dialog_controller_mac.mm11
-rw-r--r--chrome/browser/browser.cc6
-rw-r--r--chrome/browser/browser.h1
6 files changed, 91 insertions, 25 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index a811b7e..614d080 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5850,6 +5850,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_AUTOFILL_DIALOG_SAVE" desc="The label of the Save button on the AutoFill dialog.">
Save
</message>
+ <message name="IDS_AUTOFILL_HELP_LABEL" desc="The label of the Help link on the AutoFill dialog.">
+ About AutoFill
+ </message>
+ <message name="IDS_AUTOFILL_HELP_URL" desc="The url of the Help link on the AutoFill dialog.">
+ http://www.google.com/support/chrome/bin/answer.py?answer=142893
+ </message>
<message name="IDS_THEMES_GROUP_NAME" desc="The title of the themes group">
Themes:
diff --git a/chrome/app/nibs/AutoFillDialog.xib b/chrome/app/nibs/AutoFillDialog.xib
index c0123a1..73d185a 100644
--- a/chrome/app/nibs/AutoFillDialog.xib
+++ b/chrome/app/nibs/AutoFillDialog.xib
@@ -2,7 +2,7 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10D575</string>
+ <string key="IBDocument.SystemVersion">10D2063a</string>
<string key="IBDocument.InterfaceBuilderVersion">762</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="171"/>
+ <integer value="193"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -424,6 +424,26 @@
<int key="NSPeriodicInterval">25</int>
</object>
</object>
+ <object class="NSButton" id="589427956">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{20, 15}, {188, 25}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="330857297">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">^IDS_AUTOFILL_HELP_LABEL</string>
+ <reference key="NSSupport" ref="47060168"/>
+ <reference key="NSControlView" ref="589427956"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">134</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{570, 401}</string>
<reference key="NSSuperview"/>
@@ -601,6 +621,14 @@
</object>
<int key="connectionID">192</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">openHelp:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="589427956"/>
+ </object>
+ <int key="connectionID">195</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -651,6 +679,7 @@
<reference ref="457244217"/>
<reference ref="112783515"/>
<reference ref="1017685297"/>
+ <reference ref="589427956"/>
</object>
<reference key="parent" ref="1005"/>
</object>
@@ -842,6 +871,20 @@
<reference key="object" ref="767084548"/>
<reference key="parent" ref="589623181"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">193</int>
+ <reference key="object" ref="589427956"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="330857297"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">194</int>
+ <reference key="object" ref="330857297"/>
+ <reference key="parent" ref="589427956"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -875,6 +918,9 @@
<string>179.IBPluginDependency</string>
<string>183.IBPluginDependency</string>
<string>184.IBPluginDependency</string>
+ <string>193.IBPluginDependency</string>
+ <string>194.CustomClassName</string>
+ <string>194.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>3.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
@@ -918,6 +964,9 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>HyperlinkButtonCell</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>
@@ -947,7 +996,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">192</int>
+ <int key="maxID">196</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -964,6 +1013,7 @@
<string>cancel:</string>
<string>deleteSelection:</string>
<string>editSelection:</string>
+ <string>openHelp:</string>
<string>save:</string>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -974,6 +1024,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -1025,6 +1076,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">HyperlinkButtonCell</string>
+ <string key="superclassName">NSButtonCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">browser/cocoa/hyperlink_button_cell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
@@ -1627,27 +1686,6 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QuartzCore.framework/Headers/CIImageProvider.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">SecurityInterface.framework/Headers/SFAuthorizationView.h</string>
</object>
</object>
diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.h b/chrome/browser/autofill/autofill_dialog_controller_mac.h
index d7b50c3..34e40fa 100644
--- a/chrome/browser/autofill/autofill_dialog_controller_mac.h
+++ b/chrome/browser/autofill/autofill_dialog_controller_mac.h
@@ -119,11 +119,15 @@ class Profile;
// credit card list.
- (IBAction)deleteSelection:(id)sender;
-// IBActions for editing an item. |sender| is expected to be the "Edit..."
+// IBAction for editing an item. |sender| is expected to be the "Edit..."
// button. The editing acts on the selected item in either the address or
// credit card list.
- (IBAction)editSelection:(id)sender;
+// IBAction for opening the help link. |sender| is expected to be the
+// "About AutoFill" link.
+- (IBAction)openHelp:(id)sender;
+
// NSTableView data source methods.
- (id)tableView:(NSTableView *)tableView
objectValueForTableColumn:(NSTableColumn *)tableColumn
diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.mm b/chrome/browser/autofill/autofill_dialog_controller_mac.mm
index d39c456..72c301b 100644
--- a/chrome/browser/autofill/autofill_dialog_controller_mac.mm
+++ b/chrome/browser/autofill/autofill_dialog_controller_mac.mm
@@ -7,6 +7,8 @@
#include "app/resource_bundle.h"
#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
+#include "chrome/browser/browser.h"
+#include "chrome/browser/browser_list.h"
#import "chrome/browser/autofill/autofill_address_model_mac.h"
#import "chrome/browser/autofill/autofill_address_sheet_controller_mac.h"
#import "chrome/browser/autofill/autofill_credit_card_model_mac.h"
@@ -412,6 +414,15 @@ void PersonalDataManagerObserver::OnPersonalDataLoaded() {
}
}
+// Navigates to the AutoFill help url.
+- (IBAction)openHelp:(id)sender {
+ Browser* browser = BrowserList::GetLastActive();
+
+ if (!browser || !browser->GetSelectedTabContents())
+ browser = Browser::Create(profile_);
+ browser->OpenAutoFillHelpTabAndActivate();
+}
+
// Edit address sheet was dismissed. Non-zero |returnCode| indicates a save.
- (void)addressEditDidEnd:(NSWindow *)sheet
returnCode:(int)returnCode
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 753fc57..ea1549a 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1814,6 +1814,12 @@ void Browser::OpenThemeGalleryTabAndActivate() {
window_->Activate();
}
+void Browser::OpenAutoFillHelpTabAndActivate() {
+ OpenURL(GURL(l10n_util::GetStringUTF8(IDS_AUTOFILL_HELP_URL)),
+ GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
+ window_->Activate();
+}
+
#if defined(OS_CHROMEOS)
void Browser::OpenSystemOptionsDialog() {
UserMetrics::RecordAction(UserMetricsAction("OpenSystemOptionsDialog"),
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index e3add6e..4b34283 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -522,6 +522,7 @@ class Browser : public TabStripModelDelegate,
void OpenHelpTab();
// Used by the "Get themes" link in the options dialog.
void OpenThemeGalleryTabAndActivate();
+ void OpenAutoFillHelpTabAndActivate();
#if defined(OS_CHROMEOS)
void OpenSystemOptionsDialog();
void OpenInternetOptionsDialog();