| OLD | NEW |
| (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 |
| 12 class Profile; |
| 13 |
| 14 namespace content { |
| 15 class WebContents; |
| 16 } |
| 17 |
| 18 // Assists the LauncherController with ExtensionService interaction. |
| 19 class LauncherControllerHelper { |
| 20 public: |
| 21 explicit LauncherControllerHelper(Profile* profile); |
| 22 virtual ~LauncherControllerHelper(); |
| 23 |
| 24 // Returns the app id of the specified tab, or an empty string if there is |
| 25 // no app. All known profiles will be queried for this. |
| 26 virtual std::string GetAppID(content::WebContents* tab); |
| 27 |
| 28 // Returns true if |id| is valid for the currently active profile. |
| 29 // Used during restore to ignore no longer valid extensions. |
| 30 // Note that already running applications are ignored by the restore process. |
| 31 virtual bool IsValidIDForCurrentUser(const std::string& id); |
| 32 |
| 33 // Sets the currently active profile for the usage of |GetAppID|. |
| 34 virtual void SetCurrentUser(Profile* profile); |
| 35 |
| 36 private: |
| 37 Profile* profile_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(LauncherControllerHelper); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_ |
| OLD | NEW |