summaryrefslogtreecommitdiffstats
path: root/chrome/common/appcache/appcache_frontend_proxy.h
blob: b18f9bbff351449c715b05bbb90bdbb1ca7019f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_COMMON_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
#define CHROME_COMMON_APPCACHE_APPCACHE_FRONTEND_PROXY_H_

#include <vector>
#include "ipc/ipc_message.h"
#include "webkit/appcache/appcache_interfaces.h"

// Sends appcache related messages to a child process.
class AppCacheFrontendProxy : public appcache::AppCacheFrontend {
 public:
  AppCacheFrontendProxy() : sender_(NULL) {}
  void set_sender(IPC::Message::Sender* sender) { sender_ = sender; }
  IPC::Message::Sender* sender() const { return sender_; }

  // AppCacheFrontend methods
  virtual void OnCacheSelected(int host_id, int64 cache_id ,
                               appcache::Status);
  virtual void OnStatusChanged(const std::vector<int>& host_ids,
                               appcache::Status status);
  virtual void OnEventRaised(const std::vector<int>& host_ids,
                             appcache::EventID event_id);

 private:
  IPC::Message::Sender* sender_;
};

#endif  // CHROME_COMMON_APPCACHE_APPCACHE_FRONTEND_PROXY_H_