| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.android_webview; | 5 package org.chromium.android_webview; |
| 6 | 6 |
| 7 import org.chromium.android_webview.renderer_priority.RendererPriority; | 7 import org.chromium.android_webview.renderer_priority.RendererPriority; |
| 8 import org.chromium.base.annotations.CalledByNative; | 8 import org.chromium.base.annotations.CalledByNative; |
| 9 import org.chromium.base.annotations.JNINamespace; | 9 import org.chromium.base.annotations.JNINamespace; |
| 10 import org.chromium.content.browser.ChildProcessLauncher; | 10 import org.chromium.content.browser.ChildProcessLauncher; |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * Exposes an interface via which native code can manage the priority | 13 * Exposes an interface via which native code can manage the priority |
| 14 * of a renderer process. | 14 * of a renderer process. |
| 15 */ | 15 */ |
| 16 @JNINamespace("android_webview") | 16 @JNINamespace("android_webview") |
| 17 public class AwRendererPriorityManager { | 17 public class AwRendererPriorityManager { |
| 18 @CalledByNative | 18 @CalledByNative |
| 19 private static void setRendererPriority( | 19 private static void setRendererPriority( |
| 20 int pid, @RendererPriority.RendererPriorityEnum int rendererPriority
) { | 20 int pid, @RendererPriority.RendererPriorityEnum int rendererPriority
) { |
| 21 // TODO(tobiasjs): handle RendererPriority.LOW separately from WAIVED. | 21 // TODO(tobiasjs): handle RendererPriority.LOW separately from WAIVED. |
| 22 ChildProcessLauncher.setInForeground(pid, rendererPriority == RendererPr
iority.HIGH); | 22 ChildProcessLauncher.getBindingManager().setInForeground( |
| 23 pid, rendererPriority == RendererPriority.HIGH); |
| 23 } | 24 } |
| 24 } | 25 } |
| OLD | NEW |