OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.content.res.Configuration; | 8 import android.content.res.Configuration; |
9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
10 import android.os.Build; | 10 import android.os.Build; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 public boolean dispatchKeyEvent(KeyEvent event) { | 174 public boolean dispatchKeyEvent(KeyEvent event) { |
175 if (isFocused()) { | 175 if (isFocused()) { |
176 return mContentViewCore.dispatchKeyEvent(event); | 176 return mContentViewCore.dispatchKeyEvent(event); |
177 } else { | 177 } else { |
178 return super.dispatchKeyEvent(event); | 178 return super.dispatchKeyEvent(event); |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 @Override | 182 @Override |
183 public boolean onDragEvent(DragEvent event) { | 183 public boolean onDragEvent(DragEvent event) { |
184 return mContentViewCore.onDragEvent(event); | 184 return getEventForwarder().onDragEvent(event, this); |
185 } | 185 } |
186 | 186 |
187 @Override | 187 @Override |
188 public boolean onTouchEvent(MotionEvent event) { | 188 public boolean onTouchEvent(MotionEvent event) { |
189 return getEventForwarder().onTouchEvent(event); | 189 return getEventForwarder().onTouchEvent(event); |
190 } | 190 } |
191 | 191 |
192 /** | 192 /** |
193 * Mouse move events are sent on hover enter, hover move and hover exit. | 193 * Mouse move events are sent on hover enter, hover move and hover exit. |
194 * They are sent on hover exit because sometimes it acts as both a hover | 194 * They are sent on hover exit because sometimes it acts as both a hover |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 public ContentViewApi23(Context context, ContentViewCore cvc) { | 345 public ContentViewApi23(Context context, ContentViewCore cvc) { |
346 super(context, cvc); | 346 super(context, cvc); |
347 } | 347 } |
348 | 348 |
349 @Override | 349 @Override |
350 public void onProvideVirtualStructure(final ViewStructure structure) { | 350 public void onProvideVirtualStructure(final ViewStructure structure) { |
351 mContentViewCore.onProvideVirtualStructure(structure, false); | 351 mContentViewCore.onProvideVirtualStructure(structure, false); |
352 } | 352 } |
353 } | 353 } |
354 } | 354 } |
OLD | NEW |