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

Side by Side Diff: chrome/browser/notifications/notification_object_proxy.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 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
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/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;
11
10 NotificationObjectProxy::NotificationObjectProxy(int process_id, int route_id, 12 NotificationObjectProxy::NotificationObjectProxy(int process_id, int route_id,
11 int notification_id, bool worker) 13 int notification_id, bool worker)
12 : process_id_(process_id), 14 : process_id_(process_id),
13 route_id_(route_id), 15 route_id_(route_id),
14 notification_id_(notification_id), 16 notification_id_(notification_id),
15 worker_(worker) { 17 worker_(worker) {
16 if (worker_) { 18 if (worker_) {
17 // TODO(johnnyg): http://crbug.com/23065 Worker support coming soon. 19 // TODO(johnnyg): http://crbug.com/23065 Worker support coming soon.
18 NOTREACHED(); 20 NOTREACHED();
19 } 21 }
(...skipping 20 matching lines...) Expand all
40 void NotificationObjectProxy::Click() { 42 void NotificationObjectProxy::Click() {
41 RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_); 43 RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_);
42 if (host) 44 if (host)
43 host->DesktopNotificationPostClick(notification_id_); 45 host->DesktopNotificationPostClick(notification_id_);
44 } 46 }
45 47
46 std::string NotificationObjectProxy::id() const { 48 std::string NotificationObjectProxy::id() const {
47 return StringPrintf("%d:%d:%d:%d", process_id_, route_id_, 49 return StringPrintf("%d:%d:%d:%d", process_id_, route_id_,
48 notification_id_, worker_); 50 notification_id_, worker_);
49 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/oom_priority_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698