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

Unified Diff: chrome/browser/renderer_host/render_view_host_notification_task.h

Issue 2823038: Refactor SSLClientAuthHandler and certificate selection (Closed)
Patch Set: Rebase the patch Created 10 years, 5 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: chrome/browser/renderer_host/render_view_host_notification_task.h
diff --git a/chrome/browser/renderer_host/render_view_host_notification_task.h b/chrome/browser/renderer_host/render_view_host_notification_task.h
index c1d732aedb511c819359130518b8baeabdba776a..1266922761d33f39e1610e5332877df8eed36a69 100644
--- a/chrome/browser/renderer_host/render_view_host_notification_task.h
+++ b/chrome/browser/renderer_host/render_view_host_notification_task.h
@@ -147,6 +147,32 @@ inline void CallRenderViewHostRendererManagementDelegateHelper(
params));
}
+// For proxying calls to RenderViewHostDelegate::SSL
+
+class RenderViewHostToSSLDelegate {
+ public:
+ typedef RenderViewHostDelegate::SSL MappedType;
+ static MappedType* Map(RenderViewHost* rvh) {
+ return rvh ? rvh->delegate()->GetSSLDelegate() : NULL;
+ }
+};
+
+template <typename Method, typename Params>
+inline void CallRenderViewHostSSLDelegateHelper(
+ int render_process_id,
+ int render_view_id,
+ Method method,
+ const Params& params) {
+ ChromeThread::PostTask(
+ ChromeThread::UI, FROM_HERE,
+ new RenderViewHostNotificationTask<
+ Method, Params, RenderViewHostToSSLDelegate>(
+ render_process_id,
+ render_view_id,
+ method,
+ params));
+}
+
} // namespace internal
// ----------------------------------------------------------------------------
@@ -310,5 +336,33 @@ inline void CallRenderViewHostRendererManagementDelegate(int render_process_id,
}
// ----------------------------------------------------------------------------
+// Proxy calls to the specified RenderViewHost's SSL delegate.
+
+template <typename Method, typename A>
+inline void CallRenderViewHostSSLDelegate(int render_process_id,
+ int render_view_id,
+ Method method,
+ const A& a) {
+ internal::CallRenderViewHostSSLDelegateHelper(
+ render_process_id,
+ render_view_id,
+ method,
+ MakeTuple(a));
+}
+
+template <typename Method, typename A, typename B>
+inline void CallRenderViewHostSSLDelegate(int render_process_id,
+ int render_view_id,
+ Method method,
+ const A& a,
+ const B& b) {
+ internal::CallRenderViewHostSSLDelegateHelper(
+ render_process_id,
+ render_view_id,
+ method,
+ MakeTuple(a, b));
+}
+
+// ----------------------------------------------------------------------------
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_delegate.cc ('k') | chrome/browser/ssl/ssl_client_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698