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_launcher_delegate.h" | 5 #include "ash/test/test_launcher_delegate.h" |
6 | 6 |
7 #include "ash/launcher/launcher_model.h" | 7 #include "ash/launcher/launcher_model.h" |
8 #include "ash/launcher/launcher_util.h" | 8 #include "ash/launcher/launcher_util.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 observed_windows_.erase(it); | 62 observed_windows_.erase(it); |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 void TestLauncherDelegate::OnBrowserShortcutClicked(int event_flags) { | 66 void TestLauncherDelegate::OnBrowserShortcutClicked(int event_flags) { |
67 } | 67 } |
68 | 68 |
69 void TestLauncherDelegate::ItemClicked(const ash::LauncherItem& item, | 69 void TestLauncherDelegate::ItemClicked(const ash::LauncherItem& item, |
70 const ui::Event& event) { | 70 const ui::Event& event) { |
71 aura::Window* window = GetWindowByID(item.id); | 71 aura::Window* window = GetWindowByID(item.id); |
72 launcher::MoveToEventRootIfPanel(window, event); | 72 if (window->type() == aura::client::WINDOW_TYPE_PANEL) |
| 73 ash::wm::MoveWindowToEventRoot(window, event); |
73 window->Show(); | 74 window->Show(); |
74 ash::wm::ActivateWindow(window); | 75 ash::wm::ActivateWindow(window); |
75 } | 76 } |
76 | 77 |
77 int TestLauncherDelegate::GetBrowserShortcutResourceId() { | 78 int TestLauncherDelegate::GetBrowserShortcutResourceId() { |
78 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; | 79 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; |
79 } | 80 } |
80 | 81 |
81 string16 TestLauncherDelegate::GetTitle(const ash::LauncherItem& item) { | 82 string16 TestLauncherDelegate::GetTitle(const ash::LauncherItem& item) { |
82 aura::Window* window = GetWindowByID(item.id); | 83 aura::Window* window = GetWindowByID(item.id); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } | 122 } |
122 | 123 |
123 void TestLauncherDelegate::OnLauncherCreated(Launcher* launcher) { | 124 void TestLauncherDelegate::OnLauncherCreated(Launcher* launcher) { |
124 } | 125 } |
125 | 126 |
126 void TestLauncherDelegate::OnLauncherDestroyed(Launcher* launcher) { | 127 void TestLauncherDelegate::OnLauncherDestroyed(Launcher* launcher) { |
127 } | 128 } |
128 | 129 |
129 } // namespace test | 130 } // namespace test |
130 } // namespace ash | 131 } // namespace ash |
OLD | NEW |