OLD | NEW |
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/notifications/notification_object_proxy.h" | 5 #include "chrome/browser/notifications/notification_object_proxy.h" |
6 | 6 |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "content/public/browser/render_view_host.h" | 8 #include "content/public/browser/render_view_host.h" |
9 | 9 |
10 using content::RenderViewHost; | 10 using content::RenderViewHost; |
(...skipping 28 matching lines...) Expand all Loading... |
39 host->DesktopNotificationPostClose(notification_id_, by_user); | 39 host->DesktopNotificationPostClose(notification_id_, by_user); |
40 } | 40 } |
41 | 41 |
42 void NotificationObjectProxy::Click() { | 42 void NotificationObjectProxy::Click() { |
43 RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_); | 43 RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_); |
44 if (host) | 44 if (host) |
45 host->DesktopNotificationPostClick(notification_id_); | 45 host->DesktopNotificationPostClick(notification_id_); |
46 } | 46 } |
47 | 47 |
48 std::string NotificationObjectProxy::id() const { | 48 std::string NotificationObjectProxy::id() const { |
49 return StringPrintf("%d:%d:%d:%d", process_id_, route_id_, | 49 return base::StringPrintf("%d:%d:%d:%d", process_id_, route_id_, |
50 notification_id_, worker_); | 50 notification_id_, worker_); |
51 } | 51 } |
52 | 52 |
53 RenderViewHost* NotificationObjectProxy::GetRenderViewHost() const { | 53 RenderViewHost* NotificationObjectProxy::GetRenderViewHost() const { |
54 return RenderViewHost::FromID(process_id_, route_id_); | 54 return RenderViewHost::FromID(process_id_, route_id_); |
55 } | 55 } |
OLD | NEW |