forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add piping of ShowUnhandledTapUIIfNeeded from Blink.
This change picks up notification from Blink that there was an unhandled tap that may require some UI response, analyzes some signals, and conditionally propagates it through Chrome. The notification is done through a new interface: ContextualSearchClient instead of using ContentViewClient. The methods in ContentViewClient have been deprecated and will be removed soon. Also update the ContentViewCore#onSelectionEvent position parameters to use integer device pixels instead of float dips. The associated Blink CL is 819563004. This feature will be used by Contextual Search. BUG=412642, 395128, 383502, 403001 Review URL: https://codereview.chromium.org/816953004 Cr-Commit-Position: refs/heads/master@{#311938}
- Loading branch information
donnd
authored and
Commit bot
committed
Jan 16, 2015
1 parent
3ab6a57
commit a070f3c
Showing
11 changed files
with
149 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
content/public/android/java/src/org/chromium/content/browser/ContextualSearchClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2015 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package org.chromium.content.browser; | ||
|
||
/** | ||
* Interface to a client that implements Contextual Search handling for the content layer. | ||
*/ | ||
public interface ContextualSearchClient { | ||
/** | ||
* Notification that the web content selection has changed, regardless of the causal action. | ||
* @param selection The newly established selection. | ||
*/ | ||
void onSelectionChanged(String selection); | ||
|
||
/** | ||
* Notification that a user-triggered selection or insertion-related event has occurred. | ||
* @param eventType The selection event type, see {@link SelectionEventType}. | ||
* @param posXPix The x coordinate of the selection start handle. | ||
* @param posYPix The y coordinate of the selection start handle. | ||
*/ | ||
void onSelectionEvent(int eventType, float posXPix, float posYPix); | ||
|
||
/** | ||
* Requests to show the UI for an unhandled tap, if needed. | ||
* @param x The x coordinate of the tap. | ||
* @param y The y coordinate of the tap. | ||
*/ | ||
void showUnhandledTapUIIfNeeded(int x, int y); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters