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

Issue 897673002: First step in enabling creating tabs without an Activity on Android. (Closed)

Created:
5 years, 10 months ago by Peter Beverloo
Modified:
5 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jochen+watch_chromium.org, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, michaeln, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-notifications_chromium.org, mlamouri+watch-content_chromium.org, nhiroki, peter+watch_chromium.org, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@a-base-mounir
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

First step in enabling creating tabs without an Activity on Android. This patch modifies the ContentBrowserClient::OpenURL method to pass a callback, to be invoked when the content::WebContents* is available, rather than returning it immediately as this will be an asynchronous process on Android. For actually opening a new tab, we create a ServiceTabCreator class which has the ability to create tabs from Services. This method will fire an intent to start the activity asynchronously. The follow-up patch will make the activity communicate back a reference to the created TabAndroid / WebContents, which allows the Service to get it, and finalize the callback as expected. BUG=454809 Committed: https://crrev.com/bbcccc162d55f19e30fced510a701d44e96e86f8 Cr-Commit-Position: refs/heads/master@{#315855}

Patch Set 1 #

Patch Set 2 : Remove some debugging left-overs #

Patch Set 3 : s/NavigationUtils/ServiceTabCreator/g #

Total comments: 16

Patch Set 4 : comments #

Patch Set 5 : Some textual renames I missed #

Patch Set 6 : rebase on tot #

Patch Set 7 : #

Total comments: 30

Patch Set 8 : comments #

Patch Set 9 : #

Total comments: 6

Patch Set 10 : #

Patch Set 11 : #

Total comments: 6

Patch Set 12 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -34 lines) Patch
A chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +101 lines, -0 lines 0 comments Download
M chrome/android/shell/java/AndroidManifest.xml.jinja2 View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/browser/android/service_tab_launcher.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/browser/android/service_tab_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +60 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/chrome_content_browser_client_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +20 lines, -6 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -5 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
M content/shell/browser/shell_content_browser_client.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -6 lines 0 comments Download

Messages

Total messages: 23 (6 generated)
Peter Beverloo
+miguelg for Android +mlamouri for OpenURL This patch depends on https://codereview.chromium.org/843583005.
5 years, 10 months ago (2015-02-03 15:54:53 UTC) #2
Miguel Garcia
mostly nits on my end. https://codereview.chromium.org/897673002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java File chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java (right): https://codereview.chromium.org/897673002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java#newcode19 chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java:19: * Activity is available. ...
5 years, 10 months ago (2015-02-03 16:58:40 UTC) #3
Peter Beverloo
Thanks for the review! https://codereview.chromium.org/897673002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java File chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java (right): https://codereview.chromium.org/897673002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java#newcode19 chrome/android/java/src/org/chromium/chrome/browser/ServiceTabCreator.java:19: * Activity is available. It ...
5 years, 10 months ago (2015-02-03 17:24:54 UTC) #4
Miguel Garcia
lgtm for the android bits
5 years, 10 months ago (2015-02-03 17:27:22 UTC) #5
Peter Beverloo
+avi for content/ API change.
5 years, 10 months ago (2015-02-06 11:38:19 UTC) #7
Peter Beverloo
+Jochen per Mounir's suggestion since this modifies CBC::OpenURL.
5 years, 10 months ago (2015-02-06 14:01:45 UTC) #9
Avi (use Gerrit)
lgtm I'm cool with that.
5 years, 10 months ago (2015-02-06 15:20:08 UTC) #10
Peter Beverloo
Cheers! I'll fix the unit test and will wait a bit to see if Jochen ...
5 years, 10 months ago (2015-02-06 16:50:40 UTC) #12
mlamouri (slow - plz ping)
It looks good. Thanks! A few comments below. https://codereview.chromium.org/897673002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java File chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java (right): https://codereview.chromium.org/897673002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java#newcode53 chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java:53: intent.setData(Uri.parse(url)); ...
5 years, 10 months ago (2015-02-09 12:07:37 UTC) #13
Peter Beverloo
Thanks for the review. PTAL https://codereview.chromium.org/897673002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java File chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java (right): https://codereview.chromium.org/897673002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java#newcode53 chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java:53: intent.setData(Uri.parse(url)); On 2015/02/09 12:07:37, ...
5 years, 10 months ago (2015-02-10 17:49:37 UTC) #14
mlamouri (slow - plz ping)
Thanks for applying the review comments. Unfortunately, I realised that you were missing the incognito ...
5 years, 10 months ago (2015-02-11 13:50:24 UTC) #15
Peter Beverloo
Thanks for the thorough review! Please take another look. Mind that these values are not ...
5 years, 10 months ago (2015-02-11 16:18:27 UTC) #16
mlamouri (slow - plz ping)
lgtm with the const T& callback applied, do whatever you prefer for the nits. Thanks! ...
5 years, 10 months ago (2015-02-11 20:49:52 UTC) #17
Peter Beverloo
Thanks for your reviews! https://codereview.chromium.org/897673002/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java File chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java (right): https://codereview.chromium.org/897673002/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java#newcode92 chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java:92: return Class.forName(className); On 2015/02/11 20:49:52, ...
5 years, 10 months ago (2015-02-11 21:12:13 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/897673002/220001
5 years, 10 months ago (2015-02-11 21:13:26 UTC) #21
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 10 months ago (2015-02-11 22:23:42 UTC) #22
commit-bot: I haz the power
5 years, 10 months ago (2015-02-11 22:24:19 UTC) #23
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/bbcccc162d55f19e30fced510a701d44e96e86f8
Cr-Commit-Position: refs/heads/master@{#315855}

Powered by Google App Engine
This is Rietveld 408576698