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 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // A url for the button icons to be shown (optional). | 78 // A url for the button icons to be shown (optional). |
79 const GURL& button_one_icon_url() const { return button_one_icon_url_; } | 79 const GURL& button_one_icon_url() const { return button_one_icon_url_; } |
80 const GURL& button_two_icon_url() const { return button_two_icon_url_; } | 80 const GURL& button_two_icon_url() const { return button_two_icon_url_; } |
81 | 81 |
82 // A url for the image to be shown (optional). | 82 // A url for the image to be shown (optional). |
83 const GURL& image_url() const { return image_url_; } | 83 const GURL& image_url() const { return image_url_; } |
84 | 84 |
85 // Id of the delegate embedded inside this instance. | 85 // Id of the delegate embedded inside this instance. |
86 std::string delegate_id() const { return delegate()->id(); } | 86 std::string delegate_id() const { return delegate()->id(); } |
87 int process_id() const { return delegate()->process_id(); } | |
88 | 87 |
89 content::WebContents* GetWebContents() const { | 88 content::WebContents* GetWebContents() const { |
90 return delegate()->GetWebContents(); | 89 return delegate()->GetWebContents(); |
91 } | 90 } |
92 void DoneRendering() { delegate()->ReleaseRenderViewHost(); } | 91 void DoneRendering() { delegate()->ReleaseRenderViewHost(); } |
93 | 92 |
94 NotificationDelegate* delegate() const { return delegate_.get(); } | 93 NotificationDelegate* delegate() const { return delegate_.get(); } |
95 | 94 |
96 private: | 95 private: |
97 // The Origin of the page/worker which created this notification. | 96 // The Origin of the page/worker which created this notification. |
(...skipping 15 matching lines...) Expand all Loading... |
113 | 112 |
114 // The user-supplied replace ID for the notification. | 113 // The user-supplied replace ID for the notification. |
115 base::string16 replace_id_; | 114 base::string16 replace_id_; |
116 | 115 |
117 // A proxy object that allows access back to the JavaScript object that | 116 // A proxy object that allows access back to the JavaScript object that |
118 // represents the notification, for firing events. | 117 // represents the notification, for firing events. |
119 scoped_refptr<NotificationDelegate> delegate_; | 118 scoped_refptr<NotificationDelegate> delegate_; |
120 }; | 119 }; |
121 | 120 |
122 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ | 121 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ |
OLD | NEW |