diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-23 18:49:52 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-23 18:49:52 +0000 |
commit | 6aa376b2bfe85c851edca7fc04a05960bc419051 (patch) | |
tree | 3db99be45acc2670857a2d0555eb239a06312c57 /webkit | |
parent | 3c0d854087dfc385de5c63875cc1f37ce28fb8de (diff) | |
download | chromium_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')
-rw-r--r-- | webkit/glue/context_menu_client_impl.cc | 17 | ||||
-rw-r--r-- | webkit/glue/webframe.h | 3 | ||||
-rw-r--r-- | webkit/glue/webview_delegate.h | 3 |
3 files changed, 18 insertions, 5 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; } diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h index 30baa89..9e6f9c9 100644 --- a/webkit/glue/webframe.h +++ b/webkit/glue/webframe.h @@ -301,7 +301,8 @@ class WebFrame : public base::RefCounted<WebFrame> { // superset of those accepted by javascript:document.execCommand(). // This method is exposed in order to implement // javascript:layoutTestController.execCommand() - virtual bool ExecuteCoreCommandByName(const std::string& name, const std::string& value) = 0; + virtual bool ExecuteCoreCommandByName(const std::string& name, + const std::string& value) = 0; // Adds a message to the frame's console. virtual void AddMessageToConsole(const std::wstring& msg, diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h index 0b4b4fb..c05f478 100644 --- a/webkit/glue/webview_delegate.h +++ b/webkit/glue/webview_delegate.h @@ -543,7 +543,8 @@ class WebViewDelegate : virtual public WebWidgetDelegate { const GURL& frame_url, const std::wstring& selection_text, const std::wstring& misspelled_word, - int edit_flags) { + int edit_flags, + const std::string& security_info) { } // Starts a drag session with the supplied contextual information. |