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

Issue 2655463014: Pass the correct webState to the nativeContent. (Closed)

Created:
3 years, 11 months ago by Olivier
Modified:
3 years, 10 months ago
CC:
chromium-reviews, pkl (ping after 24h if needed), Eugene But (OOO till 7-30), noyau+watch_chromium.org, marq+watch_chromium.org, stkhapugin, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass the correct webState to the nativeContent. If an offline content is created in a new tab, currentWebState in the BVC will return the webState from the original tab (created tab is in background). Pass the webState from the webController instead. BUG=685969 Review-Url: https://codereview.chromium.org/2655463014 Cr-Commit-Position: refs/heads/master@{#446753} Committed: https://chromium.googlesource.com/chromium/src/+/d43eecb7ed3d688f344cc64bc4d09b7fb7e88d7a

Patch Set 1 #

Total comments: 3

Patch Set 2 : extend nativeprovider #

Total comments: 2

Patch Set 3 : s/ithW// #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -9 lines) Patch
M ios/chrome/browser/ui/browser_view_controller.mm View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/browser_view_controller_unittest.mm View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/contextual_search/contextual_search_results_view.mm View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ios/chrome/browser/ui/preload_controller.mm View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ios/web/public/test/fakes/test_native_content_provider.mm View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ios/web/public/web_state/ui/crw_native_content_provider.h View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 26 (15 generated)
Olivier
I think there are 3 way to fix this issue. 1. Add a webState method ...
3 years, 11 months ago (2017-01-27 10:32:51 UTC) #2
gambard
I am not sure which method would be best for architecture, waiting for marq answer. ...
3 years, 11 months ago (2017-01-27 10:39:31 UTC) #5
Olivier
https://codereview.chromium.org/2655463014/diff/1/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm File ios/chrome/browser/ui/reading_list/offline_page_native_content.mm (right): https://codereview.chromium.org/2655463014/diff/1/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm#newcode105 ios/chrome/browser/ui/reading_list/offline_page_native_content.mm:105: _webState->GetNavigationManager()->GetLastCommittedItem(); On 2017/01/27 10:39:30, gambard wrote: > If there ...
3 years, 11 months ago (2017-01-27 10:46:32 UTC) #8
marq (ping after 24h)
Honestly I'm not sure. +eugenebut@ https://codereview.chromium.org/2655463014/diff/1/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm File ios/chrome/browser/ui/reading_list/offline_page_native_content.mm (right): https://codereview.chromium.org/2655463014/diff/1/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm#newcode105 ios/chrome/browser/ui/reading_list/offline_page_native_content.mm:105: _webState->GetNavigationManager()->GetLastCommittedItem(); On 2017/01/27 10:46:32, ...
3 years, 10 months ago (2017-01-27 11:56:57 UTC) #10
Eugene But (OOO till 7-30)
I would extend -[CRWNativeContentProvider controllerForURL:] to pass web state. I think it is fair to ...
3 years, 10 months ago (2017-01-27 16:02:58 UTC) #11
Olivier
I think extending CRWNativeContentProvider is a good solution. I hesitated because OfflinePageNativeContent is the only ...
3 years, 10 months ago (2017-01-27 16:39:52 UTC) #16
Eugene But (OOO till 7-30)
lgtm https://codereview.chromium.org/2655463014/diff/20001/ios/web/public/web_state/ui/crw_native_content_provider.h File ios/web/public/web_state/ui/crw_native_content_provider.h (right): https://codereview.chromium.org/2655463014/diff/20001/ios/web/public/web_state/ui/crw_native_content_provider.h#newcode28 ios/web/public/web_state/ui/crw_native_content_provider.h:28: withWebState:(web::WebState*)webState; Should this be s/withWebState/webState? From interface perspective ...
3 years, 10 months ago (2017-01-27 17:31:54 UTC) #18
marq (ping after 24h)
LGTM for ui/
3 years, 10 months ago (2017-01-27 17:39:15 UTC) #19
Olivier
https://codereview.chromium.org/2655463014/diff/20001/ios/web/public/web_state/ui/crw_native_content_provider.h File ios/web/public/web_state/ui/crw_native_content_provider.h (right): https://codereview.chromium.org/2655463014/diff/20001/ios/web/public/web_state/ui/crw_native_content_provider.h#newcode28 ios/web/public/web_state/ui/crw_native_content_provider.h:28: withWebState:(web::WebState*)webState; On 2017/01/27 17:31:54, Eugene But wrote: > Should ...
3 years, 10 months ago (2017-01-27 20:17:27 UTC) #20
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/2655463014/40001
3 years, 10 months ago (2017-01-27 20:18:17 UTC) #23
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 20:36:04 UTC) #26
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/d43eecb7ed3d688f344cc64bc4d0...

Powered by Google App Engine
This is Rietveld 408576698