Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: ash/test/test_launcher_delegate.cc

Issue 12093075: Move the panel to the root window where the mouse click occurred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/test/test_launcher_delegate.h ('k') | ash/wm/panel_layout_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/wm/window_util.h" 9 #include "ash/wm/window_util.h"
9 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
10 #include "grit/ash_resources.h" 11 #include "grit/ash_resources.h"
11 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
12 13
13 namespace ash { 14 namespace ash {
14 namespace test { 15 namespace test {
15 16
16 TestLauncherDelegate* TestLauncherDelegate::instance_ = NULL; 17 TestLauncherDelegate* TestLauncherDelegate::instance_ = NULL;
17 18
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (it != observed_windows_.end()) { 57 if (it != observed_windows_.end()) {
57 window->parent()->RemoveObserver(this); 58 window->parent()->RemoveObserver(this);
58 observed_windows_.erase(it); 59 observed_windows_.erase(it);
59 } 60 }
60 } 61 }
61 62
62 void TestLauncherDelegate::OnBrowserShortcutClicked(int event_flags) { 63 void TestLauncherDelegate::OnBrowserShortcutClicked(int event_flags) {
63 } 64 }
64 65
65 void TestLauncherDelegate::ItemClicked(const ash::LauncherItem& item, 66 void TestLauncherDelegate::ItemClicked(const ash::LauncherItem& item,
66 int event_flags) { 67 const ui::Event& event) {
67 aura::Window* window = GetWindowByID(item.id); 68 aura::Window* window = GetWindowByID(item.id);
69 launcher::MoveToEventRootIfPanel(window, event);
68 window->Show(); 70 window->Show();
69 ash::wm::ActivateWindow(window); 71 ash::wm::ActivateWindow(window);
70 } 72 }
71 73
72 int TestLauncherDelegate::GetBrowserShortcutResourceId() { 74 int TestLauncherDelegate::GetBrowserShortcutResourceId() {
73 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; 75 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT;
74 } 76 }
75 77
76 string16 TestLauncherDelegate::GetTitle(const ash::LauncherItem& item) { 78 string16 TestLauncherDelegate::GetTitle(const ash::LauncherItem& item) {
77 aura::Window* window = GetWindowByID(item.id); 79 aura::Window* window = GetWindowByID(item.id);
(...skipping 27 matching lines...) Expand all
105 } 107 }
106 return NULL; 108 return NULL;
107 } 109 }
108 110
109 bool TestLauncherDelegate::IsDraggable(const ash::LauncherItem& item) { 111 bool TestLauncherDelegate::IsDraggable(const ash::LauncherItem& item) {
110 return true; 112 return true;
111 } 113 }
112 114
113 } // namespace test 115 } // namespace test
114 } // namespace ash 116 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_launcher_delegate.h ('k') | ash/wm/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698