1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 
17 package android.webkit;
18 
19 /**
20  * This class provides more specific information about why the render process
21  * exited. The application may use this to decide how to handle the situation.
22  **/
23 public abstract class RenderProcessGoneDetail {
24     /**
25      * @deprecated This class should not be constructed by applications.
26      */
27     // TODO(ntfschr): mark this as @SystemApi after a year.
28     @Deprecated
RenderProcessGoneDetail()29     public RenderProcessGoneDetail() {}
30 
31     /**
32      * Indicates whether the render process was observed to crash, or whether
33      * it was killed by the system.
34      *
35      * If the render process was killed, this is most likely caused by the
36      * system being low on memory.
37      *
38      * @return {@code true} if render process crashed, otherwise it was killed by
39      *         system.
40      **/
didCrash()41     public abstract boolean didCrash();
42 
43     /**
44      * Returns the renderer priority that was set at the time that the
45      * renderer exited.  This may be greater than the priority that
46      * any individual {@link WebView} requested using
47      * {@link WebView#setRendererPriorityPolicy}.
48      *
49      * @return the priority of the renderer at exit.
50      **/
51     @WebView.RendererPriority
rendererPriorityAtExit()52     public abstract int rendererPriorityAtExit();
53 }
54