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

Issue 1305253006: [Custom Tabs]Add API for updating action button as ContentProvider (Closed)

Created:
5 years, 3 months ago by Ian Wen
Modified:
5 years, 2 months ago
CC:
chromium-reviews, pasko
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Custom Tabs]Add API for updating action button as ContentProvider This CL adds a ContentProvider, CustomTabUpdater, to android chrome, with a custom call method that updates the active custom tab with new action button icon. Note a valid service connection is still required to be able to let chrome verify that the caller owns the active custom tab. BUG=510256

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+358 lines, -91 lines) Patch
M chrome/android/java/AndroidManifest.xml View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/android/java/src/android/support/customtabs/CustomTabsIntent.java View 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/customtabs/ActionButtonParams.java View 1 chunk +137 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java View 7 chunks +48 lines, -12 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabContentHandler.java View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java View 4 chunks +10 lines, -55 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabUpdater.java View 1 chunk +94 lines, -0 lines 2 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java View 4 chunks +16 lines, -10 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java View 1 chunk +7 lines, -6 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java View 3 chunks +26 lines, -5 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 3 (1 generated)
Ian Wen
This CL shows how the same API could be implemented using ContentProvider. My major concern ...
5 years, 3 months ago (2015-08-31 22:35:33 UTC) #2
Benoit L
5 years, 3 months ago (2015-09-01 16:45:10 UTC) #3
https://codereview.chromium.org/1305253006/diff/1/chrome/android/java/src/org...
File
chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabUpdater.java
(right):

https://codereview.chromium.org/1305253006/diff/1/chrome/android/java/src/org...
chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabUpdater.java:46:
CustomTabsIntent.EXTRA_SESSION);
On 2015/08/31 22:35:33, Ian Wen wrote:
> Here an alternative approach is to call Binder.getCallingUid(), and in
> CustomTabContentHandler, we store the uid along side with the IBinder to match
> it.
> 

Novice question: are we sure that Binder.getCallingUid() returns something
meaningful here? AFAIK, it only returns something else than your own UID inside
a Binder transaction. Is is the case here?

> Yet what worries me is that one of Grace's original thoughts was not
implemented
> in this CL: the client still must have a service connection anyway, because
> either the uid or the IBinder are recorded by the time the service creates the
> activity. If the custom tab was initiated by a pure View intent, then there is
> no way we could grab any information about the client app.

Powered by Google App Engine
This is Rietveld 408576698