| 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.h" | 8 #include "content/renderer/render_thread_impl.h" |
| 9 #include "content/renderer/render_view.h" | 9 #include "content/renderer/render_view.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 RenderView* render_view, | 18 RenderView* render_view, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 31 return; | 31 return; |
| 32 | 32 |
| 33 WebKit::WebFrame* frame = render_view->webview()->mainFrame(); | 33 WebKit::WebFrame* frame = render_view->webview()->mainFrame(); |
| 34 frame->addMessageToConsole(WebConsoleMessage( | 34 frame->addMessageToConsole(WebConsoleMessage( |
| 35 static_cast<WebConsoleMessage::Level>(log_level), | 35 static_cast<WebConsoleMessage::Level>(log_level), |
| 36 WebKit::WebString::fromUTF8(message.c_str()))); | 36 WebKit::WebString::fromUTF8(message.c_str()))); |
| 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 RenderThreadImpl::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 if (!info.manifest_url.is_empty()) { | 47 if (!info.manifest_url.is_empty()) { |
| 48 RenderThread::current()->Send(new ViewHostMsg_AppCacheAccessed( | 48 RenderThreadImpl::current()->Send(new ViewHostMsg_AppCacheAccessed( |
| 49 routing_id_, info.manifest_url, false)); | 49 routing_id_, info.manifest_url, false)); |
| 50 } | 50 } |
| 51 WebApplicationCacheHostImpl::OnCacheSelected(info); | 51 WebApplicationCacheHostImpl::OnCacheSelected(info); |
| 52 } | 52 } |
| 53 | 53 |
| 54 RenderView* RendererWebApplicationCacheHostImpl::GetRenderView() { | 54 RenderView* RendererWebApplicationCacheHostImpl::GetRenderView() { |
| 55 return static_cast<RenderView*> | 55 return static_cast<RenderView*> |
| 56 (RenderThread::current()->ResolveRoute(routing_id_)); | 56 (RenderThreadImpl::current()->ResolveRoute(routing_id_)); |
| 57 } | 57 } |
| OLD | NEW |