Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwRendererPriorityManager.java

Issue 2650753002: Implement renderer importance API for WebView (Closed)
Patch Set: clean up unused local Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698