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

Side by Side Diff: chrome/browser/appcache/appcache_frontend_proxy.h

Issue 5625003: Make the AppCacheDispatcherHost be a MessageFilter so that ResourceMessageFil... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix dependency issue in AppCacheDispatcherHost Created 10 years 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
OLDNEW
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 #ifndef CHROME_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ 5 #ifndef CHROME_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
6 #define CHROME_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ 6 #define CHROME_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ipc/ipc_message.h" 12 #include "ipc/ipc_message.h"
13 #include "webkit/appcache/appcache_interfaces.h" 13 #include "webkit/appcache/appcache_interfaces.h"
14 14
15 // Sends appcache related messages to a child process. 15 // Sends appcache related messages to a child process.
16 class AppCacheFrontendProxy : public appcache::AppCacheFrontend { 16 class AppCacheFrontendProxy : public appcache::AppCacheFrontend {
17 public: 17 public:
18 AppCacheFrontendProxy() : sender_(NULL) {} 18 explicit AppCacheFrontendProxy(IPC::Message::Sender* sender);
19 void set_sender(IPC::Message::Sender* sender) { sender_ = sender; }
20 IPC::Message::Sender* sender() const { return sender_; }
21 19
22 // AppCacheFrontend methods 20 // AppCacheFrontend methods
23 virtual void OnCacheSelected(int host_id, const appcache::AppCacheInfo& info); 21 virtual void OnCacheSelected(int host_id, const appcache::AppCacheInfo& info);
24 virtual void OnStatusChanged(const std::vector<int>& host_ids, 22 virtual void OnStatusChanged(const std::vector<int>& host_ids,
25 appcache::Status status); 23 appcache::Status status);
26 virtual void OnEventRaised(const std::vector<int>& host_ids, 24 virtual void OnEventRaised(const std::vector<int>& host_ids,
27 appcache::EventID event_id); 25 appcache::EventID event_id);
28 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, 26 virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
29 const GURL& url, 27 const GURL& url,
30 int num_total, int num_complete); 28 int num_total, int num_complete);
31 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, 29 virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
32 const std::string& message); 30 const std::string& message);
33 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, 31 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level,
34 const std::string& message); 32 const std::string& message);
35 virtual void OnContentBlocked(int host_id, 33 virtual void OnContentBlocked(int host_id,
36 const GURL& manifest_url); 34 const GURL& manifest_url);
37 35
38 private: 36 private:
39 IPC::Message::Sender* sender_; 37 IPC::Message::Sender* sender_;
40 }; 38 };
41 39
42 #endif // CHROME_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ 40 #endif // CHROME_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698