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

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

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address comments. Created 4 years, 2 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 // Returns the app id of the specified tab, or an empty string if there is 35 // Returns the app id of the specified tab, or an empty string if there is
36 // no app. All known profiles will be queried for this. 36 // no app. All known profiles will be queried for this.
37 virtual std::string GetAppID(content::WebContents* tab); 37 virtual std::string GetAppID(content::WebContents* tab);
38 38
39 // Returns true if |id| is valid for the currently active profile. 39 // Returns true if |id| is valid for the currently active profile.
40 // Used during restore to ignore no longer valid extensions. 40 // Used during restore to ignore no longer valid extensions.
41 // Note that already running applications are ignored by the restore process. 41 // Note that already running applications are ignored by the restore process.
42 virtual bool IsValidIDForCurrentUser(const std::string& id) const; 42 virtual bool IsValidIDForCurrentUser(const std::string& id) const;
43 43
44 // Sets the currently active profile for the usage of |GetAppID|.
45 virtual void SetCurrentUser(Profile* profile);
46
47 void LaunchApp(const std::string& app_id, 44 void LaunchApp(const std::string& app_id,
48 ash::LaunchSource source, 45 ash::LaunchSource source,
49 int event_flags); 46 int event_flags);
50 47
51 virtual ArcAppListPrefs* GetArcAppListPrefs() const; 48 virtual ArcAppListPrefs* GetArcAppListPrefs() const;
52 49
53 Profile* profile() { return profile_; } 50 Profile* profile() { return profile_; }
54 const Profile* profile() const { return profile_; } 51 const Profile* profile() const { return profile_; }
52 void set_profile(Profile* profile) { profile_ = profile; }
55 53
56 private: 54 private:
57 // ExtensionEnableFlowDelegate: 55 // ExtensionEnableFlowDelegate:
58 void ExtensionEnableFlowFinished() override; 56 void ExtensionEnableFlowFinished() override;
59 void ExtensionEnableFlowAborted(bool user_initiated) override; 57 void ExtensionEnableFlowAborted(bool user_initiated) override;
60 58
59 // The currently active profile for the usage of |GetAppID|.
61 Profile* profile_; 60 Profile* profile_;
62 std::unique_ptr<ExtensionEnableFlow> extension_enable_flow_; 61 std::unique_ptr<ExtensionEnableFlow> extension_enable_flow_;
63 62
64 DISALLOW_COPY_AND_ASSIGN(LauncherControllerHelper); 63 DISALLOW_COPY_AND_ASSIGN(LauncherControllerHelper);
65 }; 64 };
66 65
67 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_ 66 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTROLLER_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | chrome/browser/ui/ash/launcher/launcher_controller_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698