add patch
[framework/osp/web.git] / src / controls / FWebCtrl_WebManager.h
1 //\r
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
3 //\r
4 // Licensed under the Apache License, Version 2.0 (the License);\r
5 // you may not use this file except in compliance with the License.\r
6 // You may obtain a copy of the License at\r
7 //\r
8 //     http://www.apache.org/licenses/LICENSE-2.0\r
9 //\r
10 // Unless required by applicable law or agreed to in writing, software\r
11 // distributed under the License is distributed on an "AS IS" BASIS,\r
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 // See the License for the specific language governing permissions and\r
14 // limitations under the License.\r
15 //\r
16 \r
17 /**\r
18  * @file        FWebCtrl_WebManager.h\r
19  * @brief       This is the header file for the %_WebManager class.\r
20  *\r
21  * This header file contains the declarations of the %_WebManager class.\r
22  */\r
23  \r
24 #ifndef _FWEB_CTRL_INTERNAL_WEB_MANAGER_H_\r
25 #define _FWEB_CTRL_INTERNAL_WEB_MANAGER_H_\r
26 \r
27 #include <unique_ptr.h>\r
28 #include <FBaseColArrayListT.h>\r
29 #include <FBaseColMultiHashMapT.h>\r
30 \r
31 namespace Tizen { namespace Web { namespace Controls\r
32 {\r
33 class _WebImpl;\r
34 class _WebPopup;\r
35 \r
36 class _WebManager\r
37         : public Tizen::Base::Object\r
38 {\r
39 public:\r
40         static _WebManager* GetInstance(void);\r
41         \r
42         result AddWeb(int webAdress);\r
43         result RemoveWeb(int webAdress);\r
44         bool IsValidWeb(int webAdress) const;\r
45 \r
46         result AddCallback(int callerAdress, int callbackAdress);\r
47         result RemoveCallback(int callerAdress, int callbackAdress);\r
48         bool IsValidCallback(int callerAdress, int callbackAdress) const;\r
49 \r
50         void SetActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress);\r
51         void RemoveActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress);\r
52         void SetActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
53         void RemoveActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
54 \r
55 private:\r
56         _WebManager(void);\r
57         _WebManager(const _WebManager& rhs);\r
58         virtual ~_WebManager(void);\r
59         result Construct(void);\r
60         _WebManager& operator=(const _WebManager& rhs);\r
61 \r
62 private:\r
63         std::unique_ptr<Tizen::Base::Collection::ArrayListT< int > > __pWebList;\r
64         std::unique_ptr<Tizen::Base::Collection::MultiHashMapT< int, int > > __pCallbackList;\r
65 \r
66         _WebImpl* __pActiveWeb;\r
67         _WebPopup* __pActivePopup;\r
68 };\r
69 \r
70 } } }\r
71 #endif\r
72 \r
73  \r