blob: d99dfb41174513a2c933e43e18008b825972b96b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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()));
}
|