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

Unified Diff: chrome/browser/browser_message_filter.h

Issue 6538100: Move core pieces of chrome\browser. I've only gone up to "g", will do the re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: take out extra stuff from content_browser.gypi Created 9 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_child_process_host.cc ('k') | chrome/browser/browser_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_message_filter.h
===================================================================
--- chrome/browser/browser_message_filter.h (revision 75626)
+++ chrome/browser/browser_message_filter.h (working copy)
@@ -6,59 +6,7 @@
#define CHROME_BROWSER_BROWSER_MESSAGE_FILTER_H_
#pragma once
-#include "base/process.h"
-#include "chrome/browser/browser_thread.h"
-#include "ipc/ipc_channel_proxy.h"
+// TODO(jam): remove this file when all files have been converted.
+#include "content/browser/browser_message_filter.h"
-// Base class for message filters in the browser process. You can receive and
-// send messages on any thread.
-class BrowserMessageFilter : public IPC::ChannelProxy::MessageFilter,
- public IPC::Message::Sender {
- public:
- BrowserMessageFilter();
- virtual ~BrowserMessageFilter();
-
- // IPC::ChannelProxy::MessageFilter methods. If you override them, make sure
- // to call them as well. These are always called on the IO thread.
- virtual void OnFilterAdded(IPC::Channel* channel);
- virtual void OnChannelClosing();
- virtual void OnChannelConnected(int32 peer_pid);
- // DON'T OVERRIDE THIS! Override the other version below.
- virtual bool OnMessageReceived(const IPC::Message& message);
-
- // IPC::Message::Sender implementation. Can be called on any thread. Can't
- // send sync messages (since we don't want to block the browser on any other
- // process).
- virtual bool Send(IPC::Message* message);
-
- // If you want the given message to be dispatched to your OnMessageReceived on
- // a different thread, change |thread| to the id of the target thread.
- // If you don't handle this message, or want to keep it on the IO thread, do
- // nothing.
- virtual void OverrideThreadForMessage(const IPC::Message& message,
- BrowserThread::ID* thread);
-
- // Override this to receive messages.
- // Your function will normally be called on the IO thread. However, if your
- // OverrideThreadForMessage modifies the thread used to dispatch the message,
- // your function will be called on the requested thread.
- virtual bool OnMessageReceived(const IPC::Message& message,
- bool* message_was_ok) = 0;
-
- // Can be called on any thread, after OnChannelConnected is called.
- base::ProcessHandle peer_handle() { return peer_handle_; }
-
- protected:
- // Call this if a message couldn't be deserialized. This kills the renderer.
- // Can be called on any thread.
- virtual void BadMessageReceived();
-
- private:
- // Dispatches a message to the derived class.
- bool DispatchMessage(const IPC::Message& message);
-
- IPC::Channel* channel_;
- base::ProcessHandle peer_handle_;
-};
-
#endif // CHROME_BROWSER_BROWSER_MESSAGE_FILTER_H_
« no previous file with comments | « chrome/browser/browser_child_process_host.cc ('k') | chrome/browser/browser_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698