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

Unified Diff: content/browser/renderer_host/extension_system_message_filter.h

Issue 22944002: Implementation of the "Redirect URLs to Packaged Apps" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 1) Fixed broken redirection for in-page WebKit-initiated navigations. All redirections work now. 2)… Created 7 years, 4 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: 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_

Powered by Google App Engine
This is Rietveld 408576698