Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: chrome/browser/browser_io_message_filter.h

Issue 5513001: Add a base class for objects that want to filter messages on the UI thread. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix possible race condition Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 CHROME_BROWSER_BROWSER_IO_MESSAGE_FILTER_H_
6 #define CHROME_BROWSER_BROWSER_IO_MESSAGE_FILTER_H_
7 #pragma once
8
9 #include "base/process.h"
10 #include "ipc/ipc_channel_proxy.h"
11
12 // Base class for message filters in the browser process that reside on the IO
13 // thread.
14 class BrowserIOMessageFilter : public IPC::ChannelProxy::MessageFilter,
15 public IPC::Message::Sender {
16 public:
17 BrowserIOMessageFilter();
18 virtual ~BrowserIOMessageFilter();
19
20 // IPC::ChannelProxy::MessageFilter methods. If you override them, make sure
21 // to call them as well.
22 virtual void OnFilterAdded(IPC::Channel* channel);
23 virtual void OnChannelClosing();
24 virtual void OnChannelConnected(int32 peer_pid);
25
26 // IPC::Message::Sender implementation:
27 virtual bool Send(IPC::Message* msg);
28
29 protected:
30 base::ProcessHandle peer_handle() { return peer_handle_; }
31
32 private:
33 IPC::Channel* channel_;
34 base::ProcessHandle peer_handle_;
35 };
36
37 #endif // CHROME_BROWSER_BROWSER_IO_MESSAGE_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698