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

Side by Side Diff: chrome/browser/geolocation/chrome_geolocation_permission_context.cc

Issue 10091006: TabContents -> WebContentsImpl, part 15. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
6 6
7 #include <functional> 7 #include <functional>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 NotifyPermissionSet(render_process_id, render_view_id, bridge_id, 617 NotifyPermissionSet(render_process_id, render_view_id, bridge_id,
618 requesting_frame, callback, true); 618 requesting_frame, callback, true);
619 return; 619 return;
620 } 620 }
621 } 621 }
622 } 622 }
623 623
624 WebContents* web_contents = 624 WebContents* web_contents =
625 tab_util::GetWebContentsByID(render_process_id, render_view_id); 625 tab_util::GetWebContentsByID(render_process_id, render_view_id);
626 if (!web_contents || web_contents->GetViewType() != 626 if (!web_contents || web_contents->GetViewType() !=
627 content::VIEW_TYPE_TAB_CONTENTS) { 627 content::VIEW_TYPE_WEB_CONTENTS) {
628 // The tab may have gone away, or the request may not be from a tab at all. 628 // The tab may have gone away, or the request may not be from a tab at all.
629 // TODO(mpcomplete): the request could be from a background page or 629 // TODO(mpcomplete): the request could be from a background page or
630 // extension popup (tab_contents will have a different ViewType). But why do 630 // extension popup (tab_contents will have a different ViewType). But why do
631 // we care? Shouldn't we still put an infobar up in the current tab? 631 // we care? Shouldn't we still put an infobar up in the current tab?
632 LOG(WARNING) << "Attempt to use geolocation tabless renderer: " 632 LOG(WARNING) << "Attempt to use geolocation tabless renderer: "
633 << render_process_id << "," << render_view_id << "," 633 << render_process_id << "," << render_view_id << ","
634 << bridge_id << " (can't prompt user without a visible tab)"; 634 << bridge_id << " (can't prompt user without a visible tab)";
635 NotifyPermissionSet(render_process_id, render_view_id, bridge_id, 635 NotifyPermissionSet(render_process_id, render_view_id, bridge_id,
636 requesting_frame, callback, false); 636 requesting_frame, callback, false);
637 return; 637 return;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 BrowserThread::UI, FROM_HERE, 703 BrowserThread::UI, FROM_HERE,
704 base::Bind( 704 base::Bind(
705 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, 705 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest,
706 this, render_process_id, render_view_id, bridge_id)); 706 this, render_process_id, render_view_id, bridge_id));
707 return; 707 return;
708 } 708 }
709 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 709 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
710 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, 710 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id,
711 render_view_id, bridge_id); 711 render_view_id, bridge_id);
712 } 712 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698