Utilize the window.speechSynthesis.onvoiceschanged event in ChromeVox.
[chromium-blink-merge.git] / ash / test / test_shelf_delegate.h
blob78fe5e539dad4becd9c63ab3922f9294809d5506
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.
5 #ifndef ASH_TEST_TEST_SHELF_DELEGATE_H_
6 #define ASH_TEST_TEST_SHELF_DELEGATE_H_
8 #include <map>
9 #include <set>
11 #include "ash/shelf/shelf_delegate.h"
12 #include "base/compiler_specific.h"
13 #include "ui/aura/window_observer.h"
15 namespace ash {
17 class ShelfModel;
19 namespace test {
21 // Test implementation of ShelfDelegate.
22 // Tests may create icons for windows by calling AddShelfItem().
23 class TestShelfDelegate : public ShelfDelegate, public aura::WindowObserver {
24 public:
25 explicit TestShelfDelegate(ShelfModel* model);
26 virtual ~TestShelfDelegate();
28 void AddShelfItem(aura::Window* window);
29 void AddShelfItem(aura::Window* window, ShelfItemStatus status);
30 void RemoveShelfItemForWindow(aura::Window* window);
32 static TestShelfDelegate* instance() { return instance_; }
34 // WindowObserver implementation
35 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
36 virtual void OnWindowHierarchyChanging(
37 const HierarchyChangeParams& params) OVERRIDE;
39 // ShelfDelegate implementation.
40 virtual void OnShelfCreated(Shelf* shelf) OVERRIDE;
41 virtual void OnShelfDestroyed(Shelf* shelf) OVERRIDE;
42 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) OVERRIDE;
43 virtual const std::string& GetAppIDForShelfID(ShelfID id) OVERRIDE;
44 virtual void PinAppWithID(const std::string& app_id) OVERRIDE;
45 virtual bool CanPin() const OVERRIDE;
46 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE;
47 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE;
49 private:
50 static TestShelfDelegate* instance_;
52 ShelfModel* model_;
54 DISALLOW_COPY_AND_ASSIGN(TestShelfDelegate);
57 } // namespace test
58 } // namespace ash
60 #endif // ASH_TEST_TEST_SHELF_DELEGATE_H_