Change dummy object atspi role
[platform/framework/web/crosswalk-tizen.git] / runtime / browser / runtime.cc
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16
17 #include <app.h>
18 #include <memory>
19 #include <string>
20
21 #include "common/application_data.h"
22 #include "common/command_line.h"
23 #include "runtime/common/constants.h"
24 #include "runtime/browser/runtime.h"
25 #include "runtime/browser/ui_runtime.h"
26 #ifdef IME_FEATURE_SUPPORT
27 #include "runtime/browser/ime_runtime.h"
28 #endif  // IME_FEATURE_SUPPORT
29 #ifdef WATCH_FACE_FEATURE_SUPPORT
30 #include "runtime/browser/watch_runtime.h"
31 #endif  // WATCH_FACE_FEATURE_SUPPORT
32
33 namespace runtime {
34
35 Runtime::~Runtime() {
36 }
37
38 std::unique_ptr<Runtime> Runtime::MakeRuntime(
39     common::ApplicationData* app_data) {
40   if (app_data->app_type() == common::ApplicationData::UI) {
41     return std::unique_ptr<Runtime>(new UiRuntime(app_data));
42   }
43 #ifdef IME_FEATURE_SUPPORT
44   else if (app_data->app_type() == common::ApplicationData::IME) {
45     return std::unique_ptr<Runtime>(new ImeRuntime(app_data));
46   }
47 #endif  // IME_FEATURE_SUPPORT
48 #ifdef WATCH_FACE_FEATURE_SUPPORT
49   else if (app_data->app_type() == common::ApplicationData::WATCH) {
50     return std::unique_ptr<Runtime>(new WatchRuntime(app_data));
51   }
52 #endif  // WATCH_FACE_FEATURE_SUPPORT
53   else {
54     return std::unique_ptr<Runtime>(new UiRuntime(app_data));
55   }
56 }
57
58
59 }  // namespace runtime