summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 02:30:05 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 02:30:05 +0000
commit29193b9b0af28ed636ebad88d82f3e32466b3f76 (patch)
tree064e2e8ee3e001274f6f1975bedf3096b48e4b7f /chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
parent4b196999d76e86cf0f0b418cf260c2bfb41bc4de (diff)
downloadchromium_src-29193b9b0af28ed636ebad88d82f3e32466b3f76.zip
chromium_src-29193b9b0af28ed636ebad88d82f3e32466b3f76.tar.gz
chromium_src-29193b9b0af28ed636ebad88d82f3e32466b3f76.tar.bz2
[Mac] Show the page info window after clicking the security icon in the URL bar
BUG=22922 TEST=Go to https://twitter.com, click the lock icon, see page info window. Review URL: http://codereview.chromium.org/222020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_mac.mm')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_mac.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index 76fbe8a..c736c8f 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -16,8 +16,10 @@
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/autocomplete/autocomplete_popup_model.h"
#include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h"
+#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/cocoa/event_utils.h"
+#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
@@ -630,6 +632,16 @@ bool AutocompleteEditViewMac::CanPasteAndGo() {
model_->CanPasteAndGo(GetClipboardText(g_browser_process->clipboard()));
}
+void AutocompleteEditViewMac::OnSecurityIconClicked() {
+ TabContents* tab = BrowserList::GetLastActive()->GetSelectedTabContents();
+ NavigationEntry* nav_entry = tab->controller().GetActiveEntry();
+ if (!nav_entry) {
+ NOTREACHED();
+ return;
+ }
+ tab->ShowPageInfo(nav_entry->url(), nav_entry->ssl(), true);
+}
+
int AutocompleteEditViewMac::GetPasteActionStringId() {
DCHECK(CanPasteAndGo());