1 // Copyright 2014 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #include <Elementary.h>
9 #include <ewk_context.h>
10 #include <ewk_settings.h>
13 #include <efl_extension.h>
20 #include "tizen/system_info.h"
23 static std::string kDefaultNewWindowURL = "http://www.google.com";
24 static double kMinViewScale = 1.0;
25 static double kMaxViewScale = 4.0;
26 static int kNotificationTimeoutSec = 3;
29 WindowUI::WindowUI(Window& window, Browser& browser)
34 , is_loading_(false) {
35 navbar_ = elm_box_add(window_.GetEvasObject());
36 elm_box_horizontal_set(navbar_, EINA_TRUE);
37 elm_box_homogeneous_set(navbar_, EINA_TRUE);
38 evas_object_size_hint_weight_set(navbar_, EVAS_HINT_EXPAND, 0.0f);
39 evas_object_size_hint_align_set(navbar_, EVAS_HINT_FILL, EVAS_HINT_FILL);
41 AddButton(navbar_, "file", "New Window", &WindowUI::OnCreateWindow);
42 if (browser_.IsDesktop())
43 AddButton(navbar_, "file", "New Incognito Window",
44 &WindowUI::OnCreateIncognitoWindow);
45 back_button_ = AddButton(navbar_, "arrow_left", "Back", &WindowUI::OnBack);
46 forward_button_ = AddButton(navbar_, "arrow_right", "Forward",
47 &WindowUI::OnForward);
48 stop_reload_button_ = AddButton(navbar_, "refresh", "Reload",
49 &WindowUI::OnStopOrReload);
50 AddButton(navbar_, "arrow_up", "More Actions",
51 &WindowUI::OnShowExtraActionsMenu);
53 urlbar_ = elm_box_add(window_.GetEvasObject());
54 elm_box_horizontal_set(urlbar_, EINA_TRUE);
55 evas_object_size_hint_weight_set(urlbar_, EVAS_HINT_EXPAND, 0.0f);
56 evas_object_size_hint_align_set(urlbar_, EVAS_HINT_FILL, EVAS_HINT_FILL);
58 progress_bar_ = elm_progressbar_add(window_.GetEvasObject());
59 elm_object_style_set(progress_bar_, "wheel");
60 elm_progressbar_pulse_set(progress_bar_, EINA_TRUE);
61 elm_progressbar_pulse(progress_bar_, EINA_FALSE);
62 elm_box_pack_end(urlbar_, progress_bar_);
63 evas_object_show(progress_bar_);
65 url_entry_ = elm_entry_add(urlbar_);
66 elm_entry_single_line_set(url_entry_, EINA_TRUE);
67 elm_entry_scrollable_set(url_entry_, EINA_TRUE);
68 elm_entry_input_panel_layout_set(url_entry_, ELM_INPUT_PANEL_LAYOUT_URL);
69 evas_object_size_hint_weight_set(url_entry_, EVAS_HINT_EXPAND, 1.0f);
70 evas_object_size_hint_align_set(url_entry_, EVAS_HINT_FILL, EVAS_HINT_FILL);
71 evas_object_smart_callback_add(url_entry_, "activated", OnURLEntered, this);
72 elm_box_pack_end(urlbar_, url_entry_);
73 evas_object_show(url_entry_);
75 Evas_Object* separator = elm_separator_add(urlbar_);
76 elm_separator_horizontal_set(separator, EINA_TRUE);
77 elm_box_pack_end(urlbar_, separator);
78 evas_object_show(separator);
81 eext_object_event_callback_add(window_.GetEvasObject(), EEXT_CALLBACK_BACK, WindowUI::OnBack, this);
84 EnableBackButton(false);
85 EnableForwardButton(false);
88 WindowUI::~WindowUI() {
90 evas_object_del(active_popup_);
93 void WindowUI::OnURLChanged(const char* url) {
94 log_trace("%s: %s", __PRETTY_FUNCTION__, url);
95 elm_object_text_set(url_entry_, url);
98 void WindowUI::OnLoadingStarted() {
99 log_trace("%s", __PRETTY_FUNCTION__);
100 elm_progressbar_pulse(progress_bar_, EINA_TRUE);
101 Evas_Object* icon = elm_object_part_content_get(stop_reload_button_, "icon");
102 elm_icon_standard_set(icon, "close");
103 if (browser_.IsDesktop())
104 elm_object_text_set(stop_reload_button_, "Stop");
108 void WindowUI::OnLoadingFinished() {
109 log_trace("%s", __PRETTY_FUNCTION__);
110 elm_progressbar_pulse(progress_bar_, EINA_FALSE);
111 Evas_Object* icon = elm_object_part_content_get(stop_reload_button_, "icon");
112 elm_icon_standard_set(icon, "refresh");
113 if (browser_.IsDesktop())
114 elm_object_text_set(stop_reload_button_, "Reload");
118 void WindowUI::EnableBackButton(bool enable) {
119 elm_object_disabled_set(back_button_, !enable);
122 void WindowUI::EnableForwardButton(bool enable) {
123 elm_object_disabled_set(forward_button_, !enable);
126 void WindowUI::ShowNotification(const char* text) {
127 log_trace("%s : %s", __PRETTY_FUNCTION__, text);
128 Evas_Object* notification = elm_notify_add(window_.GetEvasObject());
129 elm_notify_timeout_set(notification, kNotificationTimeoutSec);
130 Evas_Object* content = elm_label_add(notification);
131 elm_object_text_set(content, text);
132 elm_object_content_set(notification, content);
133 elm_notify_align_set(notification, 0.5, 0.5);
134 evas_object_show(notification);
137 Evas_Object* WindowUI::AddButton(Evas_Object* parent,
138 const char* icon, const char* label, Evas_Smart_Cb cb) {
139 Evas_Object* bt = elm_button_add(parent);
140 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
141 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0.5);
142 if (label && browser_.IsDesktop())
143 elm_object_text_set(bt, label);
145 Evas_Object* icon_elm = elm_icon_add(bt);
146 elm_icon_standard_set(icon_elm, icon);
147 elm_object_part_content_set(bt, "icon", icon_elm);
149 evas_object_smart_callback_add(bt, "clicked", cb, this);
150 elm_box_pack_end(parent, bt);
151 evas_object_show(bt);
158 void _HideCtxPopup(void* data, Evas_Object* obj, void*) {
159 evas_object_hide(obj);
164 void WindowUI::CloseMenu() {
165 evas_object_hide(menu_);
166 evas_object_del(menu_);
170 Evas_Object* WindowUI::CreateExtraActionsMenu(Evas_Object* parent) {
175 menu_ = elm_ctxpopup_add(parent);
177 if (IsMobileProfile() || IsWearableProfile()) {
179 evas_object_geometry_get(parent, 0, 0, &width, 0);
180 evas_object_size_hint_min_set(menu_, width, 0);
183 evas_object_smart_callback_add(menu_, "dismissed", _HideCtxPopup, NULL);
185 if (window_.IsFormProfileEnabled()) {
186 elm_ctxpopup_item_append(menu_, "Disable Form Profile", NULL,
187 &WindowUI::OnFormProfileChange, this);
189 elm_ctxpopup_item_append(menu_, "Enable Form Profile", NULL,
190 &WindowUI::OnFormProfileChange, this);
193 if (window_.IsRememberFormDataEnabled()) {
194 elm_ctxpopup_item_append(menu_, "Disable Remember Form Data", NULL,
195 &WindowUI::OnRememberFormDataChange, this);
197 elm_ctxpopup_item_append(menu_, "Enable Remember Form Data", NULL,
198 &WindowUI::OnRememberFormDataChange, this);
201 if (window_.IsRememberPasswordEnabled()) {
202 elm_ctxpopup_item_append(menu_, "Disable Remember Password", NULL,
203 &WindowUI::OnRememberPasswordChange, this);
205 elm_ctxpopup_item_append(menu_, "Enable Remember Password", NULL,
206 &WindowUI::OnRememberPasswordChange, this);
209 elm_ctxpopup_item_append(menu_, "Override User Agent String", NULL,
210 &WindowUI::OnUAOverride, this);
212 if (browser_.IsDesktop()) {
213 elm_ctxpopup_item_append(menu_, "Show Web Inspector", NULL,
214 &WindowUI::OnInspectorShow, this);
216 elm_ctxpopup_item_append(menu_, "Start Web Inspector server", NULL,
217 &WindowUI::OnInspectorServerStart, this);
219 #if !defined(OS_TIZEN)
220 elm_ctxpopup_item_append(menu_, "Simulate screen rotation", NULL,
221 &WindowUI::OnRotate, this);
224 if (window_.AreTouchEventsEnabled()) {
225 elm_ctxpopup_item_append(menu_, "Enable mouse events", NULL,
226 &WindowUI::OnSelectMouseInput, this);
228 elm_ctxpopup_item_append(menu_, "Enable touch events", NULL,
229 &WindowUI::OnSelectTouchInput, this);
232 if (!browser_.IsTracingEnabled()) {
233 elm_ctxpopup_item_append(menu_, "Start tracing", NULL,
234 &WindowUI::OnStartTracing, this);
236 elm_ctxpopup_item_append(menu_, "Stop tracing", NULL,
237 &WindowUI::OnStopTracing, this);
240 Ewk_Settings* settings = window_.GetEwkSettings();
241 if (!ewk_settings_auto_fitting_get(settings)) {
242 elm_ctxpopup_item_append(menu_, "Enable auto fitting", NULL,
243 &WindowUI::OnAutoFittingEnabled, this);
245 elm_ctxpopup_item_append(menu_, "Disable auto fitting", NULL,
246 &WindowUI::OnAutoFittingDisabled, this);
249 if (!ewk_settings_form_profile_data_enabled_get(settings) ||
250 !ewk_settings_form_candidate_data_enabled_get(settings)) {
251 elm_ctxpopup_item_append(menu_, "Enable autofill", NULL,
252 &WindowUI::OnAutoFillEnabled, this);
254 elm_ctxpopup_item_append(menu_, "Disable autofill", NULL,
255 &WindowUI::OnAutoFillDisabled, this);
258 elm_ctxpopup_item_append(menu_, "Change page zoom level", NULL,
259 &WindowUI::OnShowZoomPopup, this);
261 elm_ctxpopup_item_append(menu_, "Quit", NULL, &WindowUI::Exit, this);
266 void WindowUI::ShowPermissionPopup(const char* title,
267 const char* description, PermissionCallback cb, void* data) {
268 log_trace("%s: (%s, %s)", __PRETTY_FUNCTION__, title, description);
270 Evas_Object* popup = elm_popup_add(window_.GetEvasObject());
271 elm_object_part_text_set(popup, "title,text", title);
272 elm_object_part_text_set(popup, NULL, description);
273 elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);
274 active_popup_ = popup;
276 Evas_Object* btn = elm_button_add(popup);
277 elm_object_text_set(btn, "Yes");
278 PermissionPopupButtonData* buttonData = new PermissionPopupButtonData;
279 buttonData->callbackData=data;
280 buttonData->callback=cb;
281 buttonData->popupData=this;
283 evas_object_smart_callback_add(btn, "clicked", PermissionGranted,
285 elm_object_part_content_set(popup, "button1", btn);
287 btn = elm_button_add(popup);
288 elm_object_text_set(btn, "No");
289 evas_object_smart_callback_add(btn, "clicked", PermissionDeclined,
291 elm_object_part_content_set(popup, "button2", btn);
293 evas_object_show(popup);
296 void WindowUI::PermissionGranted(void* data, Evas_Object* button, void*) {
297 log_trace("%s", __PRETTY_FUNCTION__);
299 PermissionPopupButtonData* buttonData =(PermissionPopupButtonData*) data;
300 ClosePopup(buttonData->popupData, NULL, NULL);
301 buttonData->callback(true, buttonData->callbackData);
305 void WindowUI::PermissionDeclined(void* data, Evas_Object* button, void*) {
306 log_trace("%s", __PRETTY_FUNCTION__);
308 PermissionPopupButtonData* buttonData =(PermissionPopupButtonData*) data;
309 ClosePopup(buttonData->popupData, NULL, NULL);
310 buttonData->callback(false, buttonData->callbackData);
314 void WindowUI::ShowTextEntryPopup(const char* title,
315 const char* initial_content,
317 log_trace("%s: (%s, %s)", __PRETTY_FUNCTION__, title, initial_content);
319 Evas_Object* popup = elm_popup_add(window_.GetEvasObject());
320 elm_object_part_text_set(popup, "title,text", title);
321 elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);
322 active_popup_ = popup;
324 Evas_Object* entry = elm_entry_add(popup);
325 elm_entry_single_line_set(entry, EINA_TRUE);
326 elm_entry_scrollable_set(entry, EINA_TRUE);
327 elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_URL);
328 evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0.0f);
329 evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
330 evas_object_smart_callback_add(
331 entry, "activated", cb,
332 new std::pair<Evas_Object*, WindowUI*>(entry, this));
334 elm_object_part_content_set(popup, "default", entry);
335 if (initial_content) {
336 elm_object_text_set(entry, initial_content);
337 elm_entry_cursor_end_set(entry);
340 Evas_Object* btn = elm_button_add(popup);
341 elm_object_text_set(btn, "OK");
342 evas_object_smart_callback_add(
343 btn, "clicked", cb, new std::pair<Evas_Object*, WindowUI*>(entry, this));
344 elm_object_part_content_set(popup, "button1", btn);
346 btn = elm_button_add(popup);
347 elm_object_text_set(btn, "Cancel");
348 evas_object_smart_callback_add(btn, "clicked", ClosePopup, this);
349 elm_object_part_content_set(popup, "button2", btn);
351 evas_object_show(popup);
354 void WindowUI::OnCreateWindow(void* data, Evas_Object*, void*) {
355 log_trace("%s", __PRETTY_FUNCTION__);
356 WindowUI* thiz = static_cast<WindowUI*>(data);
357 if (thiz->browser_.IsDesktop()) {
358 thiz->browser_.CreateWindow().LoadURL(kDefaultNewWindowURL);
360 thiz->browser_.ActivateToolboxWindow();
364 void WindowUI::OnCreateIncognitoWindow(void* data, Evas_Object*, void*) {
365 log_trace("%s", __PRETTY_FUNCTION__);
366 WindowUI* thiz = static_cast<WindowUI*>(data);
367 thiz->browser_.CreateWindow(true).LoadURL(kDefaultNewWindowURL);
370 void WindowUI::OnBack(void* data, Evas_Object*, void*) {
371 log_trace("%s", __PRETTY_FUNCTION__);
372 static_cast<WindowUI*>(data)->window_.Back();
375 void WindowUI::OnForward(void* data, Evas_Object*, void*) {
376 log_trace("%s", __PRETTY_FUNCTION__);
377 static_cast<WindowUI*>(data)->window_.Forward();
380 void WindowUI::OnStopOrReload(void* data, Evas_Object*, void*) {
381 log_trace("%s", __PRETTY_FUNCTION__);
382 WindowUI* thiz = static_cast<WindowUI*>(data);
383 if (thiz->is_loading_)
384 thiz->window_.Stop();
386 thiz->window_.Reload();
389 void WindowUI::OnShowExtraActionsMenu(void* data, Evas_Object* obj, void*) {
390 log_trace("%s", __PRETTY_FUNCTION__);
391 WindowUI* thiz = static_cast<WindowUI*>(data);
392 Evas_Object* popup = thiz->CreateExtraActionsMenu(
393 thiz->window_.GetEvasObject());
399 evas_object_geometry_get(obj, &x, &y, 0, 0);
400 evas_object_move(popup, x, y);
401 evas_object_show(popup);
404 void WindowUI::OnURLEntered(void* data, Evas_Object*, void*) {
405 log_trace("%s", __PRETTY_FUNCTION__);
406 WindowUI* thiz = static_cast<WindowUI*>(data);
407 thiz->window_.LoadURL(elm_object_text_get(thiz->url_entry_));
408 elm_object_focus_set(thiz->url_entry_, EINA_FALSE);
411 void WindowUI::OnUAOverride(void* data, Evas_Object* obj, void*) {
412 log_trace("%s", __PRETTY_FUNCTION__);
413 WindowUI* thiz = static_cast<WindowUI*>(data);
414 const char* ua = thiz->window_.GetUserAgent();
415 thiz->ShowTextEntryPopup("User Agent Override", ua,
416 &WindowUI::OnUAOverrideEntered);
420 void WindowUI::OnUAOverrideEntered(void* data, Evas_Object*, void*) {
421 std::pair<Evas_Object*, WindowUI*>* p =
422 static_cast<std::pair<Evas_Object*, WindowUI*>*>(data);
423 p->second->window_.SetUserAgent(elm_object_text_get(p->first));
424 evas_object_del(p->second->active_popup_);
425 p->second->active_popup_ = NULL;
429 void WindowUI::OnInspectorShow(void* data, Evas_Object* obj, void*) {
430 log_trace("%s", __PRETTY_FUNCTION__);
431 WindowUI* thiz = static_cast<WindowUI*>(data);
432 thiz->browser_.ShowInspectorWindow();
436 void WindowUI::OnInspectorServerStart(void* data, Evas_Object* obj, void*) {
437 log_trace("%s", __PRETTY_FUNCTION__);
438 WindowUI* thiz = static_cast<WindowUI*>(data);
439 thiz->browser_.StartInspectorServer();
443 void WindowUI::OnRotate(void* data, Evas_Object* obj, void*) {
444 log_trace("%s", __PRETTY_FUNCTION__);
445 WindowUI* thiz = static_cast<WindowUI*>(data);
446 thiz->window_.FakeRotate();
450 void WindowUI::OnSelectMouseInput(void* data, Evas_Object* obj, void*) {
451 log_trace("%s", __PRETTY_FUNCTION__);
452 WindowUI* thiz = static_cast<WindowUI*>(data);
453 thiz->window_.EnableTouchEvents(false);
454 thiz->window_.EnableMouseEvents(true);
455 thiz->ShowNotification("Mouse events enabled");
459 void WindowUI::OnSelectTouchInput(void* data, Evas_Object* obj, void*) {
460 log_trace("%s", __PRETTY_FUNCTION__);
461 WindowUI* thiz = static_cast<WindowUI*>(data);
462 thiz->window_.EnableTouchEvents(true);
463 thiz->window_.EnableMouseEvents(false);
464 thiz->ShowNotification("Touch events enabled");
468 void WindowUI::OnStartTracing(void* data, Evas_Object* obj, void*) {
469 log_trace("%s", __PRETTY_FUNCTION__);
470 WindowUI* thiz = static_cast<WindowUI*>(data);
471 thiz->browser_.StartTracing();
473 thiz->ShowNotification("Tracing started");
476 void WindowUI::OnStopTracing(void* data, Evas_Object* obj, void*) {
477 log_trace("%s", __PRETTY_FUNCTION__);
478 WindowUI* thiz = static_cast<WindowUI*>(data);
479 thiz->browser_.StopTracing();
481 thiz->ShowNotification("Tracing finished");
484 void WindowUI::OnAutoFittingEnabled(void* data, Evas_Object* obj, void*) {
485 log_trace("%s", __PRETTY_FUNCTION__);
486 WindowUI* thiz = static_cast<WindowUI*>(data);
487 Ewk_Settings* settings = thiz->window_.GetEwkSettings();
488 ewk_settings_auto_fitting_set(settings, true);
490 thiz->ShowNotification("Auto fitting enabled");
493 void WindowUI::OnAutoFittingDisabled(void* data, Evas_Object* obj, void*) {
494 log_trace("%s", __PRETTY_FUNCTION__);
495 WindowUI* thiz = static_cast<WindowUI*>(data);
496 Ewk_Settings* settings = thiz->window_.GetEwkSettings();
497 ewk_settings_auto_fitting_set(settings, false);
499 thiz->ShowNotification("Auto fitting disabled");
502 void WindowUI::OnAutoFillEnabled(void* data, Evas_Object* obj, void*) {
503 log_trace("%s", __PRETTY_FUNCTION__);
504 WindowUI* thiz = static_cast<WindowUI*>(data);
505 Ewk_Settings* settings = thiz->window_.GetEwkSettings();
506 ewk_settings_form_profile_data_enabled_set(settings, true);
507 ewk_settings_form_candidate_data_enabled_set(settings, true);
509 thiz->ShowNotification("Autofill enabled");
512 void WindowUI::OnAutoFillDisabled(void* data, Evas_Object* obj, void*) {
513 log_trace("%s", __PRETTY_FUNCTION__);
514 WindowUI* thiz = static_cast<WindowUI*>(data);
515 Ewk_Settings* settings = thiz->window_.GetEwkSettings();
516 ewk_settings_form_profile_data_enabled_set(settings, false);
517 ewk_settings_form_candidate_data_enabled_set(settings, false);
519 thiz->ShowNotification("Autofill disabled");
522 void WindowUI::ClosePopup(void* data, Evas_Object*, void*) {
523 WindowUI* thiz = static_cast<WindowUI*>(data);
524 evas_object_del(thiz->active_popup_);
525 thiz->active_popup_ = NULL;
528 void WindowUI::OnShowZoomPopup(void* data, Evas_Object* obj, void*) {
529 log_trace("%s", __PRETTY_FUNCTION__);
530 WindowUI* thiz = static_cast<WindowUI*>(data);
532 Evas_Object* popup = elm_popup_add(thiz->window_.GetEvasObject());
533 elm_object_part_text_set(popup, "title,text", "Change page zoom level");
534 elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);
535 thiz->active_popup_ = popup;
536 Evas_Object* btn = elm_button_add(popup);
538 Evas_Object* slider = elm_slider_add(popup);
539 thiz->window_.GetScaleRange(&kMinViewScale, &kMaxViewScale);
540 elm_slider_min_max_set(slider, kMinViewScale, kMaxViewScale);
541 elm_slider_value_set(slider, thiz->window_.GetScale());
542 elm_slider_indicator_format_set(slider, "%1.2f");
543 elm_slider_indicator_show_set(slider, EINA_TRUE);
544 evas_object_smart_callback_add(slider, "changed", &OnZoomChanged, thiz);
545 elm_object_part_content_set(popup, "default", slider);
547 elm_object_text_set(btn, "Close");
548 evas_object_smart_callback_add(btn, "clicked", ClosePopup, thiz);
549 elm_object_part_content_set(popup, "button1", btn);
551 evas_object_show(popup);
555 void WindowUI::OnZoomChanged(void* data, Evas_Object* obj, void*) {
556 log_trace("%s", __PRETTY_FUNCTION__);
557 WindowUI* thiz = static_cast<WindowUI*>(data);
558 thiz->window_.SetScale(elm_slider_value_get(obj));
561 void WindowUI::OnRememberFormDataChange(void* data, Evas_Object* obj, void*) {
562 log_trace("%s", __PRETTY_FUNCTION__);
563 WindowUI* thiz = static_cast<WindowUI*>(data);
564 Ewk_Settings* settings = thiz->window_.GetEwkSettings();
565 if (thiz->window_.IsRememberFormDataEnabled()) {
566 ewk_settings_form_candidate_data_enabled_set(settings, false);
567 thiz->ShowNotification("Remember Form Data disabled");
569 ewk_settings_form_candidate_data_enabled_set(settings, true);
570 thiz->ShowNotification("Remember Form Data enabled");
575 void WindowUI::OnRememberPasswordChange(void* data, Evas_Object* obj, void*) {
576 log_trace("%s", __PRETTY_FUNCTION__);
577 WindowUI* thiz = static_cast<WindowUI*>(data);
578 Ewk_Settings* settings = thiz->window_.GetEwkSettings();
579 if (thiz->window_.IsRememberPasswordEnabled()) {
580 ewk_settings_autofill_password_form_enabled_set(settings, false);
581 thiz->ShowNotification("Remember Password disabled");
583 ewk_settings_autofill_password_form_enabled_set(settings, true);
584 thiz->ShowNotification("Remember Password enabled");
589 void WindowUI::OnFormProfileChange(void* data, Evas_Object* obj, void*) {
590 log_trace("%s", __PRETTY_FUNCTION__);
591 WindowUI* thiz = static_cast<WindowUI*>(data);
592 Ewk_Settings* settings = thiz->window_.GetEwkSettings();
593 if (thiz->window_.IsFormProfileEnabled()) {
594 ewk_settings_form_profile_data_enabled_set(settings, false);
595 thiz->ShowNotification("Form Profile disabled");
597 ewk_settings_form_profile_data_enabled_set(settings, true);
598 thiz->ShowNotification("Form Profile enabled");
603 void WindowUI::Exit(void* data, Evas_Object*, void*) {
604 WindowUI* thiz = static_cast<WindowUI*>(data);
605 thiz->window_.Exit();