merge with master
[platform/framework/web/wrt-plugins-common.git] / src / wrt-popup / wrt / popup-bin / wrt-popup.cpp
index 3023302..c1dd04a 100644 (file)
@@ -30,7 +30,6 @@
 
 namespace Wrt {
 namespace Popup {
-
 bool WrtPopup::openPipes()
 {
     Try
@@ -61,8 +60,7 @@ void WrtPopup::closePipes()
 {
     Try
     {
-        if (m_pipesOpened)
-        {
+        if (m_pipesOpened) {
             DPL::WaitableHandleWatchSupport::InheritedContext()->
                 RemoveWaitableHandleWatch(this,
                                           m_input.WaitableReadHandle(),
@@ -78,7 +76,7 @@ void WrtPopup::closePipes()
     }
 }
 
-void WrtPopup::OnEventReceived(const QuitEvent &/* event */)
+void WrtPopup::OnEventReceived(const QuitEvent & /* event */)
 {
     LogDebug("Quiting");
     closePipes();
@@ -88,8 +86,7 @@ void WrtPopup::OnEventReceived(const QuitEvent &/* event */)
 void WrtPopup::OnWaitableHandleEvent(DPL::WaitableHandle waitableHandle,
                                      DPL::WaitMode::Type /*mode*/)
 {
-    if (waitableHandle == m_input.WaitableReadHandle())
-    {
+    if (waitableHandle == m_input.WaitableReadHandle()) {
         readInputData();
     }
 }
@@ -100,7 +97,7 @@ void WrtPopup::readInputData()
         m_input.Read(std::numeric_limits<std::size_t>::max());
     int popupType = PopupSerializer::getIntArg(*data);
     LogDebug("popup type " << popupType);
-    switch(popupType) {
+    switch (popupType) {
     case YES_NO_PROMPT:
         m_popup.reset(new YesNoPopup());
         m_popup->show(data, this);
@@ -131,8 +128,7 @@ void WrtPopup::OnStop()
 
 void WrtPopup::OnCreate()
 {
-    if (!openPipes())
-    {
+    if (!openPipes()) {
         PostEvent(QuitEvent());
     }
     LogInfo("On Create");
@@ -174,7 +170,6 @@ WrtPopup::~WrtPopup()
     Renderer::PopupManagerSingleton::Instance().Deinitialize();
     LogDebug("App Finished");
 }
-
 }
 }