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

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

Issue 838253004: MacViews: Fix duplicate definition of ExtensionKeyBindingRegistry::SetShortcutHandlingSuspended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DragBookmarks2
Patch Set: Fix Mac Created 5 years, 11 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_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 "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 26 matching lines...) Expand all
37 static const int kEventFlagsMask = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | 37 static const int kEventFlagsMask = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN |
38 ui::EF_ALT_DOWN; 38 ui::EF_ALT_DOWN;
39 #endif 39 #endif
40 40
41 static inline int CalculateModifiers(const ui::KeyEvent& event) { 41 static inline int CalculateModifiers(const ui::KeyEvent& event) {
42 return event.flags() & kEventFlagsMask; 42 return event.flags() & kEventFlagsMask;
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 bool FocusManager::shortcut_handling_suspended_ = false;
48 bool FocusManager::arrow_key_traversal_enabled_ = false; 47 bool FocusManager::arrow_key_traversal_enabled_ = false;
49 48
50 FocusManager::FocusManager(Widget* widget, FocusManagerDelegate* delegate) 49 FocusManager::FocusManager(Widget* widget, FocusManagerDelegate* delegate)
51 : widget_(widget), 50 : widget_(widget),
52 delegate_(delegate), 51 delegate_(delegate),
53 focused_view_(NULL), 52 focused_view_(NULL),
54 accelerator_manager_(new ui::AcceleratorManager), 53 accelerator_manager_(new ui::AcceleratorManager),
54 shortcut_handling_suspended_(false),
55 focus_change_reason_(kReasonDirectFocusChange), 55 focus_change_reason_(kReasonDirectFocusChange),
56 is_changing_focus_(false) { 56 is_changing_focus_(false) {
57 DCHECK(widget_); 57 DCHECK(widget_);
58 stored_focused_view_storage_id_ = 58 stored_focused_view_storage_id_ =
59 ViewStorage::GetInstance()->CreateStorageID(); 59 ViewStorage::GetInstance()->CreateStorageID();
60 } 60 }
61 61
62 FocusManager::~FocusManager() { 62 FocusManager::~FocusManager() {
63 } 63 }
64 64
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 606 }
607 if (key_code == ui::VKEY_RIGHT || key_code == ui::VKEY_DOWN) { 607 if (key_code == ui::VKEY_RIGHT || key_code == ui::VKEY_DOWN) {
608 AdvanceFocus(false); 608 AdvanceFocus(false);
609 return true; 609 return true;
610 } 610 }
611 611
612 return false; 612 return false;
613 } 613 }
614 614
615 } // namespace views 615 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/focus/focus_manager.h ('k') | ui/views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698