1 /*
2  * Copyright (c) 2023 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 FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_NAVIGATION_INNER_NAVIGATION_CONTROLLER_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_NAVIGATION_INNER_NAVIGATION_CONTROLLER_H
18 
19 #include "base/memory/ace_type.h"
20 #include "interfaces/inner_api/ace/navigation_controller.h"
21 
22 namespace OHOS {
23 namespace Ace {
24 namespace NG {
25 class NavigationPattern;
26 }
27 
28 /**
29  * @class InnerNavigationController
30  */
31 class InnerNavigationController : public OHOS::Ace::NavigationController {
32 public:
33     explicit InnerNavigationController(const WeakPtr<NG::NavigationPattern>& pattern, int32_t containerId);
34     bool IsNavDestinationInTopStack() override;
35     int32_t GetTopHandle() override;
36     void SetInPIPMode(int32_t handle) override;
37     void PopInPIP(bool destroy = false) override;
38     void PushInPIP(int32_t handle) override;
39     void DeletePIPMode(int32_t handle) override;
40 
41 private:
42     WeakPtr<NG::NavigationPattern> weakNavigationPattern_;
43     int32_t containerId_;
44 };
45 } // namespace Ace
46 } // namespace OHOS
47 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_NAVIGATION_INNER_NAVIGATION_CONTROLLER_H
48