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"
16 class URLRequestContextGetter;
23 namespace webkit_database {
24 class DatabaseTracker;
29 class ShellMessageFilter : public BrowserMessageFilter {
31 ShellMessageFilter(int render_process_id,
32 webkit_database::DatabaseTracker* database_tracker,
33 quota::QuotaManager* quota_manager,
34 net::URLRequestContextGetter* request_context_getter);
37 virtual ~ShellMessageFilter();
39 // BrowserMessageFilter implementation.
40 virtual void OverrideThreadForMessage(const IPC::Message& message,
41 BrowserThread::ID* thread) OVERRIDE;
42 virtual bool OnMessageReceived(const IPC::Message& message,
43 bool* message_was_ok) OVERRIDE;
45 void OnReadFileToString(const base::FilePath& local_file,
46 std::string* contents);
47 void OnRegisterIsolatedFileSystem(
48 const std::vector<base::FilePath>& absolute_filenames,
49 std::string* filesystem_id);
50 void OnClearAllDatabases();
51 void OnSetDatabaseQuota(int quota);
52 void OnAcceptAllCookies(bool accept);
53 void OnDeleteAllCookies();
55 int render_process_id_;
57 webkit_database::DatabaseTracker* database_tracker_;
58 quota::QuotaManager* quota_manager_;
59 net::URLRequestContextGetter* request_context_getter_;
61 DISALLOW_COPY_AND_ASSIGN(ShellMessageFilter);
64 } // namespace content
66 #endif // CONTENT_SHELL_BROWSER_SHELL_MESSAGE_FILTER_H_