Chromium Code Reviews| Index: content/browser/renderer_host/extension_system_message_filter.h |
| diff --git a/content/browser/renderer_host/extension_system_message_filter.h b/content/browser/renderer_host/extension_system_message_filter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e4e4964014052ba65a7a13f10bd75470ec02c27e |
| --- /dev/null |
| +++ b/content/browser/renderer_host/extension_system_message_filter.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2013 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 CONTENT_RENDERER_EXTENSION_SYSTEM_MESSAGE_FILTER_H_ |
| +#define CONTENT_RENDERER_EXTENSION_SYSTEM_MESSAGE_FILTER_H_ |
| + |
| +#include <string> |
| + |
| +#include "content/public/browser/browser_message_filter.h" |
| + |
| +class GURL; |
| + |
| +namespace content { |
| + |
| +class RenderProcessHost; |
| + |
| +// This class filters out incoming IPC messages for the extension system on the |
| +// browser IPC thread. |
| +class ExtensionSystemMessageFilter : public BrowserMessageFilter { |
|
Charlie Reis
2013/08/26 22:17:52
Extensions are a chrome/ concept and don't belong
sergeygs
2013/08/29 08:24:42
I think it's purely about naming: I've just been o
|
| + public: |
| + // Create the filter. |
| + ExtensionSystemMessageFilter(RenderProcessHost* render_process_host); |
| + |
| + // BrowserMessageFilter methods: |
| + virtual bool OnMessageReceived(const IPC::Message& message, |
| + bool* message_was_ok) OVERRIDE; |
| + |
| + //OnMessageReceive sends notifications to ExtensionSystem through |
| + // NotificationService: to reach the target, these need to be on the UI |
| + // thread, so we need to override. |
| + virtual void OverrideThreadForMessage( |
| + const IPC::Message& message, |
| + content::BrowserThread::ID* thread) OVERRIDE; |
| + |
| + private: |
| + virtual ~ExtensionSystemMessageFilter(); |
| + |
| + bool OnLaunchAppWithUrl(const std::string& app_id, |
| + const std::string& handler_id, |
| + const GURL& url, |
| + const GURL& referrer_url); |
| + |
| + RenderProcessHost* render_process_host_; |
| +}; |
| + |
| +} |
| + |
| +#endif // CONTENT_RENDERER_EXTENSION_SYSTEM_MESSAGE_FILTER_H_ |