OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file defines utility functions for sending notifications (calling | 5 // This file defines utility functions for sending notifications (calling |
6 // methods that return void and do not have out params) to the RenderViewHost | 6 // methods that return void and do not have out params) to the RenderViewHost |
7 // or one of its delegate interfaces. The notifications are dispatched | 7 // or one of its delegate interfaces. The notifications are dispatched |
8 // asynchronously, and only if the specified RenderViewHost still exists. | 8 // asynchronously, and only if the specified RenderViewHost still exists. |
9 | 9 |
10 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_ | 10 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_ |
11 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_ | 11 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_ |
12 #pragma once | 12 #pragma once |
13 | 13 |
14 #include "base/callback_old.h" | 14 #include "base/callback_old.h" |
15 #include "base/task.h" | 15 #include "base/task.h" |
16 #include "content/browser/browser_thread.h" | |
17 #include "content/browser/renderer_host/render_view_host.h" | 16 #include "content/browser/renderer_host/render_view_host.h" |
18 #include "content/browser/renderer_host/render_view_host_delegate.h" | 17 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 18 #include "content/public/browser/browser_thread.h" |
19 | 19 |
20 // ---------------------------------------------------------------------------- | 20 // ---------------------------------------------------------------------------- |
21 | 21 |
22 namespace internal { | 22 namespace internal { |
23 | 23 |
24 // The simplest Mapper, used when proxying calls to a RenderViewHost. | 24 // The simplest Mapper, used when proxying calls to a RenderViewHost. |
25 class RenderViewHostIdentityMapper { | 25 class RenderViewHostIdentityMapper { |
26 public: | 26 public: |
27 typedef RenderViewHost MappedType; | 27 typedef RenderViewHost MappedType; |
28 static MappedType* Map(RenderViewHost* rvh) { return rvh; } | 28 static MappedType* Map(RenderViewHost* rvh) { return rvh; } |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 internal::CallRenderViewHostRendererManagementDelegateHelper( | 169 internal::CallRenderViewHostRendererManagementDelegateHelper( |
170 render_process_id, | 170 render_process_id, |
171 render_view_id, | 171 render_view_id, |
172 method, | 172 method, |
173 MakeTuple(a, b)); | 173 MakeTuple(a, b)); |
174 } | 174 } |
175 | 175 |
176 // ---------------------------------------------------------------------------- | 176 // ---------------------------------------------------------------------------- |
177 | 177 |
178 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_ | 178 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_ |
OLD | NEW |