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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/renderer_host/input/synthetic_gesture_target_aura.h" 5 #include "content/browser/renderer_host/input/synthetic_gesture_target_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 9 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 10 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 default: 103 default:
104 NOTREACHED(); 104 NOTREACHED();
105 } 105 }
106 106
107 return ui::ET_UNKNOWN; 107 return ui::ET_UNKNOWN;
108 } 108 }
109 109
110 int WebMouseEventButtonToFlags(blink::WebMouseEvent::Button button) { 110 int WebMouseEventButtonToFlags(blink::WebMouseEvent::Button button) {
111 switch (button) { 111 switch (button) {
112 case blink::WebMouseEvent::ButtonLeft: 112 case blink::WebMouseEvent::Button::Left:
113 return ui::EF_LEFT_MOUSE_BUTTON; 113 return ui::EF_LEFT_MOUSE_BUTTON;
114 114
115 case blink::WebMouseEvent::ButtonMiddle: 115 case blink::WebMouseEvent::Button::Middle:
116 return ui::EF_MIDDLE_MOUSE_BUTTON; 116 return ui::EF_MIDDLE_MOUSE_BUTTON;
117 117
118 case blink::WebMouseEvent::ButtonRight: 118 case blink::WebMouseEvent::Button::Right:
119 return ui::EF_RIGHT_MOUSE_BUTTON; 119 return ui::EF_RIGHT_MOUSE_BUTTON;
120 120
121 default: 121 default:
122 NOTREACHED(); 122 NOTREACHED();
123 } 123 }
124 124
125 return 0; 125 return 0;
126 } 126 }
127 127
128 } // namespace 128 } // namespace
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ->min_distance_for_pinch_scroll_in_pixels(); 165 ->min_distance_for_pinch_scroll_in_pixels();
166 } 166 }
167 167
168 aura::Window* SyntheticGestureTargetAura::GetWindow() const { 168 aura::Window* SyntheticGestureTargetAura::GetWindow() const {
169 aura::Window* window = render_widget_host()->GetView()->GetNativeView(); 169 aura::Window* window = render_widget_host()->GetView()->GetNativeView();
170 DCHECK(window); 170 DCHECK(window);
171 return window; 171 return window;
172 } 172 }
173 173
174 } // namespace content 174 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698