|
|
DescriptionStart using a themed application context for constructing views in Tab
*Changes the inner field for application context to a
ContextThemeWrapper wrapped with the corresponding theme for the
activity.
*Uses the above wrapper inside all the places it can be used including
view construction for layouts that belong to the tab
BUG=546737
Committed: https://crrev.com/d596824f94df067d3c2da4d8d09bfc758837846c
Cr-Commit-Position: refs/heads/master@{#357197}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Print changes #Patch Set 3 : rebased #Patch Set 4 : use the API 1 constructor #Patch Set 5 : Fix ContextualSearchTabHelper to not cast Context to Activity #
Total comments: 2
Patch Set 6 : made mTab final #
Messages
Total messages: 35 (14 generated)
yusufo@chromium.org changed reviewers: + mariakhomenko@chromium.org
This is my "Let's see if anything gets broken early on" CL. To be followed up by a CL removing mActivity completely.
https://codereview.chromium.org/1416173006/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java (right): https://codereview.chromium.org/1416173006/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java:882: new PrintManagerDelegateImpl(mThemedApplicationContext)); did you check that print works after this change? According to https://developer.android.com/reference/android/print/PrintManager.html the print method can be only called from an Activity.
https://codereview.chromium.org/1416173006/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java (right): https://codereview.chromium.org/1416173006/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java:882: new PrintManagerDelegateImpl(mThemedApplicationContext)); On 2015/10/26 20:25:10, Maria wrote: > did you check that print works after this change? According to > https://developer.android.com/reference/android/print/PrintManager.html the > print method can be only called from an Activity. "Fixed" it by making the manager delegate requesting an activity explicitly and postponing this as a problem to be solved later :).
ping
lgtm
The CQ bit was checked by yusufo@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1416173006/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1416173006/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator...) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_r...) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by yusufo@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mariakhomenko@chromium.org Link to the patchset: https://codereview.chromium.org/1416173006/#ps40001 (title: "rebased")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1416173006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1416173006/40001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
yusufo@chromium.org changed reviewers: + thestig@chromium.org
thestig@ for printing Changing a param in the signature making it explicit to require an Activity. This was always the case, but the signature was wrongly set to require a parent class.
Description was changed from ========== Start using a themed application context for constructing views in Tab *Changes the inner field for application context to a ContextThemeWrapper wrapped with the corresponding theme for the activity. *Uses the above wrapper inside all the places it can be used including view construction for layouts that belong to the tab BUG=546737 ========== to ========== Start using a themed application context for constructing views in Tab *Changes the inner field for application context to a ContextThemeWrapper wrapped with the corresponding theme for the activity. *Uses the above wrapper inside all the places it can be used including view construction for layouts that belong to the tab BUG=546737 ==========
thestig@chromium.org changed reviewers: + avayvod@chromium.org
On 2015/10/29 18:54:32, Yusuf wrote: > thestig@ for printing > > Changing a param in the signature making it explicit to require an Activity. > This was always the case, but the signature was wrongly set to require a parent > class. +avayvod from printing/android/OWNERS.
printing lgtm +Nicolas FYI Yusuf, do you expect to have to update other Chrome features using Context (Cast comes as an example) to get various services with UI respecting themes? Cast takes the Context from ApplicationStatus.getApplicationContext, IIRC.
On 2015/10/29 19:03:55, whywhat wrote: > printing lgtm > > +Nicolas FYI > > Yusuf, do you expect to have to update other Chrome features using Context (Cast > comes as an example) to get various services with UI respecting themes? Cast > takes the Context from ApplicationStatus.getApplicationContext, IIRC. Aha! I was actually more chasing down places where we are using Activity context within Tab and starting to use this for them. But if we are already constructing UIs with the application context without the theme, then I would say those are bugs to chase down and fix. Those UI elements are probably not getting any appcompat specs right now. Thanks for the lgtm :)
The CQ bit was checked by yusufo@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mariakhomenko@chromium.org Link to the patchset: https://codereview.chromium.org/1416173006/#ps60001 (title: "use the API 1 constructor")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1416173006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1416173006/60001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_r...)
mariakhomenko@ just added a few changes to ContextualSearchTabHelper that removes a cast from Context to Activity. Would you mind taking a final look?
lgtm https://codereview.chromium.org/1416173006/diff/80001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java (right): https://codereview.chromium.org/1416173006/diff/80001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java:48: private Tab mTab; final?
The CQ bit was checked by yusufo@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from avayvod@chromium.org, mariakhomenko@chromium.org Link to the patchset: https://codereview.chromium.org/1416173006/#ps100001 (title: "made mTab final")
https://codereview.chromium.org/1416173006/diff/80001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java (right): https://codereview.chromium.org/1416173006/diff/80001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java:48: private Tab mTab; On 2015/10/30 20:34:06, Maria wrote: > final? Done.
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1416173006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1416173006/100001
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/d596824f94df067d3c2da4d8d09bfc758837846c Cr-Commit-Position: refs/heads/master@{#357197} |