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

Side by Side Diff: chrome/views/event.cc

Issue 42013: Slight code change to make some global variables const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « chrome/views/combo_box.cc ('k') | chrome/views/grid_layout.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/views/event.h" 5 #include "chrome/views/event.h"
6 6
7 #include "chrome/views/view.h" 7 #include "chrome/views/view.h"
8 #include "webkit/glue/webinputevent.h" 8 #include "webkit/glue/webinputevent.h"
9 9
10 namespace views { 10 namespace views {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 from, 72 from,
73 to) { 73 to) {
74 }; 74 };
75 75
76 MouseEvent::MouseEvent(const MouseEvent& model, View* from, View* to) 76 MouseEvent::MouseEvent(const MouseEvent& model, View* from, View* to)
77 : LocatedEvent(model, from, to) { 77 : LocatedEvent(model, from, to) {
78 } 78 }
79 79
80 int KeyEvent::GetKeyStateFlags() const { 80 int KeyEvent::GetKeyStateFlags() const {
81 // Windows Keyboard messages don't come with control key state as parameters 81 // Windows Keyboard messages don't come with control key state as parameters
82 // like mouse messages do, so we need to explicitly probe for these key states . 82 // like mouse messages do, so we need to explicitly probe for these key
83 // states.
83 int flags = 0; 84 int flags = 0;
84 if (GetKeyState(VK_MENU) & 0x80) 85 if (GetKeyState(VK_MENU) & 0x80)
85 flags |= Event::EF_ALT_DOWN; 86 flags |= Event::EF_ALT_DOWN;
86 if (GetKeyState(VK_SHIFT) & 0x80) 87 if (GetKeyState(VK_SHIFT) & 0x80)
87 flags |= Event::EF_SHIFT_DOWN; 88 flags |= Event::EF_SHIFT_DOWN;
88 if (GetKeyState(VK_CONTROL) & 0x80) 89 if (GetKeyState(VK_CONTROL) & 0x80)
89 flags |= Event::EF_CONTROL_DOWN; 90 flags |= Event::EF_CONTROL_DOWN;
90 return flags; 91 return flags;
91 } 92 }
92 93
93 bool KeyEvent::IsExtendedKey() const { 94 bool KeyEvent::IsExtendedKey() const {
94 return (message_flags_ & KF_EXTENDED) == KF_EXTENDED; 95 return (message_flags_ & KF_EXTENDED) == KF_EXTENDED;
95 } 96 }
96 97
97 } // namespace views 98 } // namespace views
98 99
OLDNEW
« no previous file with comments | « chrome/views/combo_box.cc ('k') | chrome/views/grid_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698