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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

Issue 6300007: touch: Allow grabbing/ungrabbing touch devices for XInput2. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: gyp blackmagic Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | views/controls/menu/menu_host_gtk.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/renderer_host/render_widget_host_view_views.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 689 }
690 } 690 }
691 break; 691 break;
692 case views::Event::ET_TOUCH_RELEASED: 692 case views::Event::ET_TOUCH_RELEASED:
693 case views::Event::ET_TOUCH_CANCELLED: 693 case views::Event::ET_TOUCH_CANCELLED:
694 case views::Event::ET_TOUCH_MOVED: { 694 case views::Event::ET_TOUCH_MOVED: {
695 // The touch point should have been added to the event from an earlier 695 // The touch point should have been added to the event from an earlier
696 // _PRESSED event. So find that. 696 // _PRESSED event. So find that.
697 // At the moment, only a maximum of 4 touch-points are allowed. So a 697 // At the moment, only a maximum of 4 touch-points are allowed. So a
698 // simple loop should be sufficient. 698 // simple loop should be sufficient.
699 for (int i = 0; i < WebTouchEvent::touchPointsLengthCap; ++i) { 699 for (int i = 0; i < touch_event_.touchPointsLength; ++i) {
700 point = touch_event_.touchPoints + i; 700 point = touch_event_.touchPoints + i;
701 if (point->id == e.identity()) { 701 if (point->id == e.identity()) {
702 break; 702 break;
703 } 703 }
704 point = NULL; 704 point = NULL;
705 } 705 }
706 break; 706 break;
707 } 707 }
708 default: 708 default:
709 DLOG(WARNING) << "Unknown touch event " << e.GetType(); 709 DLOG(WARNING) << "Unknown touch event " << e.GetType();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } 753 }
754 754
755 // static 755 // static
756 RenderWidgetHostView* 756 RenderWidgetHostView*
757 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 757 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
758 gfx::NativeView widget) { 758 gfx::NativeView widget) {
759 gpointer user_data = g_object_get_data(G_OBJECT(widget), 759 gpointer user_data = g_object_get_data(G_OBJECT(widget),
760 kRenderWidgetHostViewKey); 760 kRenderWidgetHostViewKey);
761 return reinterpret_cast<RenderWidgetHostView*>(user_data); 761 return reinterpret_cast<RenderWidgetHostView*>(user_data);
762 } 762 }
OLDNEW
« no previous file with comments | « no previous file | views/controls/menu/menu_host_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698