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

Issue 8587001: Have ExtensionHost use TabContents instead of RenderViewHost. Try #3. (Closed)

Created:
9 years, 1 month ago by Matt Perry
Modified:
9 years, 1 month ago
CC:
chromium-reviews, Avi (use Gerrit), creis+watch_chromium.org, yusukes+watch_chromium.org, jam, Erik does not do reviews, Paweł Hajdan Jr., yoshiki+watch_chromium.org, mihaip+watch_chromium.org, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, ajwong+watch_chromium.org, penghuang+watch_chromium.org, brettw-cc_chromium.org, darin-cc_chromium.org, James Su
Visibility:
Public.

Description

Have ExtensionHost use TabContents instead of RenderViewHost. Try #3. The last try broke at least 2 things which I've fixed in this CL: - Attempts to access geolocation from an extension would hang. - We'd sometimes crash when shutting down the browser with an ExtensionPopup open. BUG=84146 TEST=extensions still work Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110394

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -728 lines) Patch
M chrome/browser/extensions/browser_action_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_browsertest.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_browsertests_misc.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_host.h View 8 chunks +33 lines, -112 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 21 chunks +69 lines, -362 lines 0 comments Download
M chrome/browser/extensions/extension_host_mac.h View 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_host_mac.mm View 1 chunk +0 lines, -27 lines 0 comments Download
M chrome/browser/extensions/extension_process_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_webkit_preferences.h View 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_webkit_preferences.cc View 2 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_webnavigation_api.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/geolocation/chrome_geolocation_permission_context.cc View 1 chunk +5 lines, -1 line 10 comments Download
M chrome/browser/tab_contents/render_view_host_delegate_helper.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.mm View 3 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/task_manager/task_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/task_manager/task_manager_resource_providers.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_view_mac.h View 3 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_view_mac.mm View 5 chunks +35 lines, -25 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_view_gtk.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_view_gtk.cc View 4 chunks +8 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_dialog.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/extensions/extension_popup.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_popup.cc View 3 chunks +5 lines, -1 line 1 comment Download
M chrome/browser/ui/views/extensions/extension_view.h View 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_view.cc View 3 chunks +4 lines, -47 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 chunk +0 lines, -12 lines 0 comments Download
M content/browser/tab_contents/tab_contents.h View 2 chunks +88 lines, -87 lines 0 comments Download
M content/browser/tab_contents/tab_contents.cc View 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/tab_contents/tab_contents_observer.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/tab_contents/tab_contents_observer.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Matt Perry
This is mostly the same as last time, except for the two changes I point ...
9 years, 1 month ago (2011-11-16 21:44:10 UTC) #1
Aaron Boodman
lgtm http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc File chrome/browser/geolocation/chrome_geolocation_permission_context.cc (right): http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc#newcode545 chrome/browser/geolocation/chrome_geolocation_permission_context.cc:545: tab_contents->GetRenderViewType() != content::VIEW_TYPE_TAB_CONTENTS) { This seems like it ...
9 years, 1 month ago (2011-11-16 23:29:23 UTC) #2
Matt Perry
http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc File chrome/browser/geolocation/chrome_geolocation_permission_context.cc (right): http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc#newcode545 chrome/browser/geolocation/chrome_geolocation_permission_context.cc:545: tab_contents->GetRenderViewType() != content::VIEW_TYPE_TAB_CONTENTS) { On 2011/11/16 23:29:24, Aaron Boodman ...
9 years, 1 month ago (2011-11-16 23:36:32 UTC) #3
Matt Perry
joth: could you take a look at chrome_geolocation_permission_context.cc to see if I'm doing the right ...
9 years, 1 month ago (2011-11-16 23:37:55 UTC) #4
Aaron Boodman
http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc File chrome/browser/geolocation/chrome_geolocation_permission_context.cc (right): http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc#newcode545 chrome/browser/geolocation/chrome_geolocation_permission_context.cc:545: tab_contents->GetRenderViewType() != content::VIEW_TYPE_TAB_CONTENTS) { On 2011/11/16 23:36:32, Matt Perry ...
9 years, 1 month ago (2011-11-16 23:42:23 UTC) #5
Matt Perry
http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc File chrome/browser/geolocation/chrome_geolocation_permission_context.cc (right): http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc#newcode545 chrome/browser/geolocation/chrome_geolocation_permission_context.cc:545: tab_contents->GetRenderViewType() != content::VIEW_TYPE_TAB_CONTENTS) { On 2011/11/16 23:42:23, Aaron Boodman ...
9 years, 1 month ago (2011-11-16 23:46:06 UTC) #6
joth
+jknotten as he's been doing more in the permission context recently. http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc File chrome/browser/geolocation/chrome_geolocation_permission_context.cc (right): ...
9 years, 1 month ago (2011-11-17 08:58:33 UTC) #7
joth
talking to John reminded me of one other question... http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc File chrome/browser/geolocation/chrome_geolocation_permission_context.cc (right): http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chrome_geolocation_permission_context.cc#newcode539 chrome/browser/geolocation/chrome_geolocation_permission_context.cc:539: ...
9 years, 1 month ago (2011-11-17 09:45:11 UTC) #8
Matt Perry
9 years, 1 month ago (2011-11-17 20:08:04 UTC) #9
http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chro...
File chrome/browser/geolocation/chrome_geolocation_permission_context.cc
(right):

http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chro...
chrome/browser/geolocation/chrome_geolocation_permission_context.cc:539: }
On 2011/11/17 09:45:12, joth wrote:
> I just recalled a question from a previous review thread, I never quite
> understood why we don't just have "if (ext) return" here?
> 
> What is the use case for a permission request originating from an extension
> being handled by any of the code-blocks below?
> 

That I don't know. I tried to preserve the code as-is because this is a
refactor, and I didn't want to unintentionally break something.

http://codereview.chromium.org/8587001/diff/1/chrome/browser/geolocation/chro...
chrome/browser/geolocation/chrome_geolocation_permission_context.cc:549: // we
care? Shouldn't we still put an infobar up in the current tab?
Thanks, your explanation answers my question.

On 2011/11/17 08:58:33, joth wrote:
> I don't quite understand this last question: are you suggesting that an
> extension background page should cause whatever tab happens to be focused to
get
> an info bar? In the current focused window or all windows? What if I change or
> close tab?
> 
> My understanding was extensions either request (and get) permission at install
> time or they don't and that's it. No runtime popups permitted.
> The geolocation UI is very much targetted to the tab it is in requesting
> permission, and is already complicated by the corner case of an embedded frame
> (from differing origin) requesting permission. I wouldn't want to complicate
it
> further with non-tab related things unless the UX team really intend it to.

Powered by Google App Engine
This is Rietveld 408576698