| 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 #include "chrome/renderer/renderer_webapplicationcachehost_impl.h" | 5 #include "chrome/renderer/renderer_webapplicationcachehost_impl.h" |
| 6 | 6 |
| 7 #include "chrome/common/content_settings_types.h" | 7 #include "chrome/common/content_settings_types.h" |
| 8 #include "chrome/renderer/render_thread.h" | 8 #include "chrome/renderer/render_thread.h" |
| 9 #include "chrome/renderer/render_view.h" | 9 #include "chrome/renderer/render_view.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 void RendererWebApplicationCacheHostImpl::OnContentBlocked( | 39 void RendererWebApplicationCacheHostImpl::OnContentBlocked( |
| 40 const GURL& manifest_url) { | 40 const GURL& manifest_url) { |
| 41 RenderThread::current()->Send(new ViewHostMsg_AppCacheAccessed( | 41 RenderThread::current()->Send(new ViewHostMsg_AppCacheAccessed( |
| 42 routing_id_, manifest_url, true)); | 42 routing_id_, manifest_url, true)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void RendererWebApplicationCacheHostImpl::OnCacheSelected( | 45 void RendererWebApplicationCacheHostImpl::OnCacheSelected( |
| 46 const appcache::AppCacheInfo& info) { | 46 const appcache::AppCacheInfo& info) { |
| 47 // TODO(jochen): Send a ViewHostMsg_AppCacheAccessed to the browser once this | 47 if (!info.manifest_url.is_empty()) { |
| 48 // methods gets the manifest url passed. | 48 RenderThread::current()->Send(new ViewHostMsg_AppCacheAccessed( |
| 49 routing_id_, info.manifest_url, false)); |
| 50 } |
| 49 WebApplicationCacheHostImpl::OnCacheSelected(info); | 51 WebApplicationCacheHostImpl::OnCacheSelected(info); |
| 50 } | 52 } |
| 51 | 53 |
| 52 RenderView* RendererWebApplicationCacheHostImpl::GetRenderView() { | 54 RenderView* RendererWebApplicationCacheHostImpl::GetRenderView() { |
| 53 return static_cast<RenderView*> | 55 return static_cast<RenderView*> |
| 54 (RenderThread::current()->ResolveRoute(routing_id_)); | 56 (RenderThread::current()->ResolveRoute(routing_id_)); |
| 55 } | 57 } |
| OLD | NEW |