Index: chrome/browser/guest_view/chrome_guest_view_message_filter.h |
diff --git a/chrome/browser/guest_view/chrome_guest_view_message_filter.h b/chrome/browser/guest_view/chrome_guest_view_message_filter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bd2fe3608efa796f088af015f149e108aaee2d23 |
--- /dev/null |
+++ b/chrome/browser/guest_view/chrome_guest_view_message_filter.h |
@@ -0,0 +1,51 @@ |
+// Copyright 2015 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_GUEST_VIEW_CHROME_GUEST_VIEW_MESSAGE_FILTER_H_ |
+#define CHROME_BROWSER_GUEST_VIEW_CHROME_GUEST_VIEW_MESSAGE_FILTER_H_ |
+ |
+#if defined(ENABLE_EXTENSIONS) |
+#include "extensions/browser/guest_view/extensions_guest_view_message_filter.h" |
+#else |
+#include "components/guest_view/browser/guest_view_message_filter.h" |
+#endif |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace chrome { |
+ |
+#if defined(ENABLE_EXTENSIONS) |
+using GuestViewMessageFilterBase = extensions::ExtensionsGuestViewMessageFilter; |
+#else |
+using GuestViewMessageFilterBase = guest_view::GuestViewMessageFilter; |
+#endif |
+ |
+class ChromeGuestViewMessageFilter : public GuestViewMessageFilterBase { |
+ public: |
+ ChromeGuestViewMessageFilter(int render_process_id, |
+ content::BrowserContext* context); |
+ |
+ private: |
+ friend class content::BrowserThread; |
+ friend class base::DeleteHelper<ChromeGuestViewMessageFilter>; |
+ |
+ ~ChromeGuestViewMessageFilter() override; |
+ |
+ // GuestViewMessageFilterBase implementation. |
+ guest_view::GuestViewManager* GetOrCreateGuestViewManager() override; |
+ bool OnMessageReceived(const IPC::Message& message) override; |
+ void OverrideThreadForMessage(const IPC::Message& message, |
+ content::BrowserThread::ID* thread) override; |
+ |
+ // Message handler(s): |
+ void OnHeapSize(int routing_id, int heap_size); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromeGuestViewMessageFilter); |
+}; |
+ |
+} // namespace chrome |
+ |
+#endif // CHROME_BROWSER_GUEST_VIEW_CHROME_GUEST_VIEW_MESSAGE_FILTER_H_ |