summaryrefslogtreecommitdiffstats
path: root/webkit/glue/context_menu_client_impl.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-23 18:49:52 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-23 18:49:52 +0000
commit6aa376b2bfe85c851edca7fc04a05960bc419051 (patch)
tree3db99be45acc2670857a2d0555eb239a06312c57 /webkit/glue/context_menu_client_impl.cc
parent3c0d854087dfc385de5c63875cc1f37ce28fb8de (diff)
downloadchromium_src-6aa376b2bfe85c851edca7fc04a05960bc419051.zip
chromium_src-6aa376b2bfe85c851edca7fc04a05960bc419051.tar.gz
chromium_src-6aa376b2bfe85c851edca7fc04a05960bc419051.tar.bz2
This CL enables the Page info menu when right-clicking on a page/frame.
For the frame case, the SSL info had to be added to the show menu message (as the navigation entry contains the top frame SSL info). BUG=2467 TEST=Open a page over HTTPS with multiple frames. Right-click and select shot page info. Review URL: http://codereview.chromium.org/4034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/context_menu_client_impl.cc')
-rw-r--r--webkit/glue/context_menu_client_impl.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc
index 58f2e78..824ccf1 100644
--- a/webkit/glue/context_menu_client_impl.cc
+++ b/webkit/glue/context_menu_client_impl.cc
@@ -140,12 +140,10 @@ WebCore::PlatformMenuDescription
// Links, Images and Image-Links take preference over all else.
WebCore::KURL link_url = r.absoluteLinkURL();
- std::wstring link_url_string;
if (!link_url.isEmpty()) {
type = ContextNode::LINK;
}
WebCore::KURL image_url = r.absoluteImageURL();
- std::wstring image_url_string;
if (!image_url.isEmpty()) {
type = ContextNode::IMAGE;
}
@@ -158,6 +156,7 @@ WebCore::PlatformMenuDescription
std::wstring misspelled_word_string;
GURL frame_url;
GURL page_url;
+ std::string security_info;
std::wstring frame_encoding;
// Send the frame and page URLs in any case.
@@ -194,6 +193,17 @@ WebCore::PlatformMenuDescription
}
}
+ // Now retrieve the security info.
+ WebCore::DocumentLoader* dl = selected_frame->loader()->documentLoader();
+ if (dl) {
+ WebDataSource* ds = static_cast<WebDocumentLoaderImpl*>(dl)->
+ GetDataSource();
+ if (ds) {
+ const WebResponse& response = ds->GetResponse();
+ security_info = response.GetSecurityInfo();
+ }
+ }
+
int edit_flags = ContextNode::CAN_DO_NONE;
if (webview_->GetFocusedWebCoreFrame()->editor()->canUndo())
edit_flags |= ContextNode::CAN_UNDO;
@@ -222,7 +232,8 @@ WebCore::PlatformMenuDescription
frame_url,
selection_text_string,
misspelled_word_string,
- edit_flags);
+ edit_flags,
+ security_info);
}
return NULL;
}