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 #include "ash/test/test_shell_delegate.h" | 5 #include "ash/test/test_shell_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 26 matching lines...) Expand all Loading... | |
37 | 37 |
38 AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { | 38 AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { |
39 return NULL; | 39 return NULL; |
40 } | 40 } |
41 | 41 |
42 std::vector<aura::Window*> TestShellDelegate::GetCycleWindowList( | 42 std::vector<aura::Window*> TestShellDelegate::GetCycleWindowList( |
43 CycleSource source, | 43 CycleSource source, |
44 CycleOrder order) const { | 44 CycleOrder order) const { |
45 // We just use the Shell's default container of windows, so tests can be | 45 // We just use the Shell's default container of windows, so tests can be |
46 // written with the usual CreateTestWindowWithId() calls. But window cycling | 46 // written with the usual CreateTestWindowWithId() calls. But window cycling |
47 // expects the topmost window at the front of the list, so reverse the order. | 47 // expects the topmost window at the front of the list, so reverse the order |
48 // if we are mimicing MRU. | |
James Cook
2012/01/30 22:12:20
nit: mimicing -> mimicking
alicet1
2012/01/30 23:52:53
Done.
| |
48 aura::Window* default_container = Shell::GetInstance()->GetContainer( | 49 aura::Window* default_container = Shell::GetInstance()->GetContainer( |
49 internal::kShellWindowId_DefaultContainer); | 50 internal::kShellWindowId_DefaultContainer); |
50 std::vector<aura::Window*> windows = default_container->children(); | 51 std::vector<aura::Window*> windows = default_container->children(); |
51 std::reverse(windows.begin(), windows.end()); | 52 if (order != ShellDelegate::ORDER_LINEAR) |
53 std::reverse(windows.begin(), windows.end()); | |
52 return windows; | 54 return windows; |
53 } | 55 } |
54 | 56 |
55 void TestShellDelegate::CreateNewWindow() { | 57 void TestShellDelegate::CreateNewWindow() { |
56 } | 58 } |
57 | 59 |
58 void TestShellDelegate::LauncherItemClicked(const LauncherItem& item) { | 60 void TestShellDelegate::LauncherItemClicked(const LauncherItem& item) { |
59 } | 61 } |
60 | 62 |
61 int TestShellDelegate::GetBrowserShortcutResourceId() { | 63 int TestShellDelegate::GetBrowserShortcutResourceId() { |
62 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; | 64 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; |
63 } | 65 } |
64 | 66 |
65 string16 TestShellDelegate::GetLauncherItemTitle(const LauncherItem& item) { | 67 string16 TestShellDelegate::GetLauncherItemTitle(const LauncherItem& item) { |
66 return string16(); | 68 return string16(); |
67 } | 69 } |
68 | 70 |
69 } // namespace test | 71 } // namespace test |
70 } // namespace ash | 72 } // namespace ash |
OLD | NEW |