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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_controller_helper.h

Issue 1951523002: Add basic support for launching mash shelf pinned apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only LaunchItem with no windows; otherwise kNoAction (for CreateApplicationMenu). Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/launcher_controller_helper.h
diff --git a/chrome/browser/ui/ash/launcher/launcher_controller_helper.h b/chrome/browser/ui/ash/launcher/launcher_controller_helper.h
index 002b193b911120188ac5345e450df27962eb70d7..864ff0924d085f7e750c22b4c7a73e4c6082627f 100644
--- a/chrome/browser/ui/ash/launcher/launcher_controller_helper.h
+++ b/chrome/browser/ui/ash/launcher/launcher_controller_helper.h
@@ -5,11 +5,15 @@
#ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
#define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
+#include <memory>
#include <string>
#include "base/macros.h"
#include "base/strings/string16.h"
+#include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h"
+#include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
+class ExtensionEnableFlow;
class Profile;
namespace content {
@@ -17,10 +21,10 @@ class WebContents;
}
// Assists the LauncherController with ExtensionService interaction.
-class LauncherControllerHelper {
+class LauncherControllerHelper : public ExtensionEnableFlowDelegate {
public:
explicit LauncherControllerHelper(Profile* profile);
- virtual ~LauncherControllerHelper();
+ ~LauncherControllerHelper() override;
// Helper function to return the title associated with |app_id|.
// Returns an empty title if no matching extension can be found.
@@ -39,8 +43,17 @@ class LauncherControllerHelper {
// Sets the currently active profile for the usage of |GetAppID|.
virtual void SetCurrentUser(Profile* profile);
+ void LaunchApp(const std::string& app_id,
+ ash::LaunchSource source,
+ int event_flags);
+
private:
+ // ExtensionEnableFlowDelegate:
+ void ExtensionEnableFlowFinished() override;
+ void ExtensionEnableFlowAborted(bool user_initiated) override;
+
Profile* profile_;
+ std::unique_ptr<ExtensionEnableFlow> extension_enable_flow_;
DISALLOW_COPY_AND_ASSIGN(LauncherControllerHelper);
};

Powered by Google App Engine
This is Rietveld 408576698