New issue
Advanced search Search tips

Issue 874523 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task

Blocking:
issue 871839



Sign in to add a comment

Generalize the Previews UI

Project Member Reported by robertogden@chromium.org, Aug 15

Issue description

Right now it is assumed that when a Preview is shown, the UI shown to the user will be an Infobar.

Generalize this so that PreviewsInfobarDelegate::Create is only called from one generic place that can be used elsewhere. 

Like:

  DRP          Previews
      \       /
       \     /
   PreviewsTabHelper
          |
          |
 PreviewsInfobarDelegate
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40

commit a15479c5e22a80dd50fe90d4e596f20c4e9c2d40
Author: Robert Ogden <robertogden@chromium.org>
Date: Wed Aug 15 21:26:36 2018

Rename Previews Tab Helper

Renames it to be the UI helper, instead of specifically Infobar. No
behavioral changes are done in this CL, just the renaming.

Bug:  874523 
Change-Id: I3e5a0c992af0a2c2b9c2ee03a9b45d337355abf8
Reviewed-on: https://chromium-review.googlesource.com/1176235
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583401}
[modify] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/BUILD.gn
[modify] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
[modify] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/previews/previews_infobar_delegate.cc
[modify] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/previews/previews_infobar_delegate.h
[modify] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/previews/previews_infobar_delegate_unittest.cc
[delete] https://crrev.com/16af198606d27fe1a78208d0e30762884e7dc2a0/chrome/browser/previews/previews_infobar_tab_helper.h
[rename] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/previews/previews_ui_tab_helper.cc
[add] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/previews/previews_ui_tab_helper.h
[rename] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/previews/previews_ui_tab_helper_unittest.cc
[modify] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/browser/ui/tab_helpers.cc
[modify] https://crrev.com/a15479c5e22a80dd50fe90d4e596f20c4e9c2d40/chrome/test/BUILD.gn

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4

commit e4d006b5a68cf35da88d2d36b66ab822b8ce19a4
Author: Robert Ogden <robertogden@chromium.org>
Date: Thu Aug 16 19:19:13 2018

Merge Previews UI Trigger code paths

Cleans up the APIs to show the previews UI by abstracting away the
InfoBar and leaving the Previews Tab Helper as the single point of
entry to show a Previews UI.

Also renames and moves the on dismiss callback so that it no longer
has "infobar" in its name.

Bug:  874523 
Change-Id: I49735c52882d198cd9f6fe95725168691a88681d
Reviewed-on: https://chromium-review.googlesource.com/1176544
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583766}
[modify] https://crrev.com/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4/chrome/browser/infobars/infobars_browsertest.cc
[modify] https://crrev.com/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
[modify] https://crrev.com/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4/chrome/browser/previews/previews_infobar_delegate.cc
[modify] https://crrev.com/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4/chrome/browser/previews/previews_infobar_delegate.h
[modify] https://crrev.com/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4/chrome/browser/previews/previews_infobar_delegate_unittest.cc
[modify] https://crrev.com/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4/chrome/browser/previews/previews_ui_tab_helper.cc
[modify] https://crrev.com/e4d006b5a68cf35da88d2d36b66ab822b8ce19a4/chrome/browser/previews/previews_ui_tab_helper.h

Status: Fixed (was: Started)

Sign in to add a comment