| 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
| 8 #include "ash/launcher/launcher_model.h" | 8 #include "ash/launcher/launcher_model.h" |
| 9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer( | 150 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer( |
| 151 ash::internal::kShellWindowId_DefaultContainer); | 151 ash::internal::kShellWindowId_DefaultContainer); |
| 152 std::vector<aura::Window*> windows = default_container->children(); | 152 std::vector<aura::Window*> windows = default_container->children(); |
| 153 // Window cycling expects the topmost window at the front of the list. | 153 // Window cycling expects the topmost window at the front of the list. |
| 154 std::reverse(windows.begin(), windows.end()); | 154 std::reverse(windows.begin(), windows.end()); |
| 155 return windows; | 155 return windows; |
| 156 } | 156 } |
| 157 | 157 |
| 158 virtual void LauncherItemClicked( | 158 virtual void LauncherItemClicked( |
| 159 const ash::LauncherItem& item) OVERRIDE { | 159 const ash::LauncherItem& item) OVERRIDE { |
| 160 ash::ActivateWindow(watcher_->GetWindowByID(item.id)); | 160 aura::Window* window = watcher_->GetWindowByID(item.id); |
| 161 window->Show(); |
| 162 ash::ActivateWindow(window); |
| 161 } | 163 } |
| 162 | 164 |
| 163 virtual int GetBrowserShortcutResourceId() OVERRIDE { | 165 virtual int GetBrowserShortcutResourceId() OVERRIDE { |
| 164 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; | 166 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; |
| 165 } | 167 } |
| 166 | 168 |
| 167 virtual string16 GetLauncherItemTitle( | 169 virtual string16 GetLauncherItemTitle( |
| 168 const ash::LauncherItem& item) OVERRIDE { | 170 const ash::LauncherItem& item) OVERRIDE { |
| 169 return watcher_->GetWindowByID(item.id)->title(); | 171 return watcher_->GetWindowByID(item.id)->title(); |
| 170 } | 172 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 window_watcher.reset(); | 217 window_watcher.reset(); |
| 216 | 218 |
| 217 ash::Shell::DeleteInstance(); | 219 ash::Shell::DeleteInstance(); |
| 218 | 220 |
| 219 aura::RootWindow::DeleteInstance(); | 221 aura::RootWindow::DeleteInstance(); |
| 220 | 222 |
| 221 ui::CompositorTestSupport::Terminate(); | 223 ui::CompositorTestSupport::Terminate(); |
| 222 | 224 |
| 223 return 0; | 225 return 0; |
| 224 } | 226 } |
| OLD | NEW |