app_list: Suppress repeated over scroll animations.
[chromium-blink-merge.git] / apps / app_launcher.h
blobb6bbed3801f49ef42cd0713bcc77f92c4262e7d7
1 // Copyright 2013 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.
5 #ifndef CHROME_APPS_APP_LAUNCHER_H_
6 #define CHROME_APPS_APP_LAUNCHER_H_
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
11 class PrefRegistrySimple;
13 namespace apps {
15 // Called on the UI thread after determining if the launcher is enabled. A
16 // boolean flag is passed, which is true if the app launcher is enabled.
17 typedef base::Callback<void(bool)> OnAppLauncherEnabledCompleted;
19 // A synchronous check to determine if the app launcher is enabled. If the
20 // registry needs to be determined to find an accurate answer, this function
21 // will NOT do so; instead if will default to false (the app launcher is not
22 // enabled).
23 // This function does not use the cached preference of whether the launcher
24 // was enabled or not.
25 bool MaybeIsAppLauncherEnabled();
27 // Determine whether the app launcher is enabled or not. This may involve a trip
28 // to a blocking thread. |completion_callback| is called when an answer is
29 // ready. This needs to be called on the UI thread.
30 void GetIsAppLauncherEnabled(
31 const OnAppLauncherEnabledCompleted& completion_callback);
33 // Returns whether the app launcher was enabled the last time it was checked.
34 bool WasAppLauncherEnabled();
36 } // namespace extensions
38 #endif // CHROME_APPS_APP_LAUNCHER_H_