1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
6 #ifndef XWALK_EXTENSIONS_RENDERER_XWALK_EXTENSION_RENDERER_CONTROLLER_H_
7 #define XWALK_EXTENSIONS_RENDERER_XWALK_EXTENSION_RENDERER_CONTROLLER_H_
9 #include <ewk_chromium.h>
15 namespace extensions {
17 class XWalkExtensionClient;
19 class XWalkExtensionRendererController {
21 static XWalkExtensionRendererController& GetInstance();
23 void DidCreateScriptContext(v8::Handle<v8::Context> context);
24 void WillReleaseScriptContext(v8::Handle<v8::Context> context);
26 void OnReceivedIPCMessage(const Ewk_IPC_Wrt_Message_Data* data);
28 void InitializeExtensionClient();
29 void LoadUserExtensions(const std::string app_path);
32 XWalkExtensionRendererController();
33 virtual ~XWalkExtensionRendererController();
36 std::unique_ptr<XWalkExtensionClient> extensions_client_;
39 } // namespace extensions
41 #endif // XWALK_EXTENSIONS_RENDERER_XWALK_EXTENSION_RENDERER_CONTROLLER_H_