diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 16:30:50 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 16:30:50 +0000 |
commit | 2903f3b113ecdc3fa64076c4d31a78f79e6fe2e6 (patch) | |
tree | 5186019b43d30eadb760d6a6581db3b4bad0a4d9 /webkit/glue/context_menu_client_impl.cc | |
parent | 98506935a9ca52b1b083c0b3c08088becb52439e (diff) | |
download | chromium_src-2903f3b113ecdc3fa64076c4d31a78f79e6fe2e6.zip chromium_src-2903f3b113ecdc3fa64076c4d31a78f79e6fe2e6.tar.gz chromium_src-2903f3b113ecdc3fa64076c4d31a78f79e6fe2e6.tar.bz2 |
Merge WebDocumentLoaderImpl into WebDataSourceImpl. They are peers, and it is
really silly to have them be separate classes.
I chose to eliminate WebDocumentLoaderImpl in favor of WebDataSourceImpl since
the interface that the outside world sees is named WebDataSource.
R=dglazkov
Review URL: http://codereview.chromium.org/46028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/context_menu_client_impl.cc')
-rw-r--r-- | webkit/glue/context_menu_client_impl.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc index 64222c2..65089c9 100644 --- a/webkit/glue/context_menu_client_impl.cc +++ b/webkit/glue/context_menu_client_impl.cc @@ -25,7 +25,7 @@ MSVC_POP_WARNING(); #include "base/string_util.h" #include "webkit/glue/context_menu.h" #include "webkit/glue/glue_util.h" -#include "webkit/glue/webdocumentloader_impl.h" +#include "webkit/glue/webdatasource_impl.h" #include "webkit/glue/webresponse.h" #include "webkit/glue/weburlrequest_impl.h" #include "webkit/glue/webview_impl.h" @@ -124,8 +124,7 @@ static ContextNode GetTypeAndURLFromFrame(WebCore::Frame* frame, if (frame) { WebCore::DocumentLoader* dl = frame->loader()->documentLoader(); if (dl) { - WebDataSource* ds = static_cast<WebDocumentLoaderImpl*>(dl)-> - GetDataSource(); + WebDataSource* ds = WebDataSourceImpl::FromLoader(dl); if (ds) { node = page_node; *url = ds->HasUnreachableURL() ? ds->GetUnreachableURL() @@ -214,13 +213,10 @@ 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(); - } + WebDataSource* ds = WebDataSourceImpl::FromLoader(dl); + if (ds) { + const WebResponse& response = ds->GetResponse(); + security_info = response.GetSecurityInfo(); } int edit_flags = ContextNode::CAN_DO_NONE; |