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

Side by Side Diff: chrome/renderer/notification_provider.cc

Issue 668001: Correct a mistake I made on a previous submission by commenting out an import... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/notification_provider.h" 5 #include "chrome/renderer/notification_provider.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 IPC_MESSAGE_HANDLER(ViewMsg_PostErrorToNotificationObject, OnError); 81 IPC_MESSAGE_HANDLER(ViewMsg_PostErrorToNotificationObject, OnError);
82 IPC_MESSAGE_HANDLER(ViewMsg_PostCloseToNotificationObject, OnClose); 82 IPC_MESSAGE_HANDLER(ViewMsg_PostCloseToNotificationObject, OnClose);
83 IPC_MESSAGE_HANDLER(ViewMsg_PermissionRequestDone, 83 IPC_MESSAGE_HANDLER(ViewMsg_PermissionRequestDone,
84 OnPermissionRequestComplete); 84 OnPermissionRequestComplete);
85 IPC_MESSAGE_UNHANDLED(handled = false) 85 IPC_MESSAGE_UNHANDLED(handled = false)
86 IPC_END_MESSAGE_MAP() 86 IPC_END_MESSAGE_MAP()
87 return handled; 87 return handled;
88 } 88 }
89 89
90 void NotificationProvider::OnNavigate() { 90 void NotificationProvider::OnNavigate() {
91 // manager_.Clear(); 91 manager_.Clear();
92 } 92 }
93 93
94 bool NotificationProvider::ShowHTML(const WebNotification& notification, 94 bool NotificationProvider::ShowHTML(const WebNotification& notification,
95 int id) { 95 int id) {
96 // Disallow HTML notifications from non-HTTP schemes. 96 // Disallow HTML notifications from non-HTTP schemes.
97 GURL url = notification.url(); 97 GURL url = notification.url();
98 if (!url.SchemeIs(chrome::kHttpScheme) && 98 if (!url.SchemeIs(chrome::kHttpScheme) &&
99 !url.SchemeIs(chrome::kHttpsScheme) && 99 !url.SchemeIs(chrome::kHttpsScheme) &&
100 !url.SchemeIs(chrome::kExtensionScheme)) 100 !url.SchemeIs(chrome::kExtensionScheme))
101 return false; 101 return false;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void NotificationProvider::OnPermissionRequestComplete(int id) { 147 void NotificationProvider::OnPermissionRequestComplete(int id) {
148 WebNotificationPermissionCallback* callback = manager_.GetCallback(id); 148 WebNotificationPermissionCallback* callback = manager_.GetCallback(id);
149 DCHECK(callback); 149 DCHECK(callback);
150 callback->permissionRequestComplete(); 150 callback->permissionRequestComplete();
151 manager_.OnPermissionRequestComplete(id); 151 manager_.OnPermissionRequestComplete(id);
152 } 152 }
153 153
154 bool NotificationProvider::Send(IPC::Message* message) { 154 bool NotificationProvider::Send(IPC::Message* message) {
155 return RenderThread::current()->Send(message); 155 return RenderThread::current()->Send(message);
156 } 156 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698