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

Issue 2807843002: Refactor creation of SadTabView into a tab helper object (Closed)

Created:
3 years, 8 months ago by PL
Modified:
3 years, 8 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, Eugene But (OOO till 7-30), baxley+watch_chromium.org, pkl (ping after 24h if needed), ios-reviews+web_chromium.org, noyau+watch_chromium.org, marq+watch_chromium.org, huangml+watch_chromium.org, liaoyuke+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor creation of SadTabView into a tab helper object and reduce dependence on Tab. BUG=Sad Tab works as expected Review-Url: https://codereview.chromium.org/2807843002 Cr-Commit-Position: refs/heads/master@{#464269} Committed: https://chromium.googlesource.com/chromium/src/+/ace0d4cd1d5616bd8ea03ce8ed314857c15d4b3a

Patch Set 1 #

Total comments: 51

Patch Set 2 : Change to delegate interface and other misc review changes. #

Total comments: 6

Patch Set 3 : Minor review changes #

Total comments: 50

Patch Set 4 : Further small review changes #

Total comments: 9

Patch Set 5 : Further review feedback #

Total comments: 2

Patch Set 6 : Adding ClearTransientContentView to TestWebState #

Patch Set 7 : Attempt to fix build dependency #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -50 lines) Patch
M ios/chrome/browser/tabs/BUILD.gn View 1 2 chunks +2 lines, -0 lines 0 comments Download
M ios/chrome/browser/tabs/tab.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M ios/chrome/browser/tabs/tab.mm View 1 2 3 3 chunks +7 lines, -14 lines 0 comments Download
M ios/chrome/browser/tabs/tab_helper_util.mm View 2 chunks +2 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/sad_tab/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/ui/sad_tab/sad_tab_view.mm View 1 2 3 11 chunks +39 lines, -34 lines 0 comments Download
M ios/chrome/browser/web/BUILD.gn View 1 2 3 4 5 6 3 chunks +13 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/sad_tab_tab_helper.h View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/sad_tab_tab_helper.mm View 1 2 3 4 1 chunk +53 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/sad_tab_tab_helper_delegate.h View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download
M ios/web/public/test/fakes/test_web_state.h View 1 2 3 4 5 2 chunks +7 lines, -1 line 0 comments Download
M ios/web/public/test/fakes/test_web_state.mm View 1 2 3 4 5 3 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (21 generated)
PL
Hello, These changes refactor SadTabView creation into a helper object. There should be no user-visible ...
3 years, 8 months ago (2017-04-10 21:51:54 UTC) #7
kkhorimoto
https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm File ios/chrome/browser/ui/sad_tab/sad_tab_view.mm (right): https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm#newcode394 ios/chrome/browser/ui/sad_tab/sad_tab_view.mm:394: if (self.reloadHandler) { We're already DCHECKing that the reload ...
3 years, 8 months ago (2017-04-10 22:31:10 UTC) #9
kkhorimoto
https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/web/tab_helper_delegate.h File ios/chrome/browser/web/tab_helper_delegate.h (right): https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/web/tab_helper_delegate.h#newcode21 ios/chrome/browser/web/tab_helper_delegate.h:21: - (BOOL)tabHelperShouldBeActive:(NSString*)tabHelperID; Another reason I'm not a big fan ...
3 years, 8 months ago (2017-04-10 22:44:15 UTC) #10
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm (right): https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/tabs/tab.mm#newcode2077 ios/chrome/browser/tabs/tab.mm:2077: - (BOOL)tabHelperShouldBeActive:(NSString*)tabHelperID { nit: Do you want to pragma ...
3 years, 8 months ago (2017-04-10 22:56:28 UTC) #11
pkl (ping after 24h if needed)
drive-by https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/ui/sad_tab/sad_tab_view.h File ios/chrome/browser/ui/sad_tab/sad_tab_view.h (right): https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/ui/sad_tab/sad_tab_view.h#newcode12 ios/chrome/browser/ui/sad_tab/sad_tab_view.h:12: #if !defined(__has_feature) || !__has_feature(objc_arc) Should this ARC boilerplate ...
3 years, 8 months ago (2017-04-11 00:09:21 UTC) #13
PL
Thanks for the guidance! I'll upload a new revision with these changes. https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm ...
3 years, 8 months ago (2017-04-11 01:35:22 UTC) #14
kkhorimoto
https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm File ios/chrome/browser/ui/sad_tab/sad_tab_view.mm (right): https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm#newcode394 ios/chrome/browser/ui/sad_tab/sad_tab_view.mm:394: if (self.reloadHandler) { On 2017/04/11 01:35:21, PL wrote: > ...
3 years, 8 months ago (2017-04-11 02:13:15 UTC) #15
PL
Much appreciated, I'll make these changes and upload a new version shortly. https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm File ios/chrome/browser/ui/sad_tab/sad_tab_view.mm ...
3 years, 8 months ago (2017-04-11 03:08:56 UTC) #16
sdefresne
https://codereview.chromium.org/2807843002/diff/40001/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm File ios/chrome/browser/ui/sad_tab/sad_tab_view.mm (right): https://codereview.chromium.org/2807843002/diff/40001/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm#newcode57 ios/chrome/browser/ui/sad_tab/sad_tab_view.mm:57: @property(nonatomic, copy) ProceduralBlock reloadHandler; You should leave this property ...
3 years, 8 months ago (2017-04-11 08:17:39 UTC) #17
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm File ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm (right): https://codereview.chromium.org/2807843002/diff/1/ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm#newcode17 ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm:17: void ShowTransientContentView(CRWContentView* content_view) override { On 2017/04/11 01:35:21, PL ...
3 years, 8 months ago (2017-04-11 15:17:01 UTC) #18
kkhorimoto
https://codereview.chromium.org/2807843002/diff/40001/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm (right): https://codereview.chromium.org/2807843002/diff/40001/ios/chrome/browser/tabs/tab.mm#newcode2080 ios/chrome/browser/tabs/tab.mm:2080: BOOL shouldBeActive = YES; On 2017/04/11 15:17:00, Eugene But ...
3 years, 8 months ago (2017-04-11 17:38:02 UTC) #19
peterlaurens
Thanks for the guidance! New revision on it's way. https://codereview.chromium.org/2807843002/diff/40001/ios/chrome/browser/tabs/tab.mm File ios/chrome/browser/tabs/tab.mm (right): https://codereview.chromium.org/2807843002/diff/40001/ios/chrome/browser/tabs/tab.mm#newcode2080 ios/chrome/browser/tabs/tab.mm:2080: ...
3 years, 8 months ago (2017-04-11 21:57:27 UTC) #21
Eugene But (OOO till 7-30)
Thank you for the patience. lgtm! Please take a look at the first comment, in ...
3 years, 8 months ago (2017-04-12 01:01:32 UTC) #22
kkhorimoto
lgtm with Eugene's comments
3 years, 8 months ago (2017-04-12 02:29:28 UTC) #23
peterlaurens
Thanks for this awesome review! I've made two main tweaks based on the feedback: 1. ...
3 years, 8 months ago (2017-04-12 17:07:38 UTC) #24
Eugene But (OOO till 7-30)
still lgtm! https://codereview.chromium.org/2807843002/diff/60001/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm File ios/chrome/browser/ui/sad_tab/sad_tab_view.mm (right): https://codereview.chromium.org/2807843002/diff/60001/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm#newcode57 ios/chrome/browser/ui/sad_tab/sad_tab_view.mm:57: @property(nonatomic, readonly) ProceduralBlock reloadHandler; On 2017/04/12 17:07:38, ...
3 years, 8 months ago (2017-04-12 17:40:08 UTC) #25
peterlaurens
ClearTransientContentView added, thanks! https://codereview.chromium.org/2807843002/diff/80001/ios/web/public/test/fakes/test_web_state.mm File ios/web/public/test/fakes/test_web_state.mm (right): https://codereview.chromium.org/2807843002/diff/80001/ios/web/public/test/fakes/test_web_state.mm#newcode187 ios/web/public/test/fakes/test_web_state.mm:187: is_showing_transient_content_view_ = true; On 2017/04/12 17:40:08, ...
3 years, 8 months ago (2017-04-12 18:00:53 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2807843002/100001
3 years, 8 months ago (2017-04-12 23:00:44 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/189840) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-04-12 23:10:25 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2807843002/120001
3 years, 8 months ago (2017-04-13 02:12:22 UTC) #38
commit-bot: I haz the power
3 years, 8 months ago (2017-04-13 03:17:27 UTC) #42
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/ace0d4cd1d5616bd8ea03ce8ed31...

Powered by Google App Engine
This is Rietveld 408576698