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

Side by Side Diff: ash/launcher/launcher_view.cc

Issue 10916180: Context menus on view elements should be positioned above the finger when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 3 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/shell/window_type_launcher.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/launcher/launcher_view.h" 5 #include "ash/launcher/launcher_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/app_list_button.h" 9 #include "ash/launcher/app_list_button.h"
10 #include "ash/launcher/launcher_button.h" 10 #include "ash/launcher/launcher_button.h"
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 AutoReset<LauncherID> reseter( 1052 AutoReset<LauncherID> reseter(
1053 &context_menu_id_, 1053 &context_menu_id_,
1054 view_index == -1 ? 0 : model_->items()[view_index].id); 1054 view_index == -1 ? 0 : model_->items()[view_index].id);
1055 views::MenuModelAdapter menu_model_adapter(menu_model.get()); 1055 views::MenuModelAdapter menu_model_adapter(menu_model.get());
1056 launcher_menu_runner_.reset( 1056 launcher_menu_runner_.reset(
1057 new views::MenuRunner(menu_model_adapter.CreateMenu())); 1057 new views::MenuRunner(menu_model_adapter.CreateMenu()));
1058 // NOTE: if you convert to HAS_MNEMONICS be sure and update menu building 1058 // NOTE: if you convert to HAS_MNEMONICS be sure and update menu building
1059 // code. 1059 // code.
1060 if (launcher_menu_runner_->RunMenuAt( 1060 if (launcher_menu_runner_->RunMenuAt(
1061 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), 1061 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
1062 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) 1062 views::MenuItemView::TOPLEFT, views::MenuRunner::CONTEXT_MENU) ==
1063 views::MenuRunner::MENU_DELETED)
1063 return; 1064 return;
1064 1065
1065 Shell::GetInstance()->UpdateShelfVisibility(); 1066 Shell::GetInstance()->UpdateShelfVisibility();
1066 #endif 1067 #endif
1067 } 1068 }
1068 1069
1069 void LauncherView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) { 1070 void LauncherView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) {
1070 FOR_EACH_OBSERVER(LauncherIconObserver, observers_, 1071 FOR_EACH_OBSERVER(LauncherIconObserver, observers_,
1071 OnLauncherIconPositionsChanged()); 1072 OnLauncherIconPositionsChanged());
1072 PreferredSizeChanged(); 1073 PreferredSizeChanged();
1073 } 1074 }
1074 1075
1075 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { 1076 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) {
1076 } 1077 }
1077 1078
1078 } // namespace internal 1079 } // namespace internal
1079 } // namespace ash 1080 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shell/window_type_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698