diff options
Diffstat (limited to 'chrome/renderer/extensions/extension_helper.h')
-rw-r--r-- | chrome/renderer/extensions/extension_helper.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/renderer/extensions/extension_helper.h b/chrome/renderer/extensions/extension_helper.h new file mode 100644 index 0000000..d18ad48 --- /dev/null +++ b/chrome/renderer/extensions/extension_helper.h @@ -0,0 +1,36 @@ +// 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_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ +#define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ +#pragma once + +#include "content/renderer/render_view_observer.h" + +class GURL; +class ListValue; + +// Filters extension related messages sent to RenderViews. +class ExtensionHelper : public RenderViewObserver { + public: + explicit ExtensionHelper(RenderView* render_view); + virtual ~ExtensionHelper(); + + private: + // RenderViewObserver implementation. + virtual bool OnMessageReceived(const IPC::Message& message); + + void OnExtensionResponse(int request_id, bool success, + const std::string& response, + const std::string& error); + void OnExtensionMessageInvoke(const std::string& extension_id, + const std::string& function_name, + const ListValue& args, + const GURL& event_url); + + + DISALLOW_COPY_AND_ASSIGN(ExtensionHelper); +}; + +#endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ |