OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef ASH_TEST_TEST_LAUNCHER_DELEGATE_H_ | |
6 #define ASH_TEST_TEST_LAUNCHER_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 #include <map> | |
10 | |
11 #include "ash/launcher/launcher_delegate.h" | |
12 #include "base/compiler_specific.h" | |
13 | |
14 namespace ash { | |
15 | |
16 class LauncherModel; | |
17 | |
18 namespace test { | |
19 | |
20 class TestLauncherDelegate : public LauncherDelegate { | |
sky
2012/04/11 15:47:49
Add a description.
| |
21 public: | |
22 TestLauncherDelegate(LauncherModel* model); | |
23 | |
24 virtual void CreateNewTab() OVERRIDE; | |
sky
2012/04/11 15:47:49
Style for overriden methods is to prefix section w
| |
25 virtual void CreateNewWindow() OVERRIDE; | |
26 virtual void ItemClicked(const LauncherItem& item) OVERRIDE; | |
27 | |
28 virtual int GetBrowserShortcutResourceId() OVERRIDE; | |
29 | |
30 virtual string16 GetTitle(const LauncherItem& item) OVERRIDE; | |
31 | |
32 virtual ui::MenuModel* CreateContextMenu(const LauncherItem& item) OVERRIDE; | |
33 | |
34 virtual ui::MenuModel* CreateContextMenuForLauncher() OVERRIDE; | |
35 | |
36 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; | |
37 | |
38 void AddLauncherItem(aura::Window* window); | |
39 private: | |
sky
2012/04/11 15:47:49
nit: newline between 38/39.
| |
40 LauncherModel* model_; | |
41 | |
42 typedef std::map<aura::Window*, ash::LauncherID> WindowToID; | |
43 | |
44 // Maps from window to the id we gave it. | |
45 WindowToID window_to_id_; | |
46 }; | |
sky
2012/04/11 15:47:49
DISALLOW_COPY_AND_ASSIGN
| |
47 | |
48 } // namespace test | |
49 } // namespace ash | |
50 | |
51 #endif // ASH_TEST_TEST_LAUNCHER_DELEGATE | |
OLD | NEW |