1// Copyright 2016 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. 4 5module mojo_base.mojom; 6 7import "mojo/public/mojom/base/big_buffer.mojom"; 8 9// Corresponds to |base::string16| in base/strings/string16.h 10// Corresponds to |WTF::String| in 11// third_party/WebKit/Source/platform/wtf/text/WTFString.h. 12// Don't make backwards-incompatible changes to this definition! 13// It's used in PageState serialization, so backwards incompatible changes 14// would cause stored PageState objects to be un-parseable. Please contact the 15// page state serialization owners before making such a change. 16struct String16 { 17 array<uint16> data; 18}; 19 20// This type should be used in place of String16 whenever the contents of the 21// string may realistically exceed 64 kB in size. This string is safe to store 22// an arbitrarily large amount of data (available memory permitting) without 23// negatively impacting IPC performance or hitting hard message size 24// boundaries. 25struct BigString16 { 26 BigBuffer data; 27}; 28