2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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
8 * http://www.tizenopensource.org/license
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.
18 #ifndef BROWSER_CLASS_H
19 #define BROWSER_CLASS_H
21 #include "browser-config.h"
22 #include "browser-view.h"
24 class Browser_Geolocation;
25 class Browser_Network_Manager;
26 class Browser_Policy_Decision_Maker;
29 class Browser_User_Agent_DB;
33 Browser_Class(Evas_Object *win, Evas_Object *navi_bar, Evas_Object *bg);
37 Eina_Bool launch(const char *url, Eina_Bool new_window = EINA_FALSE);
40 Eina_Bool is_app_in_app(void);
42 #if defined(HORIZONTAL_UI)
43 void rotate(int degree);
44 Eina_Bool is_available_to_rotate(void);
47 Browser_Window *create_new_window(Eina_Bool created_by_user = EINA_FALSE);
48 void delete_window(Browser_Window *delete_window, Browser_Window *parent);
49 void delete_window(Browser_Window *window);
50 void change_order(std::vector<Browser_Window *> window_list);
51 std::vector<Browser_Window *> get_window_list(void) { return m_window_list; }
52 void set_focused_window(Browser_Window *window
53 #if defined(FEATURE_MOST_VISITED_SITES)
54 , Eina_Bool show_most_visited_sites = EINA_TRUE
60 void ewk_view_init(Evas_Object *ewk_view);
61 void ewk_view_deinit(Evas_Object *ewk_view);
62 std::string get_user_agent(void);
63 void clean_up_windows(void);
64 Browser_Window *create_deleted_window(int index);
65 Browser_Geolocation *get_geolocation(void) { return m_geolocation; }
67 static Eina_Bool __create_network_manager_idler_cb(void *data);
68 Eina_Bool _set_ewk_view_options(Evas_Object *ewk_view);
69 Eina_Bool _set_ewk_view_options_listener(void);
70 Eina_Bool _set_user_agent(Evas_Object *ewk_view);
71 /* prefernece changed callback functions */
72 static void __preference_changed_cb(const char *key, void *data);
73 /* vconf changed callback functions */
74 static void __vconf_changed_cb(keynode_t *keynode, void *data);
75 Eina_Bool _set_http_accepted_language_header(Evas_Object *ewk_view);
77 /* Ecore timer callback functions */
78 static Eina_Bool __clean_up_windows_timer_cb(void *data);
81 Evas_Object *m_navi_bar;
84 Browser_View *m_browser_view;
85 Browser_Window *m_focused_window;
86 Browser_User_Agent_DB *m_user_agent_db;
87 Browser_Policy_Decision_Maker *m_download_policy;
88 Browser_Geolocation *m_geolocation;
89 Browser_Network_Manager *m_network_manager;
91 std::vector<Browser_Window *> m_window_list;
92 Ecore_Timer *m_clean_up_windows_timer;
94 #endif /* BROWSER_CLASS_H */