Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: apps/app_launcher.h

Issue 13940006: Remove --show-app-list-shortcut flag and implement new app launcher enable logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make start menu shortcut creation happen on enable Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | apps/app_launcher.cc » ('j') | apps/pref_names.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef APPS_APP_LAUNCHER_H_ 5 #ifndef APPS_APP_LAUNCHER_H_
6 #define APPS_APP_LAUNCHER_H_ 6 #define APPS_APP_LAUNCHER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 9
10 namespace apps { 10 namespace apps {
11 11
12 // Called on the UI thread after determining if the launcher is enabled. A 12 // Called on the UI thread after determining if the launcher is enabled. A
13 // boolean flag is passed, which is true if the app launcher is enabled. 13 // boolean flag is passed, which is true if the app launcher is enabled.
14 typedef base::Callback<void(bool)> OnAppLauncherEnabledCompleted; 14 typedef base::Callback<void(bool)> OnAppLauncherEnabledCompleted;
15 15
16 // TODO(calamity): Remove all the "uncertain" apis because windows app launcher
17 // enabled is now just a single pref that we can check synchronously and with
18 // confidence. This includes changing GetIsAppLauncherEnabled to a synchronous
19 // API.
20
16 // A synchronous check to determine if the app launcher is enabled. If the 21 // A synchronous check to determine if the app launcher is enabled. If the
17 // registry needs to be determined to find an accurate answer, this function 22 // registry needs to be determined to find an accurate answer, this function
18 // will NOT do so; instead if will default to false (the app launcher is not 23 // will NOT do so; instead if will default to false (the app launcher is not
19 // enabled). 24 // enabled).
20 // This function does not use the cached preference of whether the launcher 25 // This function does not use the cached preference of whether the launcher
21 // was enabled or not. 26 // was enabled or not.
22 bool MaybeIsAppLauncherEnabled(); 27 bool MaybeIsAppLauncherEnabled();
23 28
24 // Determine whether the app launcher is enabled or not. This may involve a trip 29 // Determine whether the app launcher is enabled or not. This may involve a trip
25 // to a blocking thread. |completion_callback| is called when an answer is 30 // to a blocking thread. |completion_callback| is called when an answer is
26 // ready. This needs to be called on the UI thread. 31 // ready. This needs to be called on the UI thread.
27 void GetIsAppLauncherEnabled( 32 void GetIsAppLauncherEnabled(
28 const OnAppLauncherEnabledCompleted& completion_callback); 33 const OnAppLauncherEnabledCompleted& completion_callback);
29 34
30 // Returns whether the app launcher was enabled the last time it was checked. 35 // Returns whether the app launcher was enabled the last time it was checked.
31 bool WasAppLauncherEnabled(); 36 bool WasAppLauncherEnabled();
32 37
33 } // namespace apps 38 } // namespace apps
34 39
35 #endif // APPS_APP_LAUNCHER_H_ 40 #endif // APPS_APP_LAUNCHER_H_
OLDNEW
« no previous file with comments | « no previous file | apps/app_launcher.cc » ('j') | apps/pref_names.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698