Roll src/third_party/WebKit 29324ab:10b2b4a (svn 202547:202548)
[chromium-blink-merge.git] / content / common / quota_messages.h
blob06ec3d3686db16eccf263755ab99d74020c5a2f4
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Multiply-included message file, hence no include guard.
7 #include "base/basictypes.h"
8 #include "content/public/common/storage_quota_params.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "storage/common/quota/quota_types.h"
11 #include "url/gurl.h"
13 #define IPC_MESSAGE_START QuotaMsgStart
15 IPC_ENUM_TRAITS_MAX_VALUE(storage::StorageType, storage::kStorageTypeLast)
16 IPC_ENUM_TRAITS_MAX_VALUE(storage::QuotaStatusCode, storage::kQuotaStatusLast)
18 IPC_STRUCT_TRAITS_BEGIN(content::StorageQuotaParams)
19 IPC_STRUCT_TRAITS_MEMBER(render_view_id)
20 IPC_STRUCT_TRAITS_MEMBER(request_id)
21 IPC_STRUCT_TRAITS_MEMBER(origin_url)
22 IPC_STRUCT_TRAITS_MEMBER(storage_type)
23 IPC_STRUCT_TRAITS_MEMBER(requested_size)
24 IPC_STRUCT_TRAITS_MEMBER(user_gesture)
25 IPC_STRUCT_TRAITS_END()
27 // Quota messages sent from the browser to the child process.
29 IPC_MESSAGE_CONTROL3(QuotaMsg_DidGrantStorageQuota,
30 int /* request_id */,
31 int64 /* current_usage */,
32 int64 /* granted_quota */)
34 IPC_MESSAGE_CONTROL3(QuotaMsg_DidQueryStorageUsageAndQuota,
35 int /* request_id */,
36 int64 /* current_usage */,
37 int64 /* current_quota */)
39 IPC_MESSAGE_CONTROL2(QuotaMsg_DidFail,
40 int /* request_id */,
41 storage::QuotaStatusCode /* error */)
43 // Quota messages sent from the child process to the browser.
45 IPC_MESSAGE_CONTROL3(QuotaHostMsg_QueryStorageUsageAndQuota,
46 int /* request_id */,
47 GURL /* origin_url */,
48 storage::StorageType /* type */)
50 IPC_MESSAGE_CONTROL1(QuotaHostMsg_RequestStorageQuota,
51 content::StorageQuotaParams)