1 // Copyright 2013 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.
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
8 #include "content/public/browser/browser_message_filter.h"
14 class ServiceWorkerContext;
16 class ServiceWorkerDispatcherHost : public BrowserMessageFilter {
18 ServiceWorkerDispatcherHost(int render_process_id,
19 ServiceWorkerContext* context);
21 // BrowserIOMessageFilter implementation
22 virtual bool OnMessageReceived(const IPC::Message& message,
23 bool* message_was_ok) OVERRIDE;
26 virtual ~ServiceWorkerDispatcherHost();
29 // IPC Message handlers
30 void OnRegisterServiceWorker(int32 thread_id,
33 const GURL& script_url);
34 void OnUnregisterServiceWorker(int32 thread_id,
37 scoped_refptr<ServiceWorkerContext> context_;
40 } // namespace content
42 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_