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.
5 #ifndef ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_
6 #define ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_
8 #include "ash/launcher/launcher_delegate.h"
9 #include "base/compiler_specific.h"
20 class LauncherDelegateImpl
: public ash::LauncherDelegate
{
22 explicit LauncherDelegateImpl(WindowWatcher
* watcher
);
23 virtual ~LauncherDelegateImpl();
25 void set_watcher(WindowWatcher
* watcher
) { watcher_
= watcher
; }
27 // LauncherDelegate overrides:
28 virtual void ItemSelected(const ash::LauncherItem
& item
,
29 const ui::Event
& event
) OVERRIDE
;
30 virtual base::string16
GetTitle(const ash::LauncherItem
& item
) OVERRIDE
;
31 virtual ui::MenuModel
* CreateContextMenu(
32 const ash::LauncherItem
& item
,
33 aura::RootWindow
* root
) OVERRIDE
;
34 virtual ash::LauncherMenuModel
* CreateApplicationMenu(
35 const ash::LauncherItem
&,
36 int event_flags
) OVERRIDE
;
37 virtual ash::LauncherID
GetIDByWindow(aura::Window
* window
) OVERRIDE
;
38 virtual bool IsDraggable(const ash::LauncherItem
& item
) OVERRIDE
;
39 virtual bool ShouldShowTooltip(const LauncherItem
& item
) OVERRIDE
;
40 virtual void OnLauncherCreated(Launcher
* launcher
) OVERRIDE
;
41 virtual void OnLauncherDestroyed(Launcher
* launcher
) OVERRIDE
;
42 virtual bool IsPerAppLauncher() OVERRIDE
;
43 virtual LauncherID
GetLauncherIDForAppID(const std::string
& app_id
) OVERRIDE
;
44 virtual void PinAppWithID(const std::string
& app_id
) OVERRIDE
;
45 virtual bool IsAppPinned(const std::string
& app_id
) OVERRIDE
;
46 virtual void UnpinAppsWithID(const std::string
& app_id
) OVERRIDE
;
49 // Used to update Launcher. Owned by main.
50 WindowWatcher
* watcher_
;
52 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateImpl
);
58 #endif // ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_