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

Unified Diff: Source/web/WebHelperPluginImpl.h

Issue 26434002: Cleanup: Add more conversion helpers for usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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: Source/web/WebHelperPluginImpl.h
diff --git a/Source/web/WebHelperPluginImpl.h b/Source/web/WebHelperPluginImpl.h
index d7ed9d3ebabd36b7437235991530e3ad8c70ed5a..93cccda241b86f4a5fc83059eab49bbc2d416e3c 100644
--- a/Source/web/WebHelperPluginImpl.h
+++ b/Source/web/WebHelperPluginImpl.h
@@ -72,6 +72,7 @@ private:
virtual void layout() OVERRIDE;
virtual void setFocus(bool) OVERRIDE;
virtual void close() OVERRIDE;
+ virtual bool isHelperPlugin() const OVERRIDE { return true; }
WebWidgetClient* m_widgetClient;
WebViewImpl* m_webView;
@@ -83,6 +84,12 @@ private:
friend class HelperPluginChromeClient;
};
+inline WebHelperPluginImpl* toWebHelperPluginImpl(WebWidget* widget)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(widget && widget->isHelperPlugin());
tkent 2013/10/08 05:24:04 should accept null widget for consistency.
+ return static_cast<WebHelperPluginImpl*>(widget);
+}
+
} // namespace WebKit
#endif // WebHelperPluginImpl_h

Powered by Google App Engine
This is Rietveld 408576698