summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/desktop_notification_service.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 03:07:02 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 03:07:02 +0000
commitd0d9c3eed9085779098868f5ab8a3d90e6899dcc (patch)
tree89957453001f153ecfe8109c07688173653f023f /chrome/browser/notifications/desktop_notification_service.cc
parentf98ac64588453aec3fc63070c5d3a4d96662221a (diff)
downloadchromium_src-d0d9c3eed9085779098868f5ab8a3d90e6899dcc.zip
chromium_src-d0d9c3eed9085779098868f5ab8a3d90e6899dcc.tar.gz
chromium_src-d0d9c3eed9085779098868f5ab8a3d90e6899dcc.tar.bz2
Extensions: respond to webkitNotifications.requestPermission
BUG=133219 TEST=see bug Review URL: https://chromiumcodereview.appspot.com/10532169 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/desktop_notification_service.cc')
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 0a89807..604bae5 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -398,15 +398,15 @@ ContentSetting DesktopNotificationService::GetContentSetting(
void DesktopNotificationService::RequestPermission(
const GURL& origin, int process_id, int route_id, int callback_context,
- WebContents* tab) {
+ WebContents* contents) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!tab) {
+ if (!contents) {
Browser* browser = browser::FindLastActiveWithProfile(profile_);
if (browser)
- tab = browser->GetActiveWebContents();
+ contents = browser->GetActiveWebContents();
}
- if (!tab)
+ if (!contents)
return;
// If |origin| hasn't been seen before and the default content setting for
@@ -416,7 +416,7 @@ void DesktopNotificationService::RequestPermission(
ContentSetting setting = GetContentSetting(origin);
if (setting == CONTENT_SETTING_ASK) {
// Show an info bar requesting permission.
- TabContents* tab_contents = TabContents::FromWebContents(tab);
+ TabContents* tab_contents = TabContents::FromWebContents(contents);
InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper();
infobar_helper->AddInfoBar(new NotificationPermissionInfoBarDelegate(
infobar_helper,