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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 687183004: Remove the OnError method from notification delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void NotificationDisplayed() override { 94 void NotificationDisplayed() override {
95 RenderFrameHost* rfh = 95 RenderFrameHost* rfh =
96 RenderFrameHost::FromID(render_process_id_, render_frame_id_); 96 RenderFrameHost::FromID(render_process_id_, render_frame_id_);
97 if (!rfh) 97 if (!rfh)
98 return; 98 return;
99 99
100 rfh->Send(new DesktopNotificationMsg_PostDisplay( 100 rfh->Send(new DesktopNotificationMsg_PostDisplay(
101 rfh->GetRoutingID(), notification_id_)); 101 rfh->GetRoutingID(), notification_id_));
102 } 102 }
103 103
104 void NotificationError() override {
105 RenderFrameHost* rfh =
106 RenderFrameHost::FromID(render_process_id_, render_frame_id_);
107 if (!rfh)
108 return;
109
110 rfh->Send(new DesktopNotificationMsg_PostError(
111 rfh->GetRoutingID(), notification_id_));
112 }
113
114 void NotificationClosed(bool by_user) override { 104 void NotificationClosed(bool by_user) override {
115 RenderFrameHost* rfh = 105 RenderFrameHost* rfh =
116 RenderFrameHost::FromID(render_process_id_, render_frame_id_); 106 RenderFrameHost::FromID(render_process_id_, render_frame_id_);
117 if (!rfh) 107 if (!rfh)
118 return; 108 return;
119 109
120 rfh->Send(new DesktopNotificationMsg_PostClose( 110 rfh->Send(new DesktopNotificationMsg_PostClose(
121 rfh->GetRoutingID(), notification_id_, by_user)); 111 rfh->GetRoutingID(), notification_id_, by_user));
122 static_cast<RenderFrameHostImpl*>(rfh)->NotificationClosed( 112 static_cast<RenderFrameHostImpl*>(rfh)->NotificationClosed(
123 notification_id_); 113 notification_id_);
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 void RenderFrameHostImpl::DidUseGeolocationPermission() { 1649 void RenderFrameHostImpl::DidUseGeolocationPermission() {
1660 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); 1650 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame();
1661 GetContentClient()->browser()->RegisterPermissionUsage( 1651 GetContentClient()->browser()->RegisterPermissionUsage(
1662 PERMISSION_GEOLOCATION, 1652 PERMISSION_GEOLOCATION,
1663 delegate_->GetAsWebContents(), 1653 delegate_->GetAsWebContents(),
1664 GetLastCommittedURL().GetOrigin(), 1654 GetLastCommittedURL().GetOrigin(),
1665 top_frame->GetLastCommittedURL().GetOrigin()); 1655 top_frame->GetLastCommittedURL().GetOrigin());
1666 } 1656 }
1667 1657
1668 } // namespace content 1658 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698