summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 21:08:35 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 21:08:35 +0000
commit71ed35fc7ef44f4279a2a65db0e638cc2cc440b9 (patch)
tree050b6d19c833784537c3fa1919afa2e514116511
parentf6d426fc52a90ad2dd55e1847aa7212a5bc918bf (diff)
downloadchromium_src-71ed35fc7ef44f4279a2a65db0e638cc2cc440b9.zip
chromium_src-71ed35fc7ef44f4279a2a65db0e638cc2cc440b9.tar.gz
chromium_src-71ed35fc7ef44f4279a2a65db0e638cc2cc440b9.tar.bz2
There are cases where a Frame may outlive its associated Page. Get the
WebViewImpl by accessing it indirectly through the Frame's Page so that we don't have to worry about cleaning up the WebFrameImpl -> WebViewImpl pointer. WebCore already clears the Frame's Page pointer when the Page is destroyed by the WebViewImpl. Patch by Marshall Greenblatt R=darin Review: http://codereview.chromium.org/99283 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15458 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webframe_impl.cc45
-rw-r--r--webkit/glue/webframe_impl.h7
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc75
-rw-r--r--webkit/glue/webplugin_impl.cc4
-rw-r--r--webkit/glue/webview_impl.cc2
-rw-r--r--webkit/glue/webworkerclient_impl.cc2
6 files changed, 72 insertions, 63 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 17857a7..a56f43f 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -142,6 +142,7 @@ MSVC_POP_WARNING();
#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "webkit/glue/alt_error_page_resource_fetcher.h"
+#include "webkit/glue/chrome_client_impl.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/dom_operations_private.h"
#include "webkit/glue/glue_serialize.h"
@@ -381,10 +382,8 @@ WebFrameImpl::~WebFrameImpl() {
// WebFrame -------------------------------------------------------------------
void WebFrameImpl::InitMainFrame(WebViewImpl* webview_impl) {
- webview_impl_ = webview_impl;
-
RefPtr<Frame> frame =
- Frame::create(webview_impl_->page(), 0, &frame_loader_client_);
+ Frame::create(webview_impl->page(), 0, &frame_loader_client_);
frame_ = frame.get();
// Add reference on behalf of FrameLoader. See comments in
@@ -477,7 +476,7 @@ void WebFrameImpl::InternalLoadRequest(const WebRequest* request,
current_item = HistoryItem::create();
current_item->setLastVisitWasFailure(true);
frame_->loader()->setCurrentHistoryItem(current_item);
- webview_impl_->SetCurrentHistoryItem(current_item.get());
+ GetWebViewImpl()->SetCurrentHistoryItem(current_item.get());
}
frame_->loader()->goToItem(request_impl->history_item().get(),
@@ -568,7 +567,7 @@ bool WebFrameImpl::GetPreviousHistoryState(std::string* history_state) const {
// only get saved to history when it becomes the previous item. The caller
// is expected to query the history state after a navigation occurs, after
// the desired history item has become the previous entry.
- RefPtr<HistoryItem> item = webview_impl_->GetPreviousHistoryItem();
+ RefPtr<HistoryItem> item = GetWebViewImpl()->GetPreviousHistoryItem();
if (!item)
return false;
@@ -769,7 +768,7 @@ bool WebFrameImpl::GetInViewSourceMode() const {
}
WebView* WebFrameImpl::GetView() const {
- return webview_impl_;
+ return GetWebViewImpl();
}
std::string WebFrameImpl::GetSecurityOrigin() const {
@@ -1010,6 +1009,7 @@ bool WebFrameImpl::Find(int request_id,
int WebFrameImpl::OrdinalOfFirstMatchForFrame(WebFrameImpl* frame) const {
int ordinal = 0;
+ WebViewImpl* web_view = GetWebViewImpl();
WebFrameImpl* const main_frame_impl =
static_cast<WebFrameImpl*>(GetView()->GetMainFrame());
// Iterate from the main frame up to (but not including) |frame| and
@@ -1017,7 +1017,7 @@ int WebFrameImpl::OrdinalOfFirstMatchForFrame(WebFrameImpl* frame) const {
for (WebFrameImpl* it = main_frame_impl;
it != frame;
it = static_cast<WebFrameImpl*>(
- webview_impl_->GetNextFrameAfter(it, true))) {
+ web_view->GetNextFrameAfter(it, true))) {
if (it->last_match_count_ > 0)
ordinal += it->last_match_count_;
}
@@ -1464,9 +1464,11 @@ void WebFrameImpl::CreateFrameView() {
frame_->setView(0);
+ WebViewImpl* web_view = GetWebViewImpl();
+
WebCore::FrameView* view;
if (is_main_frame) {
- IntSize size = webkit_glue::WebSizeToIntSize(webview_impl_->size());
+ IntSize size = webkit_glue::WebSizeToIntSize(web_view->size());
view = new FrameView(frame_, size);
} else {
view = new FrameView(frame_);
@@ -1474,7 +1476,7 @@ void WebFrameImpl::CreateFrameView() {
frame_->setView(view);
- if (webview_impl_->GetIsTransparent())
+ if (web_view->GetIsTransparent())
view->setTransparent(true);
// TODO(darin): The Mac code has a comment about this possibly being
@@ -1501,6 +1503,19 @@ WebFrameImpl* WebFrameImpl::FromFrame(WebCore::Frame* frame) {
frame->loader()->client())->webframe();
}
+WebViewImpl* WebFrameImpl::GetWebViewImpl() const {
+ if (!frame_ || !frame_->page())
+ return NULL;
+
+ // There are cases where a Frame may outlive its associated Page. Get the
+ // WebViewImpl by accessing it indirectly through the Frame's Page so that we
+ // don't have to worry about cleaning up the WebFrameImpl -> WebViewImpl
+ // pointer. WebCore already clears the Frame's Page pointer when the Page is
+ // destroyed by the WebViewImpl.
+ return static_cast<ChromeClientImpl*>(
+ frame_->page()->chrome()->client())->webview();
+}
+
// WebFrame --------------------------------------------------------------------
void WebFrameImpl::Layout() {
@@ -1580,7 +1595,6 @@ bool WebFrameImpl::IsLoading() {
void WebFrameImpl::Closing() {
alt_error_page_fetcher_.reset();
- webview_impl_ = NULL;
frame_ = NULL;
}
@@ -1609,14 +1623,14 @@ void WebFrameImpl::DidFail(const ResourceError& error, bool was_provisional) {
// Make sure we never show errors in view source mode.
SetInViewSourceMode(false);
- WebViewDelegate* delegate = webview_impl_->delegate();
+ WebViewImpl* web_view = GetWebViewImpl();
+ WebViewDelegate* delegate = web_view->delegate();
if (delegate) {
WebErrorImpl web_error(error);
if (was_provisional) {
- delegate->DidFailProvisionalLoadWithError(webview_impl_, web_error,
- this);
+ delegate->DidFailProvisionalLoadWithError(web_view, web_error, this);
} else {
- delegate->DidFailLoadWithError(webview_impl_, web_error, this);
+ delegate->DidFailLoadWithError(web_view, web_error, this);
}
}
}
@@ -1638,7 +1652,7 @@ void WebFrameImpl::LoadAlternateHTMLErrorPage(const WebRequest* request,
WebErrorImpl weberror_impl(error);
alt_error_page_fetcher_.reset(
- new AltErrorPageResourceFetcher(webview_impl_, weberror_impl, this,
+ new AltErrorPageResourceFetcher(GetWebViewImpl(), weberror_impl, this,
error_page_url));
}
@@ -1713,7 +1727,6 @@ PassRefPtr<Frame> WebFrameImpl::CreateChildFrame(
RefPtr<Frame> child_frame = Frame::create(
frame_->page(), owner_element, &webframe->frame_loader_client_);
webframe->frame_ = child_frame.get();
- webframe->webview_impl_ = webview_impl_;
child_frame->tree()->setName(request.frameName());
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index c3cbbb4..fe7e3ef 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -216,9 +216,7 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
static WebFrameImpl* FromFrame(WebCore::Frame* frame);
- WebViewImpl* webview_impl() const {
- return webview_impl_;
- }
+ WebViewImpl* GetWebViewImpl() const;
WebCore::FrameView* frameview() const {
return frame_ ? frame_->view() : NULL;
@@ -303,9 +301,6 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
// asynchronously in order to scope string matches during a find operation.
ScopedRunnableMethodFactory<WebFrameImpl> scope_matches_factory_;
- // This is a weak pointer to our containing WebViewImpl.
- WebViewImpl* webview_impl_;
-
// This is a weak pointer to our corresponding WebCore frame. A reference to
// ourselves is held while frame_ is valid. See our Closing method.
WebCore::Frame* frame_;
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index ca9963f..0ed8a39 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -101,14 +101,14 @@ void WebFrameLoaderClient::frameLoaderDestroyed() {
}
void WebFrameLoaderClient::windowObjectCleared() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->WindowObjectCleared(webframe_);
}
void WebFrameLoaderClient::documentElementAvailable() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DocumentElementAvailable(webframe_);
@@ -121,14 +121,14 @@ void WebFrameLoaderClient::registerForIconNotification(bool listen){
}
bool WebFrameLoaderClient::hasWebView() const {
- return webframe_->webview_impl() != NULL;
+ return webframe_->GetWebViewImpl() != NULL;
}
bool WebFrameLoaderClient::hasFrameView() const {
// The Mac port has this notion of a WebFrameView, which seems to be
// some wrapper around an NSView. Since our equivalent is HWND, I guess
// we have a "frameview" whenever we have the toplevel HWND.
- return webframe_->webview_impl() != NULL;
+ return webframe_->GetWebViewImpl() != NULL;
}
void WebFrameLoaderClient::makeDocumentView() {
@@ -171,7 +171,7 @@ void WebFrameLoaderClient::detachedFromParent3() {
void WebFrameLoaderClient::assignIdentifierToInitialRequest(
unsigned long identifier, DocumentLoader* loader,
const ResourceRequest& request) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d) {
WebRequestImpl webreq(request);
@@ -231,7 +231,7 @@ void WebFrameLoaderClient::dispatchWillSendRequest(
request.setMainDocumentURL(KURL("about:blank"));
// Give the delegate a crack at the request.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d) {
WebRequestImpl webreq(request);
@@ -339,7 +339,7 @@ void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader,
webframe_->frame(), loader, url));
}
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidFinishLoading(webview, identifier);
@@ -351,7 +351,7 @@ void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader,
}
GURL WebFrameLoaderClient::GetAlt404PageUrl(DocumentLoader* loader) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (!d)
return GURL();
@@ -384,7 +384,7 @@ void WebFrameLoaderClient::Alt404PageFinished(DocumentLoader* loader,
void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader,
unsigned long identifier,
const ResourceError& error) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
if (webview && webview->delegate()) {
webview->delegate()->DidFailLoadingWithError(webview, identifier,
WebErrorImpl(error));
@@ -396,7 +396,7 @@ void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader,
}
void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
DocumentLoader* documentLoader =
webframe_->frame()->loader()->activeDocumentLoader();
@@ -446,7 +446,7 @@ bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(
const ResourceRequest& request,
const ResourceResponse& response,
int length) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
bool result = false;
@@ -484,7 +484,7 @@ void WebFrameLoaderClient::dispatchDidHandleOnloadEvents() {
// LayoutTests/fast/dom/replaceChild.html
if (!webframe_->frame()->page())
return;
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidHandleOnloadEventsForFrame(webview, webframe_);
@@ -588,7 +588,7 @@ void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
ds->AppendRedirect(ds->GetRequest().GetURL());
// Dispatch callback
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidReceiveProvisionalLoadServerRedirect(webview, webframe_);
@@ -597,7 +597,7 @@ void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
// Called on both success and failure of a client redirect.
void WebFrameLoaderClient::dispatchDidCancelClientRedirect() {
// No longer expecting a client redirect.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview ? webview->delegate() : NULL;
if (d) {
expected_client_redirect_src_ = GURL();
@@ -615,7 +615,7 @@ void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url,
double fire_date) {
// Tells dispatchDidStartProvisionalLoad that if it sees this item it is a
// redirect and the source item should be added as the start of the chain.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview ? webview->delegate() : NULL;
if (d) {
expected_client_redirect_src_ = webframe_->GetURL();
@@ -645,7 +645,7 @@ void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url,
void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() {
// Anchor fragment navigations are not normal loads, so we need to synthesize
// some events for our delegate.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidStartLoading(webview);
@@ -703,7 +703,7 @@ void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() {
}
void WebFrameLoaderClient::dispatchWillClose() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
// Make sure WebViewImpl releases the references it uses to restore focus.
// If we didn't do this, WebViewImpl might try to restore focus to an invalid
// element.
@@ -714,7 +714,7 @@ void WebFrameLoaderClient::dispatchWillClose() {
}
void WebFrameLoaderClient::dispatchDidReceiveIcon() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidReceiveIconForFrame(webview, webframe_);
@@ -737,7 +737,7 @@ void WebFrameLoaderClient::dispatchDidStartProvisionalLoad() {
// any redirects yet.
DCHECK(ds->GetRedirectChain().empty());
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
// If this load is what we expected from a client redirect, treat it as a
// redirect from that original page. The expected redirect urls will be
@@ -798,7 +798,7 @@ NavigationGesture WebFrameLoaderClient::NavigationGestureForLastLoad() {
}
void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d) {
d->DidReceiveTitle(webview, webkit_glue::StringToStdWString(title),
@@ -809,7 +809,7 @@ void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title) {
void WebFrameLoaderClient::dispatchDidCommitLoad() {
webframe_->SelectAppCacheWithoutManifest();
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
bool is_new_navigation;
webview->DidCommitLoad(&is_new_navigation);
WebViewDelegate* d = webview->delegate();
@@ -854,7 +854,7 @@ void WebFrameLoaderClient::dispatchDidFinishLoad() {
webframe_->frame()->loader()->activeDocumentLoader();
WebDataSourceImpl* dataSource =
WebDataSourceImpl::FromLoader(documentLoader);
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
dataSource->set_finish_load_time(base::Time::Now());
if (d)
@@ -906,7 +906,7 @@ Frame* WebFrameLoaderClient::dispatchCreatePage() {
}
void WebFrameLoaderClient::dispatchShow() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->Show(webview, webview->window_open_disposition());
@@ -1005,7 +1005,7 @@ void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(
PassRefPtr<WebCore::FormState> form_state) {
PolicyAction policy_action = PolicyUse;
- WebViewImpl* wv = webframe_->webview_impl();
+ WebViewImpl* wv = webframe_->GetWebViewImpl();
WebViewDelegate* d = wv->delegate();
// It is valid for this function to be invoked in code paths where the
// the webview is closed.
@@ -1038,7 +1038,7 @@ void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(
GURL referrer = webkit_glue::StringToGURL(
request.httpHeaderField("Referer"));
- d->OpenURL(webframe_->webview_impl(),
+ d->OpenURL(webframe_->GetWebViewImpl(),
webkit_glue::KURLToGURL(request.url()),
referrer,
disposition);
@@ -1076,7 +1076,7 @@ void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function,
// Don't free the PasswordFormData, the datasource will do that.
ds->set_password_form_data(pass_data);
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
// Unless autocomplete=off, record what the user put in it for future
@@ -1115,9 +1115,10 @@ void WebFrameLoaderClient::setMainDocumentError(DocumentLoader*,
void WebFrameLoaderClient::postProgressStartedNotification() {
if (hasWebView()) {
- WebViewDelegate* d = webframe_->webview_impl()->delegate();
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
+ WebViewDelegate* d = web_view->delegate();
if (d)
- d->DidStartLoading(webframe_->webview_impl());
+ d->DidStartLoading(web_view);
}
}
@@ -1129,15 +1130,15 @@ void WebFrameLoaderClient::postProgressFinishedNotification() {
// TODO(ericroman): why might webframe_->webview_impl be null?
// http://b/1234461
if (hasWebView()) {
- WebViewDelegate* d = webframe_->webview_impl()->delegate();
-
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
+ WebViewDelegate* d = web_view->delegate();
if (d)
- d->DidStopLoading(webframe_->webview_impl());
+ d->DidStopLoading(web_view);
}
}
void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready) {
- WebViewImpl* web_view = webframe_->webview_impl();
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
if (!web_view)
return;
WebDevToolsAgentImpl* tools_agent = web_view->GetWebDevToolsAgentImpl();
@@ -1152,7 +1153,7 @@ void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready) {
// Creates a new connection and begins downloading from that (contrast this
// with |download|).
void WebFrameLoaderClient::startDownload(const ResourceRequest& request) {
- WebViewDelegate* d = webframe_->webview_impl()->delegate();
+ WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
if (d) {
const GURL url(webkit_glue::KURLToGURL(request.url()));
const GURL referrer(webkit_glue::StringToStdString(request.httpReferrer()));
@@ -1358,7 +1359,7 @@ void WebFrameLoaderClient::setTitle(const String& title, const KURL& url) {
//
// e.g.:
// WebHistoryItem* item =
- // webframe_->webview_impl()->GetBackForwardList()->GetCurrentItem();
+ // webframe_->GetWebViewImpl()->GetBackForwardList()->GetCurrentItem();
// WebHistoryItemImpl* item_impl = static_cast<WebHistoryItemImpl*>(item);
//
// item_impl->SetTitle(webkit_glue::StringToStdWString(title));
@@ -1441,7 +1442,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, // TODO(erikkay)
const Vector<String>& param_values,
const String& mime_type,
bool load_manually) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (!d)
return NULL;
@@ -1501,7 +1502,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, // TODO(erikkay)
std::string actual_mime_type;
WebPluginDelegate* plugin_delegate =
- d->CreatePluginDelegate(webframe_->webview_impl(), gurl, my_mime_type,
+ d->CreatePluginDelegate(webframe_->GetWebViewImpl(), gurl, my_mime_type,
combined_clsid, &actual_mime_type);
if (!plugin_delegate)
return NULL;
@@ -1637,7 +1638,7 @@ bool WebFrameLoaderClient::ActionSpecifiesDisposition(
}
NetAgentImpl* WebFrameLoaderClient::GetNetAgentImpl() {
- WebViewImpl* web_view = webframe_->webview_impl();
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
if (!web_view) {
return NULL;
}
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 306a9a9..a065e59 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -640,7 +640,7 @@ void WebPluginImpl::setFrameRect(const WebCore::IntRect& rect) {
// containing window. We ask our delegate to reposition us accordingly.
WebCore::Frame* frame = element_->document()->frame();
WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame);
- WebViewImpl* webview = webframe->webview_impl();
+ WebViewImpl* webview = webframe->GetWebViewImpl();
// It is valid for this function to be invoked in code paths where the
// the webview is closed.
if (!webview->delegate()) {
@@ -1325,7 +1325,7 @@ bool WebPluginImpl::ReinitializePluginForResponse(
if (!web_frame)
return false;
- WebViewImpl* web_view = web_frame->webview_impl();
+ WebViewImpl* web_view = web_frame->GetWebViewImpl();
if (!web_view)
return false;
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 7e41aa9..a5f4835 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -885,7 +885,7 @@ Frame* WebViewImpl::GetFocusedWebCoreFrame() {
// static
WebViewImpl* WebViewImpl::FromPage(WebCore::Page* page) {
- return WebFrameImpl::FromFrame(page->mainFrame())->webview_impl();
+ return WebFrameImpl::FromFrame(page->mainFrame())->GetWebViewImpl();
}
// WebView --------------------------------------------------------------------
diff --git a/webkit/glue/webworkerclient_impl.cc b/webkit/glue/webworkerclient_impl.cc
index dbd1a29..aed714d 100644
--- a/webkit/glue/webworkerclient_impl.cc
+++ b/webkit/glue/webworkerclient_impl.cc
@@ -70,7 +70,7 @@ WebCore::WorkerContextProxy* WebCore::WorkerContextProxy::create(
static_cast<WebFrameLoaderClient*>(
document->frame()->loader()->client());
WebViewDelegate* webview_delegate =
- frame_loader_client->webframe()->webview_impl()->delegate();
+ frame_loader_client->webframe()->GetWebViewImpl()->delegate();
webworker = webview_delegate->CreateWebWorker(proxy);
} else {
webworker = WebKit::webKitClient()->createWorker(proxy);