Home | History | Annotate | Download | only in browser
      1 // Copyright (c) 2012 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 #ifndef ANDROID_WEBVIEW_BROWSER_SCOPED_ALLOW_WAIT_FOR_LEGACY_WEB_VIEW_API_H
      6 #define ANDROID_WEBVIEW_BROWSER_SCOPED_ALLOW_WAIT_FOR_LEGACY_WEB_VIEW_API_H
      7 
      8 #include "base/threading/thread_restrictions.h"
      9 
     10 // This class is only available when building the chromium back-end for android
     11 // webview: it is required where API backward compatibility demands that the UI
     12 // thread must block waiting on other threads e.g. to obtain a synchronous
     13 // return value. Long term, asynchronous overloads of all such methods will be
     14 // added in the public API, and and no new uses of this will be allowed.
     15 class ScopedAllowWaitForLegacyWebViewApi {
     16  private:
     17   base::ThreadRestrictions::ScopedAllowWait wait;
     18 };
     19 
     20 #endif  // ANDROID_WEBVIEW_BROWSER_SCOPED_ALLOW_WAIT_FOR_LEGACY_WEB_VIEW_API_H
     21