OLD | NEW |
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 ASH_TEST_TEST_LAUNCHER_DELEGATE_H_ | 5 #ifndef ASH_TEST_TEST_LAUNCHER_DELEGATE_H_ |
6 #define ASH_TEST_TEST_LAUNCHER_DELEGATE_H_ | 6 #define ASH_TEST_TEST_LAUNCHER_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // Test implementation of LauncherDelegate. | 22 // Test implementation of LauncherDelegate. |
23 // Tests may create icons for windows by calling AddLauncherItem | 23 // Tests may create icons for windows by calling AddLauncherItem |
24 class TestLauncherDelegate : public LauncherDelegate, | 24 class TestLauncherDelegate : public LauncherDelegate, |
25 public aura::WindowObserver { | 25 public aura::WindowObserver { |
26 public: | 26 public: |
27 explicit TestLauncherDelegate(LauncherModel* model); | 27 explicit TestLauncherDelegate(LauncherModel* model); |
28 virtual ~TestLauncherDelegate(); | 28 virtual ~TestLauncherDelegate(); |
29 | 29 |
30 void AddLauncherItem(aura::Window* window); | 30 void AddLauncherItem(aura::Window* window); |
31 void AddLauncherItem(aura::Window* window, LauncherItemStatus status); | |
32 | 31 |
33 static TestLauncherDelegate* instance() { return instance_; } | 32 static TestLauncherDelegate* instance() { return instance_; } |
34 | 33 |
35 // WindowObserver implementation | 34 // WindowObserver implementation |
36 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE; | 35 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE; |
37 | 36 |
38 // LauncherDelegate implementation. | 37 // LauncherDelegate implementation. |
39 virtual void CreateNewTab() OVERRIDE; | 38 virtual void CreateNewTab() OVERRIDE; |
40 virtual void CreateNewWindow() OVERRIDE; | 39 virtual void CreateNewWindow() OVERRIDE; |
41 virtual void ItemClicked(const LauncherItem& item, | 40 virtual void ItemClicked(const LauncherItem& item, |
(...skipping 21 matching lines...) Expand all Loading... |
63 // Parent windows we are watching. | 62 // Parent windows we are watching. |
64 ObservedWindows observed_windows_; | 63 ObservedWindows observed_windows_; |
65 | 64 |
66 DISALLOW_COPY_AND_ASSIGN(TestLauncherDelegate); | 65 DISALLOW_COPY_AND_ASSIGN(TestLauncherDelegate); |
67 }; | 66 }; |
68 | 67 |
69 } // namespace test | 68 } // namespace test |
70 } // namespace ash | 69 } // namespace ash |
71 | 70 |
72 #endif // ASH_TEST_TEST_LAUNCHER_DELEGATE | 71 #endif // ASH_TEST_TEST_LAUNCHER_DELEGATE |
OLD | NEW |