app_list_controller_delegate_impl.h revision f2477e01787aa58f445919b809d89e252beef54f
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
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_IMPL_H_
6#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_IMPL_H_
7
8#include "base/compiler_specific.h"
9#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
10
11struct AppLaunchParams;
12class AppListService;
13class Profile;
14
15namespace base {
16class FilePath;
17}
18
19namespace extensions {
20class Extension;
21}
22
23// Primary implementation of AppListControllerDelegate, used by non-Ash
24// platforms.
25class AppListControllerDelegateImpl : public AppListControllerDelegate {
26 public:
27  explicit AppListControllerDelegateImpl(AppListService* service);
28  virtual ~AppListControllerDelegateImpl();
29
30  // AppListControllerDelegate overrides:
31  virtual void DismissView() OVERRIDE;
32  virtual gfx::NativeWindow GetAppListWindow() OVERRIDE;
33  virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
34  virtual bool IsAppPinned(const std::string& extension_id) OVERRIDE;
35  virtual void PinApp(const std::string& extension_id) OVERRIDE;
36  virtual void UnpinApp(const std::string& extension_id) OVERRIDE;
37  virtual Pinnable GetPinnable() OVERRIDE;
38  virtual bool CanDoCreateShortcutsFlow() OVERRIDE;
39  virtual void DoCreateShortcutsFlow(Profile* profile,
40                                     const std::string& extension_id) OVERRIDE;
41  virtual void CreateNewWindow(Profile* profile, bool incognito) OVERRIDE;
42  virtual void ActivateApp(Profile* profile,
43                           const extensions::Extension* extension,
44                           AppListSource source,
45                           int event_flags) OVERRIDE;
46  virtual void LaunchApp(Profile* profile,
47                         const extensions::Extension* extension,
48                         AppListSource source,
49                         int event_flags) OVERRIDE;
50  virtual void ShowForProfileByPath(
51      const base::FilePath& profile_path) OVERRIDE;
52  virtual bool ShouldShowUserIcon() OVERRIDE;
53
54 protected:
55  // Perform platform-specific adjustments of |params| before OpenApplication().
56  virtual void FillLaunchParams(AppLaunchParams* params);
57
58 private:
59  AppListService* service_;
60
61  DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateImpl);
62};
63
64#endif  // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_IMPL_H_
65