Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / notifications / notification_object_proxy.cc
index af4524b..2b8803f 100644 (file)
@@ -5,21 +5,15 @@
 #include "chrome/browser/notifications/notification_object_proxy.h"
 
 #include "base/guid.h"
-#include "base/strings/stringprintf.h"
 #include "content/public/browser/desktop_notification_delegate.h"
-#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/render_process_host.h"
-#include "content/public/browser/web_contents.h"
 
 NotificationObjectProxy::NotificationObjectProxy(
-    content::RenderFrameHost* render_frame_host,
-    content::DesktopNotificationDelegate* delegate)
-    : render_process_id_(render_frame_host->GetProcess()->GetID()),
-      render_frame_id_(render_frame_host->GetRoutingID()),
-      delegate_(delegate),
+    scoped_ptr<content::DesktopNotificationDelegate> delegate)
+    : delegate_(delegate.Pass()),
       displayed_(false),
-      id_(base::GenerateGUID()) {
-}
+      id_(base::GenerateGUID()) {}
+
+NotificationObjectProxy::~NotificationObjectProxy() {}
 
 void NotificationObjectProxy::Display() {
   // This method is called each time the notification is shown to the user
@@ -31,10 +25,6 @@ void NotificationObjectProxy::Display() {
   delegate_->NotificationDisplayed();
 }
 
-void NotificationObjectProxy::Error() {
-  delegate_->NotificationError();
-}
-
 void NotificationObjectProxy::Close(bool by_user) {
   delegate_->NotificationClosed(by_user);
 }
@@ -46,12 +36,3 @@ void NotificationObjectProxy::Click() {
 std::string NotificationObjectProxy::id() const {
   return id_;
 }
-
-int NotificationObjectProxy::process_id() const {
-  return render_process_id_;
-}
-
-content::WebContents* NotificationObjectProxy::GetWebContents() const {
-  return content::WebContents::FromRenderFrameHost(
-      content::RenderFrameHost::FromID(render_process_id_, render_frame_id_));
-}