projects
/
platform
/
framework
/
web
/
web-provider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Release] livebox.web-provider-1.18
[platform/framework/web/web-provider.git]
/
src
/
Core
/
BoxManager.cpp
diff --git
a/src/Core/BoxManager.cpp
b/src/Core/BoxManager.cpp
index
047ff7a
..
28efcca
100644
(file)
--- a/
src/Core/BoxManager.cpp
+++ b/
src/Core/BoxManager.cpp
@@
-1,11
+1,11
@@
/*
* Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
*
/*
* Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the
Apache License, Version 2.0
(the "License");
+ * Licensed under the
Flora License, Version 1.1
(the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://
www.apache.org/licenses/LICENSE-2.0
+ * http://
floralicense.org/license/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@
-65,7
+65,9
@@
bool BoxManager::doCommand(const request_cmd_type type, const BoxInfoPtr& boxInf
result = requestPauseAll();
break;
case REQUEST_CMD_OPEN_PD:
result = requestPauseAll();
break;
case REQUEST_CMD_OPEN_PD:
- result = requestOpenPd(boxInfo->instanceId, boxInfo->pdWidth, boxInfo->pdHeight);
+ result = requestOpenPd(boxInfo->instanceId,
+ boxInfo->pdWidth, boxInfo->pdHeight,
+ boxInfo->pdX, boxInfo->pdY);
break;
case REQUEST_CMD_CLOSE_PD:
result = requestClosePd(boxInfo->instanceId);
break;
case REQUEST_CMD_CLOSE_PD:
result = requestClosePd(boxInfo->instanceId);
@@
-73,6
+75,9
@@
bool BoxManager::doCommand(const request_cmd_type type, const BoxInfoPtr& boxInf
case REQUEST_CMD_CHANGE_PERIOD:
result = requestChangePeriod(boxInfo->instanceId, boxInfo->period);
break;
case REQUEST_CMD_CHANGE_PERIOD:
result = requestChangePeriod(boxInfo->instanceId, boxInfo->period);
break;
+ case REQUEST_CMD_UPDATE_BOX:
+ result = requestUpdateBox(boxInfo->instanceId);
+ break;
default:
LogD("not available request type");
break;
default:
LogD("not available request type");
break;
@@
-154,14
+159,17
@@
bool BoxManager::requestPauseBox(std::string& instanceId)
return false;
}
return false;
}
- return box->pause();
+ // paused by switching other page
+ return box->pause(false);
}
bool BoxManager::requestResumeAll()
{
LogD("enter");
for (auto it = m_boxMap.begin(); it != m_boxMap.end(); it++) {
}
bool BoxManager::requestResumeAll()
{
LogD("enter");
for (auto it = m_boxMap.begin(); it != m_boxMap.end(); it++) {
- it->second->resume();
+ if (it->second->isCurrentTab()) {
+ it->second->resume();
+ }
}
return true;
}
return true;
@@
-171,13
+179,18
@@
bool BoxManager::requestPauseAll()
{
LogD("enter");
for (auto it = m_boxMap.begin(); it != m_boxMap.end(); it++) {
{
LogD("enter");
for (auto it = m_boxMap.begin(); it != m_boxMap.end(); it++) {
- it->second->pause();
+ if (it->second->isCurrentTab()) {
+ // paused by entering background
+ it->second->pause(true);
+ }
}
return true;
}
}
return true;
}
-bool BoxManager::requestOpenPd(std::string& instanceId, int width, int height)
+bool BoxManager::requestOpenPd(
+ std::string& instanceId,
+ int width, int height, double x, double y)
{
LogD("enter");
IBoxPtr box = searchBoxMap(instanceId);
{
LogD("enter");
IBoxPtr box = searchBoxMap(instanceId);
@@
-185,7
+198,7
@@
bool BoxManager::requestOpenPd(std::string& instanceId, int width, int height)
return false;
}
return false;
}
- return box->openPd(width, height);
+ return box->openPd(width, height
, x, y
);
}
bool BoxManager::requestClosePd(std::string& instanceId)
}
bool BoxManager::requestClosePd(std::string& instanceId)
@@
-210,6
+223,17
@@
bool BoxManager::requestChangePeriod(std::string& instanceId, float period)
return box->changePeriod(period);
}
return box->changePeriod(period);
}
+bool BoxManager::requestUpdateBox(std::string& instanceId)
+{
+ LogD("enter");
+ IBoxPtr box = searchBoxMap(instanceId);
+ if (!box) {
+ return false;
+ }
+
+ return box->update();
+}
+
void BoxManager::insertBoxMap(std::string& instanceId, IBoxPtr box)
{
if (!searchBoxMap(instanceId)) {
void BoxManager::insertBoxMap(std::string& instanceId, IBoxPtr box)
{
if (!searchBoxMap(instanceId)) {