2 * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef BROWSER_POPUP_TV_H_
18 #define BROWSER_POPUP_TV_H_
20 #include "base/timer/timer.h"
21 #include "electron/shell/browser/native_window_observer.h"
22 #include "wrt/src/browser/popup.h"
26 class PopupTV : public Popup, public electron::NativeWindowObserver {
30 static std::unique_ptr<PopupTV> CreatePopup(Evas_Object* window);
31 static void ShowVoiceRecognitionToast(const std::string& app_title);
32 static void HideVoiceRecognitionToast();
35 void SetButtonType(ButtonType type) override;
37 void HandleEntryKeyDownEvent(const std::string& key);
40 explicit PopupTV(Evas_Object* popup, Evas_Object* box, Evas_Object* window);
43 Evas_Object* AddEntry(const char* id, Popup::EntryType type) override;
44 void SetCheckBox(const std::string& id) override;
45 void ShowInternal(std::unique_ptr<Popup> popup) override;
47 // electron::NativeWindowObserver
48 void OnWindowHide() override;
49 void OnWindowShow() override;
53 base::OneShotTimer timeout_timer_;
54 Evas_Object* window_ = nullptr;
59 #endif // BROWSER_POPUP_TV_H_