summaryrefslogtreecommitdiffstats
path: root/apps/app_launcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_launcher.h')
-rw-r--r--apps/app_launcher.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/apps/app_launcher.h b/apps/app_launcher.h
new file mode 100644
index 0000000..b6bbed3
--- /dev/null
+++ b/apps/app_launcher.h
@@ -0,0 +1,38 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_APPS_APP_LAUNCHER_H_
+#define CHROME_APPS_APP_LAUNCHER_H_
+
+#include "base/basictypes.h"
+#include "base/callback_forward.h"
+
+class PrefRegistrySimple;
+
+namespace apps {
+
+// Called on the UI thread after determining if the launcher is enabled. A
+// boolean flag is passed, which is true if the app launcher is enabled.
+typedef base::Callback<void(bool)> OnAppLauncherEnabledCompleted;
+
+// A synchronous check to determine if the app launcher is enabled. If the
+// registry needs to be determined to find an accurate answer, this function
+// will NOT do so; instead if will default to false (the app launcher is not
+// enabled).
+// This function does not use the cached preference of whether the launcher
+// was enabled or not.
+bool MaybeIsAppLauncherEnabled();
+
+// Determine whether the app launcher is enabled or not. This may involve a trip
+// to a blocking thread. |completion_callback| is called when an answer is
+// ready. This needs to be called on the UI thread.
+void GetIsAppLauncherEnabled(
+ const OnAppLauncherEnabledCompleted& completion_callback);
+
+// Returns whether the app launcher was enabled the last time it was checked.
+bool WasAppLauncherEnabled();
+
+} // namespace extensions
+
+#endif // CHROME_APPS_APP_LAUNCHER_H_