OLD | NEW |
1 // Copyright (c) 2009 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/common/appcache/appcache_dispatcher.h" | 5 #include "chrome/common/appcache/appcache_dispatcher.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 #include "webkit/appcache/web_application_cache_host_impl.h" | 8 #include "webkit/appcache/web_application_cache_host_impl.h" |
9 | 9 |
10 bool AppCacheDispatcher::OnMessageReceived(const IPC::Message& msg) { | 10 bool AppCacheDispatcher::OnMessageReceived(const IPC::Message& msg) { |
11 bool handled = true; | 11 bool handled = true; |
12 IPC_BEGIN_MESSAGE_MAP(AppCacheDispatcher, msg) | 12 IPC_BEGIN_MESSAGE_MAP(AppCacheDispatcher, msg) |
13 IPC_MESSAGE_HANDLER(AppCacheMsg_CacheSelected, OnCacheSelected) | 13 IPC_MESSAGE_HANDLER(AppCacheMsg_CacheSelected, OnCacheSelected) |
14 IPC_MESSAGE_HANDLER(AppCacheMsg_StatusChanged, OnStatusChanged) | 14 IPC_MESSAGE_HANDLER(AppCacheMsg_StatusChanged, OnStatusChanged) |
15 IPC_MESSAGE_HANDLER(AppCacheMsg_EventRaised, OnEventRaised) | 15 IPC_MESSAGE_HANDLER(AppCacheMsg_EventRaised, OnEventRaised) |
| 16 IPC_MESSAGE_HANDLER(AppCacheMsg_ContentBlocked, OnContentBlocked) |
16 IPC_MESSAGE_UNHANDLED(handled = false) | 17 IPC_MESSAGE_UNHANDLED(handled = false) |
17 IPC_END_MESSAGE_MAP() | 18 IPC_END_MESSAGE_MAP() |
18 return handled; | 19 return handled; |
19 } | 20 } |
20 | 21 |
21 void AppCacheDispatcher::OnCacheSelected(int host_id, int64 cache_id, | 22 void AppCacheDispatcher::OnCacheSelected(int host_id, int64 cache_id, |
22 appcache::Status status) { | 23 appcache::Status status) { |
23 frontend_impl_.OnCacheSelected(host_id, cache_id, status); | 24 frontend_impl_.OnCacheSelected(host_id, cache_id, status); |
24 } | 25 } |
25 | 26 |
26 void AppCacheDispatcher::OnStatusChanged(const std::vector<int>& host_ids, | 27 void AppCacheDispatcher::OnStatusChanged(const std::vector<int>& host_ids, |
27 appcache::Status status) { | 28 appcache::Status status) { |
28 frontend_impl_.OnStatusChanged(host_ids, status); | 29 frontend_impl_.OnStatusChanged(host_ids, status); |
29 } | 30 } |
30 | 31 |
31 void AppCacheDispatcher::OnEventRaised(const std::vector<int>& host_ids, | 32 void AppCacheDispatcher::OnEventRaised(const std::vector<int>& host_ids, |
32 appcache::EventID event_id) { | 33 appcache::EventID event_id) { |
33 frontend_impl_.OnEventRaised(host_ids, event_id); | 34 frontend_impl_.OnEventRaised(host_ids, event_id); |
34 } | 35 } |
| 36 |
| 37 void AppCacheDispatcher::OnContentBlocked(int host_id) { |
| 38 frontend_impl_.OnContentBlocked(host_id); |
| 39 } |
OLD | NEW |