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

Side by Side Diff: ui/views/focus/focus_manager.cc

Issue 1622433002: views: Remove unused GetCurrentTargetForAccelerator from FocusManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 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/focus/focus_manager.h ('k') | ui/views/focus/focus_manager_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 "ui/views/focus/focus_manager.h" 5 #include "ui/views/focus/focus_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } 482 }
483 483
484 bool FocusManager::ProcessAccelerator(const ui::Accelerator& accelerator) { 484 bool FocusManager::ProcessAccelerator(const ui::Accelerator& accelerator) {
485 if (accelerator_manager_->Process(accelerator)) 485 if (accelerator_manager_->Process(accelerator))
486 return true; 486 return true;
487 if (delegate_.get()) 487 if (delegate_.get())
488 return delegate_->ProcessAccelerator(accelerator); 488 return delegate_->ProcessAccelerator(accelerator);
489 return false; 489 return false;
490 } 490 }
491 491
492 ui::AcceleratorTarget* FocusManager::GetCurrentTargetForAccelerator(
493 const ui::Accelerator& accelerator) const {
494 ui::AcceleratorTarget* target =
495 accelerator_manager_->GetCurrentTarget(accelerator);
496 if (!target && delegate_.get())
497 target = delegate_->GetCurrentTargetForAccelerator(accelerator);
498 return target;
499 }
500
501 bool FocusManager::HasPriorityHandler( 492 bool FocusManager::HasPriorityHandler(
502 const ui::Accelerator& accelerator) const { 493 const ui::Accelerator& accelerator) const {
503 return accelerator_manager_->HasPriorityHandler(accelerator); 494 return accelerator_manager_->HasPriorityHandler(accelerator);
504 } 495 }
505 496
506 // static 497 // static
507 bool FocusManager::IsTabTraversalKeyEvent(const ui::KeyEvent& key_event) { 498 bool FocusManager::IsTabTraversalKeyEvent(const ui::KeyEvent& key_event) {
508 return key_event.key_code() == ui::VKEY_TAB && !key_event.IsControlDown(); 499 return key_event.key_code() == ui::VKEY_TAB && !key_event.IsControlDown();
509 } 500 }
510 501
(...skipping 25 matching lines...) Expand all
536 } 527 }
537 if (key_code == ui::VKEY_RIGHT || key_code == ui::VKEY_DOWN) { 528 if (key_code == ui::VKEY_RIGHT || key_code == ui::VKEY_DOWN) {
538 AdvanceFocus(false); 529 AdvanceFocus(false);
539 return true; 530 return true;
540 } 531 }
541 532
542 return false; 533 return false;
543 } 534 }
544 535
545 } // namespace views 536 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/focus/focus_manager.h ('k') | ui/views/focus/focus_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698