xref: /aosp_15_r20/external/libchrome/mojo/public/mojom/base/string16.mojom (revision 635a864187cb8b6c713ff48b7e790a6b21769273)
1*635a8641SAndroid Build Coastguard Worker// Copyright 2016 The Chromium Authors. All rights reserved.
2*635a8641SAndroid Build Coastguard Worker// Use of this source code is governed by a BSD-style license that can be
3*635a8641SAndroid Build Coastguard Worker// found in the LICENSE file.
4*635a8641SAndroid Build Coastguard Worker
5*635a8641SAndroid Build Coastguard Workermodule mojo_base.mojom;
6*635a8641SAndroid Build Coastguard Worker
7*635a8641SAndroid Build Coastguard Workerimport "mojo/public/mojom/base/big_buffer.mojom";
8*635a8641SAndroid Build Coastguard Worker
9*635a8641SAndroid Build Coastguard Worker// Corresponds to |base::string16| in base/strings/string16.h
10*635a8641SAndroid Build Coastguard Worker// Corresponds to |WTF::String| in
11*635a8641SAndroid Build Coastguard Worker// third_party/WebKit/Source/platform/wtf/text/WTFString.h.
12*635a8641SAndroid Build Coastguard Worker// Don't make backwards-incompatible changes to this definition!
13*635a8641SAndroid Build Coastguard Worker// It's used in PageState serialization, so backwards incompatible changes
14*635a8641SAndroid Build Coastguard Worker// would cause stored PageState objects to be un-parseable. Please contact the
15*635a8641SAndroid Build Coastguard Worker// page state serialization owners before making such a change.
16*635a8641SAndroid Build Coastguard Workerstruct String16 {
17*635a8641SAndroid Build Coastguard Worker  array<uint16> data;
18*635a8641SAndroid Build Coastguard Worker};
19*635a8641SAndroid Build Coastguard Worker
20*635a8641SAndroid Build Coastguard Worker// This type should be used in place of String16 whenever the contents of the
21*635a8641SAndroid Build Coastguard Worker// string may realistically exceed 64 kB in size. This string is safe to store
22*635a8641SAndroid Build Coastguard Worker// an arbitrarily large amount of data (available memory permitting) without
23*635a8641SAndroid Build Coastguard Worker// negatively impacting IPC performance or hitting hard message size
24*635a8641SAndroid Build Coastguard Worker// boundaries.
25*635a8641SAndroid Build Coastguard Workerstruct BigString16 {
26*635a8641SAndroid Build Coastguard Worker  BigBuffer data;
27*635a8641SAndroid Build Coastguard Worker};
28