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_delegate.h" | 8 #include "ash/launcher/launcher_delegate.h" |
9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
10 #include "ash/launcher/launcher_types.h" | 10 #include "ash/launcher/launcher_types.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 virtual void Exit() OVERRIDE { | 177 virtual void Exit() OVERRIDE { |
178 MessageLoopForUI::current()->Quit(); | 178 MessageLoopForUI::current()->Quit(); |
179 } | 179 } |
180 | 180 |
181 virtual ash::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE { | 181 virtual ash::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE { |
182 return ash::shell::CreateAppListViewDelegate(); | 182 return ash::shell::CreateAppListViewDelegate(); |
183 } | 183 } |
184 | 184 |
185 std::vector<aura::Window*> GetCycleWindowList( | 185 std::vector<aura::Window*> GetCycleWindowList( |
186 CycleSource source, | 186 CycleSource source) const OVERRIDE { |
187 CycleOrder order) const OVERRIDE { | |
188 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer( | 187 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer( |
189 ash::internal::kShellWindowId_DefaultContainer); | 188 ash::internal::kShellWindowId_DefaultContainer); |
190 std::vector<aura::Window*> windows = default_container->children(); | 189 std::vector<aura::Window*> windows = default_container->children(); |
191 // Window cycling expects the topmost window at the front of the list. | 190 // Window cycling expects the topmost window at the front of the list. |
192 std::reverse(windows.begin(), windows.end()); | 191 std::reverse(windows.begin(), windows.end()); |
193 return windows; | 192 return windows; |
194 } | 193 } |
195 | 194 |
196 virtual void StartPartialScreenshot( | 195 virtual void StartPartialScreenshot( |
197 ash::ScreenshotDelegate* screenshot_delegate) OVERRIDE { | 196 ash::ScreenshotDelegate* screenshot_delegate) OVERRIDE { |
198 ash::PartialScreenshotView::StartPartialScreenshot(screenshot_delegate); | 197 ash::PartialScreenshotView::StartPartialScreenshot(screenshot_delegate); |
199 } | 198 } |
200 | 199 |
201 virtual ash::LauncherDelegate* CreateLauncherDelegate( | 200 virtual ash::LauncherDelegate* CreateLauncherDelegate( |
202 ash::LauncherModel* model) OVERRIDE { | 201 ash::LauncherModel* model) OVERRIDE { |
203 launcher_delegate_ = new LauncherDelegateImpl(watcher_); | 202 launcher_delegate_ = new LauncherDelegateImpl(watcher_); |
204 return launcher_delegate_; | 203 return launcher_delegate_; |
205 } | 204 } |
206 | 205 |
207 virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate( | 206 virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate( |
208 ash::SystemTray* tray) { | 207 ash::SystemTray* tray) { |
209 return NULL; | 208 return NULL; |
210 } | 209 } |
211 | 210 |
212 virtual bool GetOverrideWindowMode( | |
213 ash::Shell::WindowMode* window_mode) OVERRIDE { | |
214 return false; | |
215 } | |
216 | |
217 private: | 211 private: |
218 // Used to update Launcher. Owned by main. | 212 // Used to update Launcher. Owned by main. |
219 WindowWatcher* watcher_; | 213 WindowWatcher* watcher_; |
220 | 214 |
221 LauncherDelegateImpl* launcher_delegate_; | 215 LauncherDelegateImpl* launcher_delegate_; |
222 | 216 |
223 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); | 217 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); |
224 }; | 218 }; |
225 | 219 |
226 } // namespace | 220 } // namespace |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 window_watcher.reset(); | 257 window_watcher.reset(); |
264 | 258 |
265 ash::Shell::DeleteInstance(); | 259 ash::Shell::DeleteInstance(); |
266 | 260 |
267 aura::Env::DeleteInstance(); | 261 aura::Env::DeleteInstance(); |
268 | 262 |
269 ui::CompositorTestSupport::Terminate(); | 263 ui::CompositorTestSupport::Terminate(); |
270 | 264 |
271 return 0; | 265 return 0; |
272 } | 266 } |
OLD | NEW |