From: min7.choi Date: Tue, 27 Feb 2018 04:10:11 +0000 (+0900) Subject: Revert "Add pwrt electron interface object" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d78cd305ea3ae69850a9b4d37ee4258d4fa6dd1;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Revert "Add pwrt electron interface object" "LOG(DEBUG)" produces a build error. This reverts commit 8f49617801551b4425f6ec092f7f426321cb6939. Change-Id: I11f50cd3e012ae1719b700409974307379b0fe74 Signed-off-by: min7.choi --- diff --git a/atom/browser/api/atom_api_pwrt.cc b/atom/browser/api/atom_api_pwrt.cc deleted file mode 100644 index 334127d..0000000 --- a/atom/browser/api/atom_api_pwrt.cc +++ /dev/null @@ -1,61 +0,0 @@ -#include "atom/browser/api/atom_api_pwrt.h" - -#include "atom/browser/browser.h" -#include "native_mate/dictionary.h" -#include "base/logging.h" - -#include "atom/common/node_includes.h" - -namespace atom { - -namespace api { - -PWRT::PWRT(v8::Isolate* isolate) { - LOG(DEBUG) << "PWRT::PWRT"; - Init(isolate); -} - -PWRT::~PWRT() { - LOG(DEBUG) << "PWRT::~PWRT"; -} - -std::string PWRT::GetMessage() { - LOG(DEBUG) << "PWRT::GetMessage"; - return "message from C++"; -} - -// static -mate::Handle PWRT::Create(v8::Isolate* isolate) { - LOG(DEBUG) << "PWRT::Create"; - return mate::CreateHandle(isolate, new PWRT(isolate)); -} - -// static -void PWRT::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - LOG(DEBUG) << "PWRT::BuildPrototype"; - prototype->SetClassName(mate::StringToV8(isolate, "PWRT")); - // TODO: Needs adding necessary interface methods - mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) - .SetMethod("getMessage", &PWRT::GetMessage); -} - -} // namespace api - -} // namespace atom - - -namespace { - -void Initialize(v8::Local exports, v8::Local unused, - v8::Local context, void* priv) { - LOG(DEBUG) << "PWRT::Initialize"; - v8::Isolate* isolate = context->GetIsolate(); - mate::Dictionary dict(isolate, exports); - // TODO: Expose this attribute only for Tizen web apps - dict.Set("pwrt", atom::api::PWRT::Create(isolate)); -} - -} // namespace - -NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_pwrt, Initialize) diff --git a/atom/browser/api/atom_api_pwrt.h b/atom/browser/api/atom_api_pwrt.h deleted file mode 100644 index 110eac0..0000000 --- a/atom/browser/api/atom_api_pwrt.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ATOM_BROWSER_API_ATOM_API_PWRT_H_ -#define ATOM_BROWSER_API_ATOM_API_PWRT_H_ - -#include "atom/browser/api/trackable_object.h" -#include "base/compiler_specific.h" -#include "native_mate/handle.h" - -namespace atom { - -namespace api { - -class PWRT : public mate::TrackableObject { - public: - static mate::Handle Create(v8::Isolate* isolate); - - static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); - - std::string GetMessage(); - - protected: - explicit PWRT(v8::Isolate* isolate); - ~PWRT() override; - - private: - DISALLOW_COPY_AND_ASSIGN(PWRT); -}; - -} // namespace api - -} // namespace atom - -#endif // ATOM_BROWSER_API_ATOM_API_PWRT_H_ diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index 2a9c057..4c8e82f 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -47,7 +47,6 @@ REFERENCE_MODULE(atom_browser_net); REFERENCE_MODULE(atom_browser_power_monitor); REFERENCE_MODULE(atom_browser_power_save_blocker); REFERENCE_MODULE(atom_browser_protocol); -REFERENCE_MODULE(atom_browser_pwrt); REFERENCE_MODULE(atom_browser_render_process_preferences); REFERENCE_MODULE(atom_browser_session); REFERENCE_MODULE(atom_browser_system_preferences); diff --git a/filenames.gypi b/filenames.gypi index 16fd220..fc6d857 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -29,7 +29,6 @@ 'lib/browser/api/power-monitor.js', 'lib/browser/api/power-save-blocker.js', 'lib/browser/api/protocol.js', - 'lib/browser/api/pwrt.js', 'lib/browser/api/screen.js', 'lib/browser/api/session.js', 'lib/browser/api/system-preferences.js', @@ -136,8 +135,6 @@ 'atom/browser/api/atom_api_power_save_blocker.h', 'atom/browser/api/atom_api_protocol.cc', 'atom/browser/api/atom_api_protocol.h', - 'atom/browser/api/atom_api_pwrt.cc', - 'atom/browser/api/atom_api_pwrt.h', 'atom/browser/api/atom_api_render_process_preferences.cc', 'atom/browser/api/atom_api_render_process_preferences.h', 'atom/browser/api/atom_api_screen.cc', diff --git a/lib/browser/api/module-list.js b/lib/browser/api/module-list.js index fcc07b3..64b2829 100644 --- a/lib/browser/api/module-list.js +++ b/lib/browser/api/module-list.js @@ -21,6 +21,5 @@ module.exports = [ {name: 'Tray', file: 'tray'}, {name: 'webContents', file: 'web-contents'}, // The internal modules, invisible unless you know their names. - {name: 'NavigationController', file: 'navigation-controller', private: true}, - {name: 'pwrt', file: 'pwrt', private: true} + {name: 'NavigationController', file: 'navigation-controller', private: true} ] diff --git a/lib/browser/api/pwrt.js b/lib/browser/api/pwrt.js deleted file mode 100644 index 0019884..0000000 --- a/lib/browser/api/pwrt.js +++ /dev/null @@ -1,3 +0,0 @@ -const {pwrt} = process.atomBinding('pwrt'); - -module.exports = pwrt