summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_web_database_observer.cc
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 03:32:59 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 03:32:59 +0000
commite2b2d4ae919f7df1ca65eaace83e4d6cf5084e47 (patch)
tree49d1df1766d402f6f34eb3fab0be57aef4216053 /chrome/renderer/renderer_web_database_observer.cc
parent73142769aac422267b84568000a5cc2a4b024f3d (diff)
downloadchromium_src-e2b2d4ae919f7df1ca65eaace83e4d6cf5084e47.zip
chromium_src-e2b2d4ae919f7df1ca65eaace83e4d6cf5084e47.tar.gz
chromium_src-e2b2d4ae919f7df1ca65eaace83e4d6cf5084e47.tar.bz2
Implementing WebDatabaseObserver in the renderer process.
BUG=none TEST=none Review URL: http://codereview.chromium.org/293038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_web_database_observer.cc')
-rw-r--r--chrome/renderer/renderer_web_database_observer.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/chrome/renderer/renderer_web_database_observer.cc b/chrome/renderer/renderer_web_database_observer.cc
new file mode 100644
index 0000000..d99dfb4
--- /dev/null
+++ b/chrome/renderer/renderer_web_database_observer.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/renderer/renderer_web_database_observer.h"
+
+#include "chrome/common/render_messages.h"
+#include "webkit/api/public/WebDatabase.h"
+
+RendererWebDatabaseObserver::RendererWebDatabaseObserver(
+ IPC::Message::Sender* sender)
+ : sender_(sender) {
+}
+
+void RendererWebDatabaseObserver::databaseOpened(
+ const WebKit::WebDatabase& database) {
+ sender_->Send(new ViewHostMsg_DatabaseOpened(
+ database.securityOrigin().databaseIdentifier(), database.name(),
+ database.displayName(), database.estimatedSize()));
+}
+
+void RendererWebDatabaseObserver::databaseModified(
+ const WebKit::WebDatabase& database) {
+ sender_->Send(new ViewHostMsg_DatabaseModified(
+ database.securityOrigin().databaseIdentifier(), database.name()));
+}
+
+void RendererWebDatabaseObserver::databaseClosed(
+ const WebKit::WebDatabase& database) {
+ sender_->Send(new ViewHostMsg_DatabaseClosed(
+ database.securityOrigin().databaseIdentifier(), database.name()));
+}