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

Side by Side Diff: ui/base/x/events_x.cc

Issue 9599005: Coverity: Fix a pass-by-value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « ui/base/win/events_win.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) 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/base/events.h" 5 #include "ui/base/events.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/extensions/XInput.h> 8 #include <X11/extensions/XInput.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 return CMTEventData::GetInstance()->GetGestureTimes( 727 return CMTEventData::GetInstance()->GetGestureTimes(
728 *native_event, start_time, end_time); 728 *native_event, start_time, end_time);
729 } 729 }
730 730
731 void UpdateDeviceList() { 731 void UpdateDeviceList() {
732 Display* display = GetXDisplay(); 732 Display* display = GetXDisplay();
733 CMTEventData::GetInstance()->UpdateDeviceList(display); 733 CMTEventData::GetInstance()->UpdateDeviceList(display);
734 TouchFactory::GetInstance()->UpdateDeviceList(display); 734 TouchFactory::GetInstance()->UpdateDeviceList(display);
735 } 735 }
736 736
737 bool IsNoopEvent(base::NativeEvent event) { 737 bool IsNoopEvent(const base::NativeEvent& event) {
738 #if defined(TOOLKIT_USES_GTK) 738 #if defined(TOOLKIT_USES_GTK)
739 NOTREACHED(); 739 NOTREACHED();
740 return false; 740 return false;
741 #else 741 #else
742 return (event->type == ClientMessage && 742 return (event->type == ClientMessage &&
743 event->xclient.message_type == GetNoopEventAtom()); 743 event->xclient.message_type == GetNoopEventAtom());
744 #endif 744 #endif
745 } 745 }
746 746
747 base::NativeEvent CreateNoopEvent() { 747 base::NativeEvent CreateNoopEvent() {
(...skipping 11 matching lines...) Expand all
759 NOTREACHED(); 759 NOTREACHED();
760 #else 760 #else
761 // Make sure we use atom from current xdisplay, which may 761 // Make sure we use atom from current xdisplay, which may
762 // change during the test. 762 // change during the test.
763 noop->xclient.message_type = GetNoopEventAtom(); 763 noop->xclient.message_type = GetNoopEventAtom();
764 #endif 764 #endif
765 return noop; 765 return noop;
766 } 766 }
767 767
768 } // namespace ui 768 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/events_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698