| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
| index 9ea4705701cb7ec91d645f43dd3291fe8b191b07..a43d14cc5216b400f2a85be8b3d9cca4744552fa 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_view_host_impl.cc
|
| @@ -611,6 +611,12 @@ void RenderViewHostImpl::DesktopNotificationPostClick(int notification_id) {
|
| Send(new DesktopNotificationMsg_PostClick(GetRoutingID(), notification_id));
|
| }
|
|
|
| +int RenderViewHostImpl::DocumentHasImages() {
|
| + static int next_id = 1;
|
| + Send(new ViewMsg_DocumentHasImages(GetRoutingID(), next_id));
|
| + return next_id++;
|
| +}
|
| +
|
| void RenderViewHostImpl::ExecuteJavascriptInWebFrame(
|
| const string16& frame_xpath,
|
| const string16& jscript) {
|
| @@ -925,6 +931,8 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
|
| OnDomOperationResponse)
|
| IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Notifications,
|
| OnAccessibilityNotifications)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentHasImagesResponse,
|
| + OnDocumentHasImagesResponse)
|
| // Have the super handle all other messages.
|
| IPC_MESSAGE_UNHANDLED(
|
| handled = RenderWidgetHostImpl::OnMessageReceived(msg))
|
| @@ -1852,4 +1860,12 @@ void RenderViewHostImpl::ClearPowerSaveBlockers() {
|
| STLDeleteValues(&power_save_blockers_);
|
| }
|
|
|
| +void RenderViewHostImpl::OnDocumentHasImagesResponse(int id, bool has_images) {
|
| + std::pair<int, bool> details(id, has_images);
|
| + content::NotificationService::current()->Notify(
|
| + content::NOTIFICATION_DOCUMENT_HAS_IMAGES_RESPONSE,
|
| + content::Source<RenderViewHost>(this),
|
| + content::Details<std::pair<int, bool> >(&details));
|
| +}
|
| +
|
| } // namespace content
|
|
|