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

Side by Side Diff: ui/events/base_event_utils.cc

Issue 1325333002: Ignore inserting character with Search as a modifier on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kpschoedel's comments Created 5 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
« no previous file with comments | « ui/events/base_event_utils.h ('k') | ui/views/controls/textfield/textfield.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/events/base_event_utils.h" 5 #include "ui/events/base_event_utils.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/events/event_constants.h"
9 10
10 namespace ui { 11 namespace ui {
11 12
13 namespace {
14
15 #if defined(OS_CHROMEOS)
16 const int kSystemKeyModifierMask = EF_ALT_DOWN | EF_COMMAND_DOWN;
17 #else
18 const int kSystemKeyModifierMask = EF_ALT_DOWN;
19 #endif // defined(OS_CHROMEOS)
20
21
22 } // namespace
23
12 base::StaticAtomicSequenceNumber g_next_event_id; 24 base::StaticAtomicSequenceNumber g_next_event_id;
13 25
14 uint32 GetNextTouchEventId() { 26 uint32 GetNextTouchEventId() {
15 // Set the first touch event ID to 1 because we set id to 0 for other types 27 // Set the first touch event ID to 1 because we set id to 0 for other types
16 // of events. 28 // of events.
17 uint32 id = g_next_event_id.GetNext(); 29 uint32 id = g_next_event_id.GetNext();
18 if (id == 0) 30 if (id == 0)
19 id = g_next_event_id.GetNext(); 31 id = g_next_event_id.GetNext();
20 DCHECK_NE(0U, id); 32 DCHECK_NE(0U, id);
21 return id; 33 return id;
22 } 34 }
23 35
36 bool IsSystemKeyModifier(int flags) {
37 return (kSystemKeyModifierMask & flags) != 0;
38 }
39
24 } // namespace ui 40 } // namespace ui
25 41
OLDNEW
« no previous file with comments | « ui/events/base_event_utils.h ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698