Chromium Code Reviews| Index: android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h |
| diff --git a/android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h b/android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..45e9096133b688a5fca28ecb394f7956f573d5f5 |
| --- /dev/null |
| +++ b/android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h |
| @@ -0,0 +1,20 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
jam
2012/09/05 01:38:22
nit: it doesn't seem necessary to add a header jus
Ted C
2012/09/05 18:45:35
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ANDROID_WEBVIEW_BROWSER_SCOPED_ALLOW_WAIT_FOR_LEGACY_WEB_VIEW_API_H |
| +#define ANDROID_WEBVIEW_BROWSER_SCOPED_ALLOW_WAIT_FOR_LEGACY_WEB_VIEW_API_H |
| + |
| +#include "base/threading/thread_restrictions.h" |
| + |
| +// This class is only available when building the chromium back-end for andriod |
| +// webview: it is required where API backward compatibility demands that the UI |
| +// thread must block waiting on other threads e.g. to obtain a synchronous |
| +// return value. Long term, asynchronous overloads of all such methods will be |
| +// added in the public API, and and no new uses of this will be allowed. |
| +class ScopedAllowWaitForLegacyWebViewApi { |
| + private: |
| + base::ThreadRestrictions::ScopedAllowWait wait; |
| +}; |
| + |
| +#endif // ANDROID_WEBVIEW_BROWSER_SCOPED_ALLOW_WAIT_FOR_LEGACY_WEB_VIEW_API_H |