diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 00:22:57 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 00:22:57 +0000 |
commit | 21449b3dc0ac325ab90bc1418bab8a7dda947f3e (patch) | |
tree | 2168f112369b027ed11f8c41d80b92ec7abe3b3a /chrome/browser/autocomplete | |
parent | 65137ae3ba7912decf0a953721ad35e074195fe9 (diff) | |
download | chromium_src-21449b3dc0ac325ab90bc1418bab8a7dda947f3e.zip chromium_src-21449b3dc0ac325ab90bc1418bab8a7dda947f3e.tar.gz chromium_src-21449b3dc0ac325ab90bc1418bab8a7dda947f3e.tar.bz2 |
Revert 29827 - Refactor securityicon code to a more general form, also more consistent with
the Windows implementation, in preparation for implementing page actions.
BUG=14899, 22922, 12281
TEST=unit tests included
Review URL: http://codereview.chromium.org/264037
TBR=pamg@google.com
Review URL: http://codereview.chromium.org/333002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.h | 1 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h index f43f218..51bb40e 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h @@ -96,6 +96,7 @@ class AutocompleteEditViewMac : public AutocompleteEditView, virtual bool CanPasteAndGo(); virtual int GetPasteActionStringId(); virtual void OnPasteAndGo(); + virtual void OnSecurityIconClicked(); virtual void OnFrameChanged(); // Helper functions for use from AutocompleteEditHelper Objective-C diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index 8ac115e..0fe9e1e 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()); |