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

Unified Diff: chrome/browser/guest_view/chrome_guest_view_message_filter.h

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 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/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_

Powered by Google App Engine
This is Rietveld 408576698