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

Unified Diff: chrome/browser/renderer_host/out_of_memory_message_filter.h

Issue 6006006: Show OOM notification bar in all tabs sharing same render process (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Send reply to the sync message on the IO thread Created 9 years, 11 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
Index: chrome/browser/renderer_host/out_of_memory_message_filter.h
diff --git a/chrome/browser/renderer_host/out_of_memory_message_filter.h b/chrome/browser/renderer_host/out_of_memory_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d25cf29c5fa44463e7c92788747196d61919038
--- /dev/null
+++ b/chrome/browser/renderer_host/out_of_memory_message_filter.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_RENDERER_HOST_OUT_OF_MEMORY_MESSAGE_FILTER_H_
+#define CHROME_BROWSER_RENDERER_HOST_OUT_OF_MEMORY_MESSAGE_FILTER_H_
+
+#include "chrome/browser/browser_message_filter.h"
+
+namespace IPC {
+class Message;
+}
+
+class OutOfMemoryMessageFilter : public BrowserMessageFilter {
+ public:
+ explicit OutOfMemoryMessageFilter(int process_id);
+
+ // BrowserMessageFilter implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok);
+ private:
+ ~OutOfMemoryMessageFilter();
+
+ void OnRenderProcessOutOfMemory(IPC::Message* reply_msg);
+ void OnRenderProcessOutOfMemoryOnUIThread();
+
+ // The ID of this process.
+ int process_id_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(OutOfMemoryMessageFilter);
+};
+
+#endif // CHROME_BROWSER_RENDERER_HOST_OUT_OF_MEMORY_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698