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

Side by Side Diff: ui/views/touchui/touch_selection_controller_impl.cc

Issue 13142003: Fix app list position in windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 7 years, 8 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
« no previous file with comments | « ui/views/touchui/touch_editing_menu.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/views/touchui/touch_selection_controller_impl.h" 5 #include "ui/views/touchui/touch_selection_controller_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "ui/base/ui_base_switches.h" 10 #include "ui/base/ui_base_switches.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 return client_view_->IsCommandIdEnabled(command_id); 296 return client_view_->IsCommandIdEnabled(command_id);
297 } 297 }
298 298
299 void TouchSelectionControllerImpl::ExecuteCommand(int command_id, 299 void TouchSelectionControllerImpl::ExecuteCommand(int command_id,
300 int event_flags) { 300 int event_flags) {
301 HideContextMenu(); 301 HideContextMenu();
302 client_view_->ExecuteCommand(command_id, event_flags); 302 client_view_->ExecuteCommand(command_id, event_flags);
303 } 303 }
304 304
305 void TouchSelectionControllerImpl::OpenContextMenu() { 305 void TouchSelectionControllerImpl::OpenContextMenu() {
306 gfx::Point anchor = context_menu_->anchor_point(); 306 gfx::Point anchor = context_menu_->anchor_rect().origin();
307 anchor.Offset(0, -kSelectionHandleRadius); 307 anchor.Offset(0, -kSelectionHandleRadius);
308 HideContextMenu(); 308 HideContextMenu();
309 client_view_->OpenContextMenu(anchor); 309 client_view_->OpenContextMenu(anchor);
310 } 310 }
311 311
312 void TouchSelectionControllerImpl::OnMenuClosed(TouchEditingMenuView* menu) { 312 void TouchSelectionControllerImpl::OnMenuClosed(TouchEditingMenuView* menu) {
313 if (menu == context_menu_) 313 if (menu == context_menu_)
314 context_menu_ = NULL; 314 context_menu_ = NULL;
315 } 315 }
316 316
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 ui::TouchEditable* client_view) { 415 ui::TouchEditable* client_view) {
416 #if defined(OS_CHROMEOS) 416 #if defined(OS_CHROMEOS)
417 if (CommandLine::ForCurrentProcess()->HasSwitch( 417 if (CommandLine::ForCurrentProcess()->HasSwitch(
418 switches::kEnableTouchEditing)) 418 switches::kEnableTouchEditing))
419 return new views::TouchSelectionControllerImpl(client_view); 419 return new views::TouchSelectionControllerImpl(client_view);
420 #endif 420 #endif
421 return NULL; 421 return NULL;
422 } 422 }
423 423
424 } // namespace views 424 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/touchui/touch_editing_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698