Index: chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
index 0328da96f26692af8389ef391a65eff445410b25..dfe6bf0576ca5dc19f8c4579be0b320d2f5aa7ac 100644 |
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
@@ -541,8 +541,12 @@ void ChromeGeolocationPermissionContext::RequestGeolocationPermission( |
TabContents* tab_contents = |
tab_util::GetTabContentsByID(render_process_id, render_view_id); |
- if (!tab_contents) { |
+ if (!tab_contents || |
+ tab_contents->GetRenderViewType() != content::VIEW_TYPE_TAB_CONTENTS) { |
Matt Perry
2011/11/16 21:44:10
This fixes the geolocation bug I mentioned.
Aaron Boodman
2011/11/16 23:29:24
This seems like it could be a breaking change. I v
Matt Perry
2011/11/16 23:36:32
That's handled by the block above - we only reach
Aaron Boodman
2011/11/16 23:42:23
Right, what I mean is that I worry that before it
Matt Perry
2011/11/16 23:46:06
I see. There was a test that broke without this ch
|
// The tab may have gone away, or the request may not be from a tab at all. |
+ // TODO(mpcomplete): the request could be from a background page or |
+ // extension popup (tab_contents will have a different ViewType). But why do |
+ // we care? Shouldn't we still put an infobar up in the current tab? |
joth
2011/11/17 08:58:33
I don't quite understand this last question: are y
Matt Perry
2011/11/17 20:08:04
Thanks, your explanation answers my question.
On
|
LOG(WARNING) << "Attempt to use geolocation tabless renderer: " |
<< render_process_id << "," << render_view_id << "," |
<< bridge_id << " (can't prompt user without a visible tab)"; |
joth
2011/11/17 08:58:33
assuming this warning is useful, it would be as we
|