| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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.android_webview; |
| 6 |
| 7 import org.chromium.android_webview.renderer_priority.RendererPriority; |
| 8 import org.chromium.base.annotations.CalledByNative; |
| 9 import org.chromium.base.annotations.JNINamespace; |
| 10 import org.chromium.content.browser.ChildProcessLauncher; |
| 11 |
| 12 /** |
| 13 * Exposes an interface via which native code can manage the priority |
| 14 * of a renderer process. |
| 15 */ |
| 16 @JNINamespace("android_webview") |
| 17 public class AwRendererPriorityManager { |
| 18 @CalledByNative |
| 19 private static void setRendererPriority( |
| 20 int pid, @RendererPriority.RendererPriorityEnum int rendererPriority
) { |
| 21 // TODO(tobiasjs): handle RendererPriority.LOW separately from WAIVED. |
| 22 ChildProcessLauncher.setInForeground(pid, rendererPriority == RendererPr
iority.HIGH); |
| 23 } |
| 24 } |
| OLD | NEW |