Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: ash/test/test_launcher_delegate.h

Issue 71653003: ash: Rename LauncherModel to ShelfModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome changes Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/test/shell_test_api.cc ('k') | ash/test/test_launcher_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "ash/launcher/launcher_delegate.h" 11 #include "ash/launcher/launcher_delegate.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "ui/aura/window_observer.h" 13 #include "ui/aura/window_observer.h"
14 14
15 namespace ash { 15 namespace ash {
16 16
17 class LauncherModel; 17 class ShelfModel;
18 18
19 namespace test { 19 namespace test {
20 20
21 // Test implementation of LauncherDelegate. 21 // Test implementation of LauncherDelegate.
22 // Tests may create icons for windows by calling AddLauncherItem 22 // Tests may create icons for windows by calling AddLauncherItem
23 class TestLauncherDelegate : public LauncherDelegate, 23 class TestLauncherDelegate : public LauncherDelegate,
24 public aura::WindowObserver { 24 public aura::WindowObserver {
25 public: 25 public:
26 explicit TestLauncherDelegate(LauncherModel* model); 26 explicit TestLauncherDelegate(ShelfModel* model);
27 virtual ~TestLauncherDelegate(); 27 virtual ~TestLauncherDelegate();
28 28
29 void AddLauncherItem(aura::Window* window); 29 void AddLauncherItem(aura::Window* window);
30 void AddLauncherItem(aura::Window* window, LauncherItemStatus status); 30 void AddLauncherItem(aura::Window* window, LauncherItemStatus status);
31 void RemoveLauncherItemForWindow(aura::Window* window); 31 void RemoveLauncherItemForWindow(aura::Window* window);
32 32
33 static TestLauncherDelegate* instance() { return instance_; } 33 static TestLauncherDelegate* instance() { return instance_; }
34 34
35 // WindowObserver implementation 35 // WindowObserver implementation
36 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 36 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
(...skipping 10 matching lines...) Expand all
47 virtual bool CanPin() const OVERRIDE; 47 virtual bool CanPin() const OVERRIDE;
48 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; 48 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE;
49 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE; 49 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE;
50 50
51 private: 51 private:
52 typedef std::map<aura::Window*, ash::LauncherID> WindowToID; 52 typedef std::map<aura::Window*, ash::LauncherID> WindowToID;
53 typedef std::set<aura::Window*> ObservedWindows; 53 typedef std::set<aura::Window*> ObservedWindows;
54 54
55 static TestLauncherDelegate* instance_; 55 static TestLauncherDelegate* instance_;
56 56
57 LauncherModel* model_; 57 ShelfModel* model_;
58 58
59 // Maps from window to the id we gave it. 59 // Maps from window to the id we gave it.
60 WindowToID window_to_id_; 60 WindowToID window_to_id_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(TestLauncherDelegate); 62 DISALLOW_COPY_AND_ASSIGN(TestLauncherDelegate);
63 }; 63 };
64 64
65 } // namespace test 65 } // namespace test
66 } // namespace ash 66 } // namespace ash
67 67
68 #endif // ASH_TEST_TEST_LAUNCHER_DELEGATE_H_ 68 #endif // ASH_TEST_TEST_LAUNCHER_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/test/shell_test_api.cc ('k') | ash/test/test_launcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698