Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: content/child/appcache_dispatcher.cc

Issue 22410007: Move appcache_frontend_impl.* to content/renderer/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/appcache_dispatcher.h ('k') | content/content_child.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/child/appcache_dispatcher.h"
6
7 #include "content/common/appcache_messages.h"
8
9 namespace content {
10
11 AppCacheDispatcher::AppCacheDispatcher(
12 IPC::Sender* sender,
13 appcache::AppCacheFrontend* frontend)
14 : backend_proxy_(sender),
15 frontend_(frontend) {}
16
17 AppCacheDispatcher::~AppCacheDispatcher() {}
18
19 bool AppCacheDispatcher::OnMessageReceived(const IPC::Message& msg) {
20 bool handled = true;
21 IPC_BEGIN_MESSAGE_MAP(AppCacheDispatcher, msg)
22 IPC_MESSAGE_HANDLER(AppCacheMsg_CacheSelected, OnCacheSelected)
23 IPC_MESSAGE_HANDLER(AppCacheMsg_StatusChanged, OnStatusChanged)
24 IPC_MESSAGE_HANDLER(AppCacheMsg_EventRaised, OnEventRaised)
25 IPC_MESSAGE_HANDLER(AppCacheMsg_ProgressEventRaised, OnProgressEventRaised)
26 IPC_MESSAGE_HANDLER(AppCacheMsg_ErrorEventRaised, OnErrorEventRaised)
27 IPC_MESSAGE_HANDLER(AppCacheMsg_LogMessage, OnLogMessage)
28 IPC_MESSAGE_HANDLER(AppCacheMsg_ContentBlocked, OnContentBlocked)
29 IPC_MESSAGE_UNHANDLED(handled = false)
30 IPC_END_MESSAGE_MAP()
31 return handled;
32 }
33
34 void AppCacheDispatcher::OnCacheSelected(
35 int host_id, const appcache::AppCacheInfo& info) {
36 frontend_->OnCacheSelected(host_id, info);
37 }
38
39 void AppCacheDispatcher::OnStatusChanged(const std::vector<int>& host_ids,
40 appcache::Status status) {
41 frontend_->OnStatusChanged(host_ids, status);
42 }
43
44 void AppCacheDispatcher::OnEventRaised(const std::vector<int>& host_ids,
45 appcache::EventID event_id) {
46 frontend_->OnEventRaised(host_ids, event_id);
47 }
48
49 void AppCacheDispatcher::OnProgressEventRaised(
50 const std::vector<int>& host_ids,
51 const GURL& url, int num_total, int num_complete) {
52 frontend_->OnProgressEventRaised(host_ids, url, num_total, num_complete);
53 }
54
55 void AppCacheDispatcher::OnErrorEventRaised(
56 const std::vector<int>& host_ids,
57 const std::string& message) {
58 frontend_->OnErrorEventRaised(host_ids, message);
59 }
60
61 void AppCacheDispatcher::OnLogMessage(
62 int host_id, int log_level, const std::string& message) {
63 frontend_->OnLogMessage(
64 host_id, static_cast<appcache::LogLevel>(log_level), message);
65 }
66
67 void AppCacheDispatcher::OnContentBlocked(int host_id,
68 const GURL& manifest_url) {
69 frontend_->OnContentBlocked(host_id, manifest_url);
70 }
71
72 } // namespace content
OLDNEW
« no previous file with comments | « content/child/appcache_dispatcher.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698