| 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 "content/renderer/renderer_webapplicationcachehost_impl.h" | 5 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
| 6 | 6 |
| 7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
| 8 #include "content/renderer/render_thread_impl.h" | 8 #include "content/renderer/render_thread_impl.h" |
| 9 #include "content/renderer/render_view_impl.h" | 9 #include "content/renderer/render_view_impl.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 12 | 12 |
| 13 using appcache::AppCacheBackend; | 13 using appcache::AppCacheBackend; |
| 14 using WebKit::WebApplicationCacheHostClient; | 14 using WebKit::WebApplicationCacheHostClient; |
| 15 using WebKit::WebConsoleMessage; | 15 using WebKit::WebConsoleMessage; |
| 16 | 16 |
| 17 RendererWebApplicationCacheHostImpl::RendererWebApplicationCacheHostImpl( | 17 RendererWebApplicationCacheHostImpl::RendererWebApplicationCacheHostImpl( |
| 18 RenderViewImpl* render_view, | 18 RenderViewImpl* render_view, |
| 19 WebApplicationCacheHostClient* client, | 19 WebApplicationCacheHostClient* client, |
| 20 AppCacheBackend* backend) | 20 AppCacheBackend* backend) |
| 21 : WebApplicationCacheHostImpl(client, backend), | 21 : WebApplicationCacheHostImpl(client, backend), |
| 22 content_blocked_(false), | |
| 23 routing_id_(render_view->routing_id()) { | 22 routing_id_(render_view->routing_id()) { |
| 24 } | 23 } |
| 25 | 24 |
| 26 void RendererWebApplicationCacheHostImpl::OnLogMessage( | 25 void RendererWebApplicationCacheHostImpl::OnLogMessage( |
| 27 appcache::LogLevel log_level, const std::string& message) { | 26 appcache::LogLevel log_level, const std::string& message) { |
| 28 RenderViewImpl* render_view = GetRenderView(); | 27 RenderViewImpl* render_view = GetRenderView(); |
| 29 if (!render_view || !render_view->webview() || | 28 if (!render_view || !render_view->webview() || |
| 30 !render_view->webview()->mainFrame()) | 29 !render_view->webview()->mainFrame()) |
| 31 return; | 30 return; |
| 32 | 31 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 48 RenderThreadImpl::current()->Send(new ViewHostMsg_AppCacheAccessed( | 47 RenderThreadImpl::current()->Send(new ViewHostMsg_AppCacheAccessed( |
| 49 routing_id_, info.manifest_url, false)); | 48 routing_id_, info.manifest_url, false)); |
| 50 } | 49 } |
| 51 WebApplicationCacheHostImpl::OnCacheSelected(info); | 50 WebApplicationCacheHostImpl::OnCacheSelected(info); |
| 52 } | 51 } |
| 53 | 52 |
| 54 RenderViewImpl* RendererWebApplicationCacheHostImpl::GetRenderView() { | 53 RenderViewImpl* RendererWebApplicationCacheHostImpl::GetRenderView() { |
| 55 return static_cast<RenderViewImpl*> | 54 return static_cast<RenderViewImpl*> |
| 56 (RenderThreadImpl::current()->ResolveRoute(routing_id_)); | 55 (RenderThreadImpl::current()->ResolveRoute(routing_id_)); |
| 57 } | 56 } |
| OLD | NEW |