'sources': [
'tizen.h',
'tizen_api.js',
- 'tizen_context.cc',
- 'tizen_context.h',
+ 'tizen_extension.cc',
+ 'tizen_extension.h',
+ '../common/extension.cc',
+ '../common/extension.h',
],
},
],
+++ /dev/null
-// Copyright (c) 2013 Intel Corporation. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "tizen/tizen_context.h"
-
-DEFINE_XWALK_EXTENSION(TizenContext);
-
-TizenContext::TizenContext(ContextAPI* api) : api_(api) {}
-
-TizenContext::~TizenContext() {
- delete api_;
-}
-
-const char TizenContext::name[] = "tizen";
-
-// This will be generated from tizen_api.js.
-extern const char kSource_tizen_api[];
-
-const char* TizenContext::GetJavaScript() {
- return kSource_tizen_api;
-}
+++ /dev/null
-// Copyright (c) 2013 Intel Corporation. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef TIZEN_TIZEN_CONTEXT_H_
-#define TIZEN_TIZEN_CONTEXT_H_
-
-#include "common/extension_adapter.h"
-
-class TizenContext {
- public:
- explicit TizenContext(ContextAPI* context_api);
- ~TizenContext();
-
- // ExtensionAdapter implementation.
- static const char name[];
- static const char* GetJavaScript();
- void HandleMessage(const char*) {}
- void HandleSyncMessage(const char*) {}
-
- private:
- ContextAPI* api_;
-};
-
-#endif // TIZEN_TIZEN_CONTEXT_H_
--- /dev/null
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "tizen/tizen_extension.h"
+
+// This will be generated from tizen_api.js.
+extern const char kSource_tizen_api[];
+
+common::Extension* CreateExtension() {
+ return new TizenExtension;
+}
+
+TizenExtension::TizenExtension() {
+ SetExtensionName("tizen");
+ SetJavaScriptAPI(kSource_tizen_api);
+}
+
+TizenExtension::~TizenExtension() {}
--- /dev/null
+// Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TIZEN_TIZEN_EXTENSION_H_
+#define TIZEN_TIZEN_EXTENSION_H_
+
+#include "common/extension.h"
+
+class TizenExtension : public common::Extension {
+ public:
+ TizenExtension();
+ virtual ~TizenExtension();
+};
+
+#endif // TIZEN_TIZEN_EXTENSION_H_