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

Side by Side Diff: ash/launcher/launcher.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 | « no previous file | ash/launcher/launcher_delegate.h » ('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/launcher/launcher.h" 5 #include "ash/launcher/launcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/focus_cycler.h" 10 #include "ash/focus_cycler.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 views::View::ConvertPointToScreen(launcher_view_, &screen_origin); 354 views::View::ConvertPointToScreen(launcher_view_, &screen_origin);
355 return gfx::Rect(screen_origin.x() + bounds.x(), 355 return gfx::Rect(screen_origin.x() + bounds.x(),
356 screen_origin.y() + bounds.y(), 356 screen_origin.y() + bounds.y(),
357 bounds.width(), 357 bounds.width(),
358 bounds.height()); 358 bounds.height());
359 } 359 }
360 360
361 void Launcher::ActivateLauncherItem(int index) { 361 void Launcher::ActivateLauncherItem(int index) {
362 const ash::LauncherItems& items = 362 const ash::LauncherItems& items =
363 launcher_view_->model()->items(); 363 launcher_view_->model()->items();
364 delegate_->ItemClicked(items[index], ui::EF_NONE); 364 ui::MouseEvent event(ui::ET_MOUSE_PRESSED,
365 gfx::Point(),
366 gfx::Point(),
367 ui::EF_NONE);
368 delegate_->ItemClicked(items[index], event);
365 } 369 }
366 370
367 void Launcher::CycleWindowLinear(CycleDirection direction) { 371 void Launcher::CycleWindowLinear(CycleDirection direction) {
368 int item_index = GetNextActivatedItemIndex( 372 int item_index = GetNextActivatedItemIndex(
369 *(launcher_view_->model()), direction); 373 *(launcher_view_->model()), direction);
370 if (item_index >= 0) 374 if (item_index >= 0)
371 ActivateLauncherItem(item_index); 375 ActivateLauncherItem(item_index);
372 } 376 }
373 377
374 void Launcher::AddIconObserver(LauncherIconObserver* observer) { 378 void Launcher::AddIconObserver(LauncherIconObserver* observer) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } else { 444 } else {
441 delegate_view_->GetFocusManager()->ClearFocus(); 445 delegate_view_->GetFocusManager()->ClearFocus();
442 } 446 }
443 } 447 }
444 448
445 internal::LauncherView* Launcher::GetLauncherViewForTest() { 449 internal::LauncherView* Launcher::GetLauncherViewForTest() {
446 return launcher_view_; 450 return launcher_view_;
447 } 451 }
448 452
449 } // namespace ash 453 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698