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

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

Issue 372093002: Fixes for re-enabling more MSVC level 4 warnings: content/renderer/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment Created 6 years, 5 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 "content/renderer/notification_provider.h" 5 #include "content/renderer/notification_provider.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "content/common/desktop_notification_messages.h" 8 #include "content/common/desktop_notification_messages.h"
9 #include "content/common/frame_messages.h" 9 #include "content/common/frame_messages.h"
10 #include "content/renderer/render_frame_impl.h" 10 #include "content/renderer/render_frame_impl.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const WebNotification& notification) { 60 const WebNotification& notification) {
61 int id; 61 int id;
62 bool id_found = manager_.GetId(notification, id); 62 bool id_found = manager_.GetId(notification, id);
63 // Won't be found if the notification has already been closed by the user. 63 // Won't be found if the notification has already been closed by the user.
64 if (id_found) 64 if (id_found)
65 manager_.UnregisterNotification(id); 65 manager_.UnregisterNotification(id);
66 } 66 }
67 67
68 WebNotificationPresenter::Permission NotificationProvider::checkPermission( 68 WebNotificationPresenter::Permission NotificationProvider::checkPermission(
69 const WebSecurityOrigin& origin) { 69 const WebSecurityOrigin& origin) {
70 int permission; 70 int permission = WebNotificationPresenter::PermissionNotAllowed;
71 Send(new DesktopNotificationHostMsg_CheckPermission( 71 Send(new DesktopNotificationHostMsg_CheckPermission(
72 routing_id(), 72 routing_id(),
73 GURL(origin.toString()), 73 GURL(origin.toString()),
74 &permission)); 74 &permission));
75 return static_cast<WebNotificationPresenter::Permission>(permission); 75 return static_cast<WebNotificationPresenter::Permission>(permission);
76 } 76 }
77 77
78 void NotificationProvider::requestPermission( 78 void NotificationProvider::requestPermission(
79 const WebSecurityOrigin& origin, 79 const WebSecurityOrigin& origin,
80 WebNotificationPermissionCallback* callback) { 80 WebNotificationPermissionCallback* callback) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 DCHECK(callback); 145 DCHECK(callback);
146 callback->permissionRequestComplete(); 146 callback->permissionRequestComplete();
147 manager_.OnPermissionRequestComplete(id); 147 manager_.OnPermissionRequestComplete(id);
148 } 148 }
149 149
150 void NotificationProvider::OnNavigate() { 150 void NotificationProvider::OnNavigate() {
151 manager_.Clear(); 151 manager_.Clear();
152 } 152 }
153 153
154 } // namespace content 154 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/history_serialization.cc ('k') | content/renderer/npapi/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698