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_SHELL_BROWSER_SHELL_MESSAGE_FILTER_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_MESSAGE_FILTER_H_
11 #include "base/basictypes.h"
12 #include "base/files/file_path.h"
13 #include "content/public/browser/browser_message_filter.h"
18 class URLRequestContextGetter;
26 class DatabaseTracker;
31 class ShellMessageFilter : public BrowserMessageFilter {
33 ShellMessageFilter(int render_process_id,
34 storage::DatabaseTracker* database_tracker,
35 storage::QuotaManager* quota_manager,
36 net::URLRequestContextGetter* request_context_getter);
39 virtual ~ShellMessageFilter();
41 // BrowserMessageFilter implementation.
42 virtual void OverrideThreadForMessage(const IPC::Message& message,
43 BrowserThread::ID* thread) OVERRIDE;
44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
46 void OnReadFileToString(const base::FilePath& local_file,
47 std::string* contents);
48 void OnRegisterIsolatedFileSystem(
49 const std::vector<base::FilePath>& absolute_filenames,
50 std::string* filesystem_id);
51 void OnClearAllDatabases();
52 void OnSetDatabaseQuota(int quota);
53 void OnCheckWebNotificationPermission(const GURL& origin, int* result);
54 void OnGrantWebNotificationPermission(const GURL& origin,
55 bool permission_granted);
56 void OnClearWebNotificationPermissions();
57 void OnAcceptAllCookies(bool accept);
58 void OnDeleteAllCookies();
60 int render_process_id_;
62 storage::DatabaseTracker* database_tracker_;
63 storage::QuotaManager* quota_manager_;
64 net::URLRequestContextGetter* request_context_getter_;
66 DISALLOW_COPY_AND_ASSIGN(ShellMessageFilter);
69 } // namespace content
71 #endif // CONTENT_SHELL_BROWSER_SHELL_MESSAGE_FILTER_H_