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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_controller_helper.h

Issue 1921403002: Pin apps from prefs on the mash shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only use ChromeMashShelfController with use_ash=1. Created 4 years, 7 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
OLDNEW
(Empty)
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 CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/strings/string16.h"
12
13 class Profile;
14
15 namespace content {
16 class WebContents;
17 }
18
19 // Assists the LauncherController with ExtensionService interaction.
20 class LauncherControllerHelper {
21 public:
22 explicit LauncherControllerHelper(Profile* profile);
23 virtual ~LauncherControllerHelper();
24
25 // Helper function to return the title associated with |app_id|.
26 // Returns an empty title if no matching extension can be found.
27 static base::string16 GetAppTitle(Profile* profile,
28 const std::string& app_id);
29
30 // Returns the app id of the specified tab, or an empty string if there is
31 // no app. All known profiles will be queried for this.
32 virtual std::string GetAppID(content::WebContents* tab);
33
34 // Returns true if |id| is valid for the currently active profile.
35 // Used during restore to ignore no longer valid extensions.
36 // Note that already running applications are ignored by the restore process.
37 virtual bool IsValidIDForCurrentUser(const std::string& id);
38
39 // Sets the currently active profile for the usage of |GetAppID|.
40 virtual void SetCurrentUser(Profile* profile);
41
42 private:
43 Profile* profile_;
44
45 DISALLOW_COPY_AND_ASSIGN(LauncherControllerHelper);
46 };
47
48 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698