Home | History | Annotate | Download | only in appcache
      1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
      6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
      7 
      8 #include <string>
      9 #include <vector>
     10 
     11 #include "ipc/ipc_sender.h"
     12 #include "webkit/common/appcache/appcache_interfaces.h"
     13 
     14 namespace content {
     15 
     16 // Sends appcache related messages to a child process.
     17 class AppCacheFrontendProxy : public appcache::AppCacheFrontend {
     18  public:
     19   explicit AppCacheFrontendProxy(IPC::Sender* sender);
     20 
     21   // AppCacheFrontend methods
     22   virtual void OnCacheSelected(int host_id,
     23                                const appcache::AppCacheInfo& info) OVERRIDE;
     24   virtual void OnStatusChanged(const std::vector<int>& host_ids,
     25                                appcache::Status status) OVERRIDE;
     26   virtual void OnEventRaised(const std::vector<int>& host_ids,
     27                              appcache::EventID event_id) OVERRIDE;
     28   virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
     29                                      const GURL& url,
     30                                      int num_total, int num_complete) OVERRIDE;
     31   virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
     32                                   const std::string& message) OVERRIDE;
     33   virtual void OnLogMessage(int host_id, appcache::LogLevel log_level,
     34                             const std::string& message) OVERRIDE;
     35   virtual void OnContentBlocked(int host_id,
     36                                 const GURL& manifest_url) OVERRIDE;
     37 
     38  private:
     39   IPC::Sender* sender_;
     40 };
     41 
     42 }  // namespace content
     43 
     44 #endif  // CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
     45