1 // Copyright 2020 The Chromium Authors. 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.
4 
5 package org.chromium.components.page_info;
6 
7 import org.chromium.components.embedder_support.browser_context.BrowserContextHandle;
8 
9 /**
10  * Interface for a page info main page controller.
11  */
12 public interface PageInfoMainController {
13     /**
14      * Launches the PageInfoSubpage provided by |pageInfoCookiesController|.
15      * @param controller The controller providing a PageInfoSubpage.
16      */
launchSubpage(PageInfoSubpageController controller)17     void launchSubpage(PageInfoSubpageController controller);
18 
19     /**
20      * Switches back to the main page info view.
21      */
exitSubpage()22     void exitSubpage();
23 
24     /**
25      * Record a user action.
26      *
27      * @param action The action to record.
28      */
recordAction(@ageInfoAction int action)29     void recordAction(@PageInfoAction int action);
30 
31     /**
32      * Refreshes the permissions of the page info.
33      */
refreshPermissions()34     void refreshPermissions();
35 
36     /**
37      * @return A BrowserContext for this dialog.
38      */
getBrowserContext()39     BrowserContextHandle getBrowserContext();
40 }
41