1 /* 2 * Copyright (c) 2020 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_ACELITE_JS_PAGE_STATE_H 17 #define OHOS_ACELITE_JS_PAGE_STATE_H 18 19 #include "js_page_state_machine.h" 20 21 namespace OHOS { 22 namespace ACELite { 23 class State : public MemoryHeap { 24 public: State()25 State() {} ~State()26 virtual ~State() {} 27 virtual void Handle(StateMachine& sm) = 0; 28 }; 29 30 class PageInitState final : public State { 31 void Handle(StateMachine& sm) override; 32 }; 33 34 class PageReadyState final : public State { 35 void Handle(StateMachine& sm) override; 36 }; 37 38 class PageShowState final : public State { 39 void Handle(StateMachine& sm) override; 40 }; 41 42 class PageBackgroundState final : public State { 43 void Handle(StateMachine& sm) override; 44 }; 45 46 class PageDestroyState final : public State { 47 void Handle(StateMachine& sm) override; 48 }; 49 } // namespace ACELite 50 } // namespace OHOS 51 #endif // OHOS_ACELITE_JS_PAGE_STATE_H 52