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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 1680143002: Simulate click through gamepad BUTTON_A (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simulate click Created 4 years, 7 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
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.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 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.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 } finally { 1687 } finally {
1688 TraceEvent.end("ContentViewCore.dispatchKeyEventPreIme"); 1688 TraceEvent.end("ContentViewCore.dispatchKeyEventPreIme");
1689 } 1689 }
1690 } 1690 }
1691 1691
1692 /** 1692 /**
1693 * @see View#dispatchKeyEvent(KeyEvent) 1693 * @see View#dispatchKeyEvent(KeyEvent)
1694 */ 1694 */
1695 public boolean dispatchKeyEvent(KeyEvent event) { 1695 public boolean dispatchKeyEvent(KeyEvent event) {
1696 if (GamepadList.dispatchKeyEvent(event)) return true; 1696 if (GamepadList.dispatchKeyEvent(event)) return true;
1697 if (event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_A) {
1698 nativeSimulateClick(mNativeContentViewCore);
1699 return true;
1700 }
1697 if (getContentViewClient().shouldOverrideKeyEvent(event)) { 1701 if (getContentViewClient().shouldOverrideKeyEvent(event)) {
1698 return mContainerViewInternals.super_dispatchKeyEvent(event); 1702 return mContainerViewInternals.super_dispatchKeyEvent(event);
1699 } 1703 }
1700 1704
1701 if (mImeAdapter.dispatchKeyEvent(event)) return true; 1705 if (mImeAdapter.dispatchKeyEvent(event)) return true;
1702 1706
1703 return mContainerViewInternals.super_dispatchKeyEvent(event); 1707 return mContainerViewInternals.super_dispatchKeyEvent(event);
1704 } 1708 }
1705 1709
1706 /** 1710 /**
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after
3434 int androidToolType0, int androidToolType1, 3438 int androidToolType0, int androidToolType1,
3435 int androidButtonState, int androidMetaState, 3439 int androidButtonState, int androidMetaState,
3436 boolean isTouchHandleEvent); 3440 boolean isTouchHandleEvent);
3437 3441
3438 private native int nativeSendMouseMoveEvent( 3442 private native int nativeSendMouseMoveEvent(
3439 long nativeContentViewCoreImpl, long timeMs, float x, float y, int t oolType); 3443 long nativeContentViewCoreImpl, long timeMs, float x, float y, int t oolType);
3440 3444
3441 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl, long timeMs, 3445 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl, long timeMs,
3442 float x, float y, float ticksX, float ticksY, float pixelsPerTick); 3446 float x, float y, float ticksX, float ticksY, float pixelsPerTick);
3443 3447
3448 private native void nativeSimulateClick(long nativeContentViewCoreImpl);
3449
3444 private native void nativeScrollBegin(long nativeContentViewCoreImpl, long t imeMs, float x, 3450 private native void nativeScrollBegin(long nativeContentViewCoreImpl, long t imeMs, float x,
3445 float y, float hintX, float hintY, boolean targetViewport); 3451 float y, float hintX, float hintY, boolean targetViewport);
3446 3452
3447 private native void nativeScrollEnd(long nativeContentViewCoreImpl, long tim eMs); 3453 private native void nativeScrollEnd(long nativeContentViewCoreImpl, long tim eMs);
3448 3454
3449 private native void nativeScrollBy( 3455 private native void nativeScrollBy(
3450 long nativeContentViewCoreImpl, long timeMs, float x, float y, 3456 long nativeContentViewCoreImpl, long timeMs, float x, float y,
3451 float deltaX, float deltaY); 3457 float deltaX, float deltaY);
3452 3458
3453 private native void nativeFlingStart(long nativeContentViewCoreImpl, long ti meMs, float x, 3459 private native void nativeFlingStart(long nativeContentViewCoreImpl, long ti meMs, float x,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
3512 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l, 3518 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l,
3513 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily, 3519 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily,
3514 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor, 3520 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor,
3515 String textTrackTextShadow, String textTrackTextSize); 3521 String textTrackTextShadow, String textTrackTextSize);
3516 3522
3517 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3523 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3518 int x, int y, int w, int h); 3524 int x, int y, int w, int h);
3519 3525
3520 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 3526 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
3521 } 3527 }
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698