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 12 matching lines...) Expand all Loading... |
23 #include "ui/aura/root_window.h" | 23 #include "ui/aura/root_window.h" |
24 #include "ui/aura/window_observer.h" | 24 #include "ui/aura/window_observer.h" |
25 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
26 #include "ui/base/ui_base_paths.h" | 26 #include "ui/base/ui_base_paths.h" |
27 #include "ui/gfx/canvas.h" | 27 #include "ui/gfx/canvas.h" |
28 #include "ui/gfx/compositor/test/compositor_test_support.h" | 28 #include "ui/gfx/compositor/test/compositor_test_support.h" |
29 #include "ui/views/test/test_views_delegate.h" | 29 #include "ui/views/test/test_views_delegate.h" |
30 #include "ui/views/widget/widget.h" | 30 #include "ui/views/widget/widget.h" |
31 #include "ui/views/widget/widget_delegate.h" | 31 #include "ui/views/widget/widget_delegate.h" |
32 | 32 |
| 33 class GURL; |
| 34 |
33 namespace { | 35 namespace { |
34 | 36 |
35 class ShellViewsDelegate : public views::TestViewsDelegate { | 37 class ShellViewsDelegate : public views::TestViewsDelegate { |
36 public: | 38 public: |
37 ShellViewsDelegate() {} | 39 ShellViewsDelegate() {} |
38 virtual ~ShellViewsDelegate() {} | 40 virtual ~ShellViewsDelegate() {} |
39 | 41 |
40 // Overridden from views::TestViewsDelegate: | 42 // Overridden from views::TestViewsDelegate: |
41 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( | 43 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( |
42 views::Widget* widget) OVERRIDE { | 44 views::Widget* widget) OVERRIDE { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 CycleSource source, | 150 CycleSource source, |
149 CycleOrder order) const OVERRIDE { | 151 CycleOrder order) const OVERRIDE { |
150 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer( | 152 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer( |
151 ash::internal::kShellWindowId_DefaultContainer); | 153 ash::internal::kShellWindowId_DefaultContainer); |
152 std::vector<aura::Window*> windows = default_container->children(); | 154 std::vector<aura::Window*> windows = default_container->children(); |
153 // Window cycling expects the topmost window at the front of the list. | 155 // Window cycling expects the topmost window at the front of the list. |
154 std::reverse(windows.begin(), windows.end()); | 156 std::reverse(windows.begin(), windows.end()); |
155 return windows; | 157 return windows; |
156 } | 158 } |
157 | 159 |
| 160 virtual void OpenNewTab(const GURL& url) OVERRIDE { |
| 161 } |
| 162 |
158 virtual void LauncherItemClicked( | 163 virtual void LauncherItemClicked( |
159 const ash::LauncherItem& item) OVERRIDE { | 164 const ash::LauncherItem& item) OVERRIDE { |
160 aura::Window* window = watcher_->GetWindowByID(item.id); | 165 aura::Window* window = watcher_->GetWindowByID(item.id); |
161 window->Show(); | 166 window->Show(); |
162 ash::ActivateWindow(window); | 167 ash::ActivateWindow(window); |
163 } | 168 } |
164 | 169 |
165 virtual int GetBrowserShortcutResourceId() OVERRIDE { | 170 virtual int GetBrowserShortcutResourceId() OVERRIDE { |
166 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; | 171 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; |
167 } | 172 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 window_watcher.reset(); | 222 window_watcher.reset(); |
218 | 223 |
219 ash::Shell::DeleteInstance(); | 224 ash::Shell::DeleteInstance(); |
220 | 225 |
221 aura::RootWindow::DeleteInstance(); | 226 aura::RootWindow::DeleteInstance(); |
222 | 227 |
223 ui::CompositorTestSupport::Terminate(); | 228 ui::CompositorTestSupport::Terminate(); |
224 | 229 |
225 return 0; | 230 return 0; |
226 } | 231 } |
OLD | NEW |