当前位置: 首页>>代码示例>>Java>>正文


Java TraceEvent.end方法代码示例

本文整理汇总了Java中org.chromium.content.common.TraceEvent.end方法的典型用法代码示例。如果您正苦于以下问题:Java TraceEvent.end方法的具体用法?Java TraceEvent.end怎么用?Java TraceEvent.end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.chromium.content.common.TraceEvent的用法示例。


在下文中一共展示了TraceEvent.end方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onServiceConnected

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
@Override
public void onServiceConnected(ComponentName className, IBinder service) {
    synchronized(mLock) {
        // A flag from the parent class ensures we run the post-connection logic only once
        // (instead of once per each ChildServiceConnection).
        if (mServiceConnectComplete) {
            return;
        }
        TraceEvent.begin();
        mServiceConnectComplete = true;
        mService = IChildProcessService.Stub.asInterface(service);
        // Make sure that the connection parameters have already been provided. If not,
        // doConnectionSetup() will be called from setupConnection().
        if (mConnectionParams != null) {
            doConnectionSetup();
        }
        TraceEvent.end();
    }
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:20,代码来源:ChildProcessConnection.java

示例2: onConfigurationChanged

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * @see View#onConfigurationChanged(Configuration)
 */
@SuppressWarnings("javadoc")
public void onConfigurationChanged(Configuration newConfig) {
    TraceEvent.begin();

    if (newConfig.keyboard != Configuration.KEYBOARD_NOKEYS) {
        mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore),
                ImeAdapter.getTextInputTypeNone(),
                AdapterInputConnection.INVALID_SELECTION,
                AdapterInputConnection.INVALID_SELECTION);
        InputMethodManager manager = (InputMethodManager)
                getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
        manager.restartInput(mContainerView);
    }
    mContainerViewInternals.super_onConfigurationChanged(newConfig);
    mNeedUpdateOrientationChanged = true;
    TraceEvent.end();
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:21,代码来源:ContentViewCore.java

示例3: updateImeAdapter

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
@SuppressWarnings("unused")
@CalledByNative
private void updateImeAdapter(int nativeImeAdapterAndroid, int textInputType,
        String text, int selectionStart, int selectionEnd,
        int compositionStart, int compositionEnd, boolean showImeIfNeeded) {
    TraceEvent.begin();
    mSelectionEditable = (textInputType != ImeAdapter.getTextInputTypeNone());

    if (mActionMode != null) mActionMode.invalidate();

    mImeAdapter.attachAndShowIfNeeded(nativeImeAdapterAndroid, textInputType,
            selectionStart, selectionEnd, showImeIfNeeded);

    if (mInputConnection != null) {
        mInputConnection.setEditableText(text, selectionStart, selectionEnd,
                compositionStart, compositionEnd);
    }
    TraceEvent.end();
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:20,代码来源:ContentViewCore.java

示例4: updateImeAdapter

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
@CalledByNative
private void updateImeAdapter(int nativeImeAdapterAndroid, int textInputType,
        String text, int selectionStart, int selectionEnd,
        int compositionStart, int compositionEnd, boolean showImeIfNeeded, boolean requireAck) {
    TraceEvent.begin();
    mSelectionEditable = (textInputType != ImeAdapter.getTextInputTypeNone());

    if (mActionMode != null) mActionMode.invalidate();

    mImeAdapter.attachAndShowIfNeeded(nativeImeAdapterAndroid, textInputType,
            selectionStart, selectionEnd, showImeIfNeeded);

    if (mInputConnection != null) {
        mInputConnection.updateState(text, selectionStart, selectionEnd, compositionStart,
                compositionEnd, requireAck);
    }
    TraceEvent.end();
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:19,代码来源:ContentViewCore.java

示例5: onSizeChanged

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
@Override
protected void onSizeChanged(int w, int h, int ow, int oh) {
    TraceEvent.begin();
    super.onSizeChanged(w, h, ow, oh);
    mContentViewCore.onSizeChanged(w, h, ow, oh);
    TraceEvent.end();
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:8,代码来源:ContentView.java

示例6: initializeContainerView

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * Initializes the View that will contain all Views created by the ContentViewCore.
 *
 * @param internalDispatcher Handles dispatching all hidden or super methods to the
 *                           containerView.
 */
private void initializeContainerView(InternalAccessDelegate internalDispatcher,
        int inputEventDeliveryMode) {
    TraceEvent.begin();
    mContainerViewInternals = internalDispatcher;

    mContainerView.setWillNotDraw(false);
    mContainerView.setClickable(true);

    mZoomManager = new ZoomManager(mContext, this);
    mContentViewGestureHandler = new ContentViewGestureHandler(mContext, this, mZoomManager,
            inputEventDeliveryMode);
    mZoomControlsDelegate = new ZoomControlsDelegate() {
        @Override
        public void invokeZoomPicker() {}
        @Override
        public void dismissZoomPicker() {}
        @Override
        public void updateZoomControls() {}
    };

    mRenderCoordinates.reset();

    initPopupZoomer(mContext);
    mImeAdapter = createImeAdapter(mContext);
    TraceEvent.end();
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:33,代码来源:ContentViewCore.java

示例7: onActivityPause

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * This method should be called when the containing activity is paused.
 */
public void onActivityPause() {
    TraceEvent.begin();
    hidePopupDialog();
    nativeOnHide(mNativeContentViewCore);
    TraceEvent.end();
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:10,代码来源:ContentViewCore.java

示例8: dispatchKeyEventPreIme

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * @see View#dispatchKeyEventPreIme(KeyEvent)
 */
public boolean dispatchKeyEventPreIme(KeyEvent event) {
    try {
        TraceEvent.begin();
        if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && mImeAdapter.isActive()) {
            mUnfocusOnNextSizeChanged = true;
        } else {
            undoScrollFocusedEditableNodeIntoViewIfNeeded(false);
        }
        return mContainerViewInternals.super_dispatchKeyEventPreIme(event);
    } finally {
        TraceEvent.end();
    }
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:17,代码来源:ContentViewCore.java

示例9: onHoverEvent

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * @see View#onHoverEvent(MotionEvent)
 * Mouse move events are sent on hover enter, hover move and hover exit.
 * They are sent on hover exit because sometimes it acts as both a hover
 * move and hover exit.
 */
public boolean onHoverEvent(MotionEvent event) {
    TraceEvent.begin("onHoverEvent");
    mContainerView.removeCallbacks(mFakeMouseMoveRunnable);
    if (mBrowserAccessibilityManager != null) {
        return mBrowserAccessibilityManager.onHoverEvent(event);
    }
    if (mNativeContentViewCore != 0) {
        nativeSendMouseMoveEvent(mNativeContentViewCore, event.getEventTime(),
                event.getX(), event.getY());
    }
    TraceEvent.end("onHoverEvent");
    return true;
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:20,代码来源:ContentViewCore.java

示例10: run

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
@Override
public void run() {
    TraceEvent.begin("TouchEventTimeout");
    while (!mPendingMotionEvents.isEmpty()) {
        MotionEvent nextEvent = mPendingMotionEvents.removeFirst();
        processTouchEvent(nextEvent);
        recycleEvent(nextEvent);
    }
    // We are waiting for 2 ACKs: one for the timed-out event, the other for
    // the touchcancel event injected when the timed-out event is ACK'ed.
    mPendingAckState = PENDING_ACK_ORIGINAL_EVENT;
    TraceEvent.end();
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:14,代码来源:ContentViewGestureHandler.java

示例11: onTouchEvent

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * Handle the incoming MotionEvent.
 * @return Whether the event was handled.
 */
boolean onTouchEvent(MotionEvent event) {
    try {
        TraceEvent.begin("onTouchEvent");

        if (mIgnoreRemainingTouchEvents) {
            if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
                mIgnoreRemainingTouchEvents = false;
            } else {
                return false;
            }
        }

        mLongPressDetector.cancelLongPressIfNeeded(event);
        mSnapScrollController.setSnapScrollingMode(event);
        // Notify native that scrolling has stopped whenever a down action is processed prior to
        // passing the event to native as it will drop them as an optimization if scrolling is
        // enabled.  Ending the fling ensures scrolling has stopped as well as terminating the
        // current fling if applicable.
        if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
            mNoTouchHandlerForGesture = false;
            mJavaScriptIsConsumingGesture = false;
            endFlingIfNecessary(event.getEventTime());
        } else if (event.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) {
            endDoubleTapDragMode(null);
        }

        if (offerTouchEventToJavaScript(event)) {
            // offerTouchEventToJavaScript returns true to indicate the event was sent
            // to the render process. If it is not subsequently handled, it will
            // be returned via confirmTouchEvent(false) and eventually passed to
            // processTouchEvent asynchronously.
            return true;
        }
        return processTouchEvent(event);
    } finally {
        TraceEvent.end("onTouchEvent");
    }
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:43,代码来源:ContentViewGestureHandler.java

示例12: initializeContainerView

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * Initializes the View that will contain all Views created by the ContentViewCore.
 *
 * @param internalDispatcher Handles dispatching all hidden or super methods to the
 *                           containerView.
 */
private void initializeContainerView(InternalAccessDelegate internalDispatcher,
        int inputEventDeliveryMode) {
    TraceEvent.begin();
    mContainerViewInternals = internalDispatcher;

    mContainerView.setWillNotDraw(false);
    mContainerView.setClickable(true);

    mZoomManager = new ZoomManager(mContext, this);
    mContentViewGestureHandler = new ContentViewGestureHandler(mContext, this, mZoomManager,
            inputEventDeliveryMode);
    mZoomControlsDelegate = new ZoomControlsDelegate() {
        @Override
        public void invokeZoomPicker() {}
        @Override
        public void dismissZoomPicker() {}
        @Override
        public void updateZoomControls() {}
    };

    mRenderCoordinates.reset();
    onRenderCoordinatesUpdated();

    initPopupZoomer(mContext);
    mImeAdapter = createImeAdapter(mContext);
    TraceEvent.end();
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:34,代码来源:ContentViewCore.java

示例13: onFocusChanged

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
@Override
protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
    TraceEvent.begin();
    super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
    mContentViewCore.onFocusChanged(gainFocus);
    TraceEvent.end();
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:8,代码来源:ContentView.java

示例14: onTouchEvent

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * Handle the incoming MotionEvent.
 * @return Whether the event was handled.
 */
boolean onTouchEvent(MotionEvent event) {
    try {
        TraceEvent.begin("onTouchEvent");
        onTouchEventHandlingBegin();

        if (mIgnoreRemainingTouchEvents) {
            if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
                mIgnoreRemainingTouchEvents = false;
            } else {
                return false;
            }
        }

        mLongPressDetector.cancelLongPressIfNeeded(event);
        mSnapScrollController.setSnapScrollingMode(event);
        // Notify native that scrolling has stopped whenever a down action is processed prior to
        // passing the event to native as it will drop them as an optimization if scrolling is
        // enabled.  Ending the fling ensures scrolling has stopped as well as terminating the
        // current fling if applicable.
        if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
            mNoTouchHandlerForGesture = false;
            mJavaScriptIsConsumingGesture = false;
            endFlingIfNecessary(event.getEventTime());
        } else if (event.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) {
            endDoubleTapDragIfNecessary(null);
        }

        if (offerTouchEventToJavaScript(event)) {
            // offerTouchEventToJavaScript returns true to indicate the event was sent
            // to the render process. If it is not subsequently handled, it will
            // be returned via confirmTouchEvent(false) and eventually passed to
            // processTouchEvent asynchronously.
            return true;
        }
        return processTouchEvent(event);
    } finally {
        onTouchEventHandlingEnd();
        TraceEvent.end("onTouchEvent");
    }
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:45,代码来源:ContentViewGestureHandler.java

示例15: confirmTouchEvent

import org.chromium.content.common.TraceEvent; //导入方法依赖的package包/类
/**
 * Respond to a MotionEvent being returned from the native side.
 * @param ackResult The status acknowledgment code.
 */
void confirmTouchEvent(int ackResult) {
    if (mTouchEventTimeoutHandler.confirmTouchEvent()) return;
    if (mPendingMotionEvents.isEmpty()) {
        Log.w(TAG, "confirmTouchEvent with Empty pending list!");
        return;
    }
    TraceEvent.begin("confirmTouchEvent");
    MotionEvent ackedEvent = mPendingMotionEvents.removeFirst();
    if (ackedEvent == mLastCancelledEvent) {
        // The event is canceled, just drain all the pending events until next
        // touch down.
        ackResult = INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
        TraceEvent.instant("confirmTouchEvent:CanceledEvent");
    }
    switch (ackResult) {
        case INPUT_EVENT_ACK_STATE_UNKNOWN:
            // This should never get sent.
            assert(false);
            break;
        case INPUT_EVENT_ACK_STATE_CONSUMED:
            mJavaScriptIsConsumingGesture = true;
            mZoomManager.passTouchEventThrough(ackedEvent);
            trySendPendingEventsToNative();
            break;
        case INPUT_EVENT_ACK_STATE_NOT_CONSUMED:
            if (!mJavaScriptIsConsumingGesture) processTouchEvent(ackedEvent);
            trySendPendingEventsToNative();
            break;
        case INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS:
            mNoTouchHandlerForGesture = true;
            processTouchEvent(ackedEvent);
            drainAllPendingEventsUntilNextDown();
            break;
        default:
            break;
    }

    mLongPressDetector.cancelLongPressIfNeeded(mPendingMotionEvents.iterator());

    recycleEvent(ackedEvent);
    TraceEvent.end("confirmTouchEvent");
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:47,代码来源:ContentViewGestureHandler.java


注:本文中的org.chromium.content.common.TraceEvent.end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。