Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / ash / shell / shelf_delegate_impl.h
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 ASH_SHELL_SHELF_DELEGATE_IMPL_H_
6 #define ASH_SHELL_SHELF_DELEGATE_IMPL_H_
7
8 #include "ash/shelf/shelf_delegate.h"
9 #include "base/compiler_specific.h"
10
11 namespace aura {
12 class Window;
13 }
14
15 namespace ash {
16 namespace shell {
17
18 class WindowWatcher;
19
20 class ShelfDelegateImpl : public ShelfDelegate {
21  public:
22   explicit ShelfDelegateImpl(WindowWatcher* watcher);
23   ~ShelfDelegateImpl() override;
24
25   void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; }
26
27   // ShelfDelegate overrides:
28   void OnShelfCreated(Shelf* shelf) override;
29   void OnShelfDestroyed(Shelf* shelf) override;
30   ShelfID GetShelfIDForAppID(const std::string& app_id) override;
31   const std::string& GetAppIDForShelfID(ShelfID id) override;
32   void PinAppWithID(const std::string& app_id) override;
33   bool IsAppPinned(const std::string& app_id) override;
34   bool CanPin() const override;
35   void UnpinAppWithID(const std::string& app_id) override;
36
37  private:
38   // Used to update Launcher. Owned by main.
39   WindowWatcher* watcher_;
40
41   DISALLOW_COPY_AND_ASSIGN(ShelfDelegateImpl);
42 };
43
44 }  // namespace shell
45 }  // namespace ash
46
47 #endif  // ASH_SHELL_SHELF_DELEGATE_IMPL_H_