tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ScreenManagerHelper.java (868B)


      1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
      2 * vim: ts=4 sw=4 expandtab:
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 package org.mozilla.gecko;
      8 
      9 import org.mozilla.gecko.annotation.WrapForJNI;
     10 
     11 class ScreenManagerHelper {
     12 
     13  /** Trigger a refresh of the cached screen information held by Gecko. */
     14  public static void refreshScreenInfo() {
     15    // Screen data is initialised automatically on startup, so no need to queue the call if
     16    // Gecko isn't running yet.
     17    if (GeckoThread.isRunning()) {
     18      nativeRefreshScreenInfo();
     19    }
     20  }
     21 
     22  @WrapForJNI(stubName = "RefreshScreenInfo", dispatchTo = "gecko")
     23  private static native void nativeRefreshScreenInfo();
     24 }