CC:
chromium-reviews, David Trainor- moved to gerrit, ntp-dev+reviews_chromium.org, tfarina, browser-components-watch_chromium.org, noyau+watch_chromium.org, agrieve+watch_chromium.org
[Home] Update util methods to open bookmarks/downloads/history
Downloads, history and bookmarks all have utility methods that open
their UIs. When Chrome Home is enabled, opening these UIs should
open the bottom sheet and show the corresponding BottomSheetContent.
Typed urls (e.g. chrome://history) will still open as native pages
rather than in the sheet.
Also adds tests for the BottomSheetContentController.
BUG=716250
Review-Url: https://codereview.chromium.org/2861453002
Cr-Commit-Position: refs/heads/master@{#469349}
Committed: https://chromium.googlesource.com/chromium/src/+/5ac6612a4ee3e4c8f261f77f022aa800bbd3487a
3 years, 7 months ago
(2017-05-02 22:13:38 UTC)
#10
Dry run: This issue passed the CQ dry run.
mdjones
Is it the intended behavior to show b/h/d outside of Chrome Home ever? URLs are ...
3 years, 7 months ago
(2017-05-02 22:18:30 UTC)
#11
Is it the intended behavior to show b/h/d outside of Chrome Home ever? URLs are
routed through the bottom sheet, we can intercept them there and open the bottom
sheet if necessary.
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java
(right):
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java:200:
mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_HALF, true);
Why only expand to half in this case?
Theresa
On 2017/05/02 22:18:30, mdjones wrote: > Is it the intended behavior to show b/h/d outside ...
3 years, 7 months ago
(2017-05-02 22:27:34 UTC)
#12
On 2017/05/02 22:18:30, mdjones wrote:
> Is it the intended behavior to show b/h/d outside of Chrome Home ever? URLs
are
> routed through the bottom sheet, we can intercept them there and open the
bottom
> sheet if necessary.
>
>
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
> File
>
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java
> (right):
>
>
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
>
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java:200:
> mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_HALF, true);
> Why only expand to half in this case?
For Downloads, if Chrome isn't running, the intent created when the notification
is clicked will open the DownloadActivity. I think that's okay (for now at
least).
All 3 surfaces can be bookmarked on tablets. When the bookmark is opened on a
phone, the native page loads inside a tab. Those URLs won't get routed through
the bottom sheet; we have to leave native page support for tablets anyway, so I
think it's okay to leave this behavior as is since it's an odd use case to
support.
chrome://history can be typed into the URL bar. I think that if the user is
explicitly typing in the URL instead of opening the bottom sheet we should let
them get to the native page inside a tab version. UX may feel differently, but I
think for now it's okay to leave as-is.
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java (right): https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java#newcode121 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java:121: if (activity instanceof ChromeActivity On 2017/05/03 18:15:27, slow (dfalcantara) ...
3 years, 7 months ago
(2017-05-03 22:25:32 UTC)
#16
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java
(right):
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java:121:
if (activity instanceof ChromeActivity
On 2017/05/03 18:15:27, slow (dfalcantara) wrote:
> Are you ever expecting a bottom sheet to exist in something other than a
> ChromeTabbedActivity? Kind of surprised getBottomSheet() is on
ChromeActivity.
I don't think we'll have a bottom sheet on anything besides
ChromeTabbedActivity. Matt, what do you think about moving bottom sheet
ownership to ChromeTabbedActivity?
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java
(right):
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java:200:
mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_HALF, true);
On 2017/05/02 22:28:09, Theresa wrote:
> On 2017/05/02 22:18:30, mdjones wrote:
> > Why only expand to half in this case?
>
> That was an oversight. I'll change it to SHEET_STATE_FULL.
Done.
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/javatest...
File
chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentControllerTest.java
(right):
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/javatest...
chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentControllerTest.java:37:
mObserver.mOpenedCallbackHelper.waitForCallback(initialOpenedCount, 1);
On 2017/05/03 18:15:27, slow (dfalcantara) wrote:
> check that the other ones haven't been called?
Done.
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2861453002/60001
3 years, 7 months ago
(2017-05-03 22:25:40 UTC)
#17
3 years, 7 months ago
(2017-05-03 23:43:15 UTC)
#19
Dry run: This issue passed the CQ dry run.
mdjones
lgtm https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java (right): https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java#newcode121 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java:121: if (activity instanceof ChromeActivity On 2017/05/03 22:25:32, Theresa ...
3 years, 7 months ago
(2017-05-04 15:55:58 UTC)
#20
lgtm
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java
(right):
https://codereview.chromium.org/2861453002/diff/20001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java:121:
if (activity instanceof ChromeActivity
On 2017/05/03 22:25:32, Theresa wrote:
> On 2017/05/03 18:15:27, slow (dfalcantara) wrote:
> > Are you ever expecting a bottom sheet to exist in something other than a
> > ChromeTabbedActivity? Kind of surprised getBottomSheet() is on
> ChromeActivity.
>
> I don't think we'll have a bottom sheet on anything besides
> ChromeTabbedActivity. Matt, what do you think about moving bottom sheet
> ownership to ChromeTabbedActivity?
We could, but it was convenient to have it there because ChromeActivity does
most of the initial view setting and inflation.
Theresa
The CQ bit was checked by twellington@chromium.org
3 years, 7 months ago
(2017-05-04 15:57:58 UTC)
#21
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1493913478711530, "parent_rev": "644d16e85e314eea64abdb2ebd30b11ed731f5c9", "commit_rev": "5ac6612a4ee3e4c8f261f77f022aa800bbd3487a"}
3 years, 7 months ago
(2017-05-04 16:03:53 UTC)
#24
CQ is committing da patch.
Bot data: {"patchset_id": 60001, "attempt_start_ts": 1493913478711530,
"parent_rev": "644d16e85e314eea64abdb2ebd30b11ed731f5c9", "commit_rev":
"5ac6612a4ee3e4c8f261f77f022aa800bbd3487a"}
commit-bot: I haz the power
Description was changed from ========== [Home] Update util methods to open bookmarks/downloads/history Downloads, history and ...
3 years, 7 months ago
(2017-05-04 16:04:54 UTC)
#25
Message was sent while issue was closed.
Description was changed from
==========
[Home] Update util methods to open bookmarks/downloads/history
Downloads, history and bookmarks all have utility methods that open
their UIs. When Chrome Home is enabled, opening these UIs should
open the bottom sheet and show the corresponding BottomSheetContent.
Typed urls (e.g. chrome://history) will still open as native pages
rather than in the sheet.
Also adds tests for the BottomSheetContentController.
BUG=716250
==========
to
==========
[Home] Update util methods to open bookmarks/downloads/history
Downloads, history and bookmarks all have utility methods that open
their UIs. When Chrome Home is enabled, opening these UIs should
open the bottom sheet and show the corresponding BottomSheetContent.
Typed urls (e.g. chrome://history) will still open as native pages
rather than in the sheet.
Also adds tests for the BottomSheetContentController.
BUG=716250
Review-Url: https://codereview.chromium.org/2861453002
Cr-Commit-Position: refs/heads/master@{#469349}
Committed:
https://chromium.googlesource.com/chromium/src/+/5ac6612a4ee3e4c8f261f77f022a...
==========
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/5ac6612a4ee3e4c8f261f77f022aa800bbd3487a
3 years, 7 months ago
(2017-05-04 16:04:55 UTC)
#26
Issue 2861453002: [Home] Update util methods to open bookmarks/downloads/history
(Closed)
Created 3 years, 7 months ago by Theresa
Modified 3 years, 7 months ago
Reviewers: mdjones, gone
Base URL:
Comments: 8