Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: extensions/browser/extension_function.cc

Issue 458323002: Change GuestViewInternalCreateGuestFunction to create the guest view using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/extension_function.cc
diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc
index 773f027bac20c4e618c1b17cd5bfc24ab791f035..aec46e69316c384a4a8923ba8ee9ef8de1205f71 100644
--- a/extensions/browser/extension_function.cc
+++ b/extensions/browser/extension_function.cc
@@ -375,11 +375,13 @@ void UIThreadExtensionFunction::SetRenderFrameHost(
}
content::WebContents* UIThreadExtensionFunction::GetAssociatedWebContents() {
- content::WebContents* web_contents = NULL;
- if (dispatcher())
- web_contents = dispatcher()->delegate()->GetAssociatedWebContents();
+ return dispatcher() ? dispatcher()->delegate()->GetAssociatedWebContents()
+ : NULL;
+}
- return web_contents;
+content::WebContents* UIThreadExtensionFunction::GetVisibleWebContents() {
+ return dispatcher() ? dispatcher()->delegate()->GetVisibleWebContents()
+ : NULL;
}
void UIThreadExtensionFunction::SendResponse(bool success) {

Powered by Google App Engine
This is Rietveld 408576698