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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
ash / quick_insert / quick_insert_search_result.cc [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/quick_insert/quick_insert_search_result.h"
#include <cstddef>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include "ui/base/models/image_model.h"
#include "ui/gfx/geometry/size.h"
#include "url/gurl.h"
namespace ash {
QuickInsertTextResult::QuickInsertTextResult(
std::u16string_view text,
QuickInsertTextResult::Source source)
: QuickInsertTextResult(text, u"", ui::ImageModel(), source) {}
QuickInsertTextResult::QuickInsertTextResult(std::u16string_view primary_text,
std::u16string_view secondary_text,
ui::ImageModel icon,
Source source)
: primary_text(primary_text),
secondary_text(secondary_text),
icon(std::move(icon)),
source(source) {}
QuickInsertTextResult::QuickInsertTextResult(const QuickInsertTextResult&) =
default;
QuickInsertTextResult& QuickInsertTextResult::operator=(
const QuickInsertTextResult&) = default;
QuickInsertTextResult::QuickInsertTextResult(QuickInsertTextResult&&) = default;
QuickInsertTextResult& QuickInsertTextResult::operator=(
QuickInsertTextResult&&) = default;
QuickInsertTextResult::~QuickInsertTextResult() = default;
bool QuickInsertTextResult::operator==(const QuickInsertTextResult&) const =
default;
QuickInsertSearchRequestResult::QuickInsertSearchRequestResult(
std::u16string_view primary_text,
std::u16string_view secondary_text,
ui::ImageModel icon)
: primary_text(primary_text),
secondary_text(secondary_text),
icon(std::move(icon)) {}
QuickInsertSearchRequestResult::QuickInsertSearchRequestResult(
const QuickInsertSearchRequestResult&) = default;
QuickInsertSearchRequestResult& QuickInsertSearchRequestResult::operator=(
const QuickInsertSearchRequestResult&) = default;
QuickInsertSearchRequestResult::QuickInsertSearchRequestResult(
QuickInsertSearchRequestResult&&) = default;
QuickInsertSearchRequestResult& QuickInsertSearchRequestResult::operator=(
QuickInsertSearchRequestResult&&) = default;
QuickInsertSearchRequestResult::~QuickInsertSearchRequestResult() = default;
bool QuickInsertSearchRequestResult::operator==(
const QuickInsertSearchRequestResult&) const = default;
QuickInsertEmojiResult QuickInsertEmojiResult::Emoji(std::u16string_view text,
std::u16string name) {
return QuickInsertEmojiResult(Type::kEmoji, text, std::move(name));
}
QuickInsertEmojiResult QuickInsertEmojiResult::Symbol(std::u16string_view text,
std::u16string name) {
return QuickInsertEmojiResult(Type::kSymbol, text, std::move(name));
}
QuickInsertEmojiResult QuickInsertEmojiResult::Emoticon(
std::u16string_view text,
std::u16string name) {
return QuickInsertEmojiResult(Type::kEmoticon, text, std::move(name));
}
QuickInsertEmojiResult::QuickInsertEmojiResult(Type type,
std::u16string_view text,
std::u16string name)
: type(type), text(text), name(std::move(name)) {}
QuickInsertEmojiResult::QuickInsertEmojiResult(const QuickInsertEmojiResult&) =
default;
QuickInsertEmojiResult& QuickInsertEmojiResult::operator=(
const QuickInsertEmojiResult&) = default;
QuickInsertEmojiResult::QuickInsertEmojiResult(QuickInsertEmojiResult&&) =
default;
QuickInsertEmojiResult& QuickInsertEmojiResult::operator=(
QuickInsertEmojiResult&&) = default;
QuickInsertEmojiResult::~QuickInsertEmojiResult() = default;
bool QuickInsertEmojiResult::operator==(const QuickInsertEmojiResult&) const =
default;
QuickInsertGifResult::QuickInsertGifResult(const GURL& preview_url,
const GURL& preview_image_url,
const gfx::Size& preview_dimensions,
const GURL& full_url,
const gfx::Size& full_dimensions,
std::u16string content_description)
: preview_url(preview_url),
preview_image_url(preview_image_url),
preview_dimensions(preview_dimensions),
full_url(full_url),
full_dimensions(full_dimensions),
content_description(std::move(content_description)) {}
QuickInsertGifResult::QuickInsertGifResult(const QuickInsertGifResult&) =
default;
QuickInsertGifResult& QuickInsertGifResult::operator=(
const QuickInsertGifResult&) = default;
QuickInsertGifResult::QuickInsertGifResult(QuickInsertGifResult&&) = default;
QuickInsertGifResult& QuickInsertGifResult::operator=(QuickInsertGifResult&&) =
default;
QuickInsertGifResult::~QuickInsertGifResult() = default;
bool QuickInsertGifResult::operator==(const QuickInsertGifResult&) const =
default;
QuickInsertClipboardResult::QuickInsertClipboardResult(
base::UnguessableToken item_id,
DisplayFormat display_format,
size_t file_count,
std::u16string display_text,
std::optional<ui::ImageModel> display_image,
bool is_recent)
: item_id(item_id),
display_format(display_format),
file_count(file_count),
display_text(std::move(display_text)),
display_image(std::move(display_image)),
is_recent(is_recent) {}
QuickInsertClipboardResult::QuickInsertClipboardResult(
const QuickInsertClipboardResult&) = default;
QuickInsertClipboardResult& QuickInsertClipboardResult::operator=(
const QuickInsertClipboardResult&) = default;
QuickInsertClipboardResult::QuickInsertClipboardResult(
QuickInsertClipboardResult&&) = default;
QuickInsertClipboardResult& QuickInsertClipboardResult::operator=(
QuickInsertClipboardResult&&) = default;
QuickInsertClipboardResult::~QuickInsertClipboardResult() = default;
bool QuickInsertClipboardResult::operator==(
const QuickInsertClipboardResult&) const = default;
QuickInsertLocalFileResult::QuickInsertLocalFileResult(std::u16string title,
base::FilePath file_path,
bool best_match)
: title(std::move(title)),
file_path(std::move(file_path)),
best_match(best_match) {}
QuickInsertLocalFileResult::QuickInsertLocalFileResult(
const QuickInsertLocalFileResult&) = default;
QuickInsertLocalFileResult& QuickInsertLocalFileResult::operator=(
const QuickInsertLocalFileResult&) = default;
QuickInsertLocalFileResult::QuickInsertLocalFileResult(
QuickInsertLocalFileResult&&) = default;
QuickInsertLocalFileResult& QuickInsertLocalFileResult::operator=(
QuickInsertLocalFileResult&&) = default;
QuickInsertLocalFileResult::~QuickInsertLocalFileResult() = default;
bool QuickInsertLocalFileResult::operator==(
const QuickInsertLocalFileResult&) const = default;
QuickInsertDriveFileResult::QuickInsertDriveFileResult(
std::optional<std::string> id,
std::u16string title,
GURL url,
base::FilePath file_path,
bool best_match)
: id(std::move(id)),
title(std::move(title)),
url(std::move(url)),
file_path(std::move(file_path)),
best_match(best_match) {}
QuickInsertDriveFileResult::QuickInsertDriveFileResult(
const QuickInsertDriveFileResult&) = default;
QuickInsertDriveFileResult& QuickInsertDriveFileResult::operator=(
const QuickInsertDriveFileResult&) = default;
QuickInsertDriveFileResult::QuickInsertDriveFileResult(
QuickInsertDriveFileResult&&) = default;
QuickInsertDriveFileResult& QuickInsertDriveFileResult::operator=(
QuickInsertDriveFileResult&&) = default;
QuickInsertDriveFileResult::~QuickInsertDriveFileResult() = default;
bool QuickInsertDriveFileResult::operator==(
const QuickInsertDriveFileResult&) const = default;
QuickInsertBrowsingHistoryResult::QuickInsertBrowsingHistoryResult(
GURL url,
std::u16string title,
ui::ImageModel icon,
bool best_match)
: url(std::move(url)),
title(std::move(title)),
icon(std::move(icon)),
best_match(best_match) {}
QuickInsertBrowsingHistoryResult::QuickInsertBrowsingHistoryResult(
const QuickInsertBrowsingHistoryResult&) = default;
QuickInsertBrowsingHistoryResult& QuickInsertBrowsingHistoryResult::operator=(
const QuickInsertBrowsingHistoryResult&) = default;
QuickInsertBrowsingHistoryResult::QuickInsertBrowsingHistoryResult(
QuickInsertBrowsingHistoryResult&&) = default;
QuickInsertBrowsingHistoryResult& QuickInsertBrowsingHistoryResult::operator=(
QuickInsertBrowsingHistoryResult&&) = default;
QuickInsertBrowsingHistoryResult::~QuickInsertBrowsingHistoryResult() = default;
bool QuickInsertBrowsingHistoryResult::operator==(
const QuickInsertBrowsingHistoryResult&) const = default;
QuickInsertCategoryResult::QuickInsertCategoryResult(
QuickInsertCategory category)
: category(category) {}
QuickInsertCategoryResult::QuickInsertCategoryResult(
const QuickInsertCategoryResult&) = default;
QuickInsertCategoryResult& QuickInsertCategoryResult::operator=(
const QuickInsertCategoryResult&) = default;
QuickInsertCategoryResult::QuickInsertCategoryResult(
QuickInsertCategoryResult&&) = default;
QuickInsertCategoryResult& QuickInsertCategoryResult::operator=(
QuickInsertCategoryResult&&) = default;
QuickInsertCategoryResult::~QuickInsertCategoryResult() = default;
bool QuickInsertCategoryResult::operator==(
const QuickInsertCategoryResult&) const = default;
QuickInsertEditorResult::QuickInsertEditorResult(
Mode mode,
std::u16string display_name,
std::optional<chromeos::editor_menu::PresetQueryCategory> category,
std::optional<std::string> preset_query_id)
: mode(mode),
display_name(std::move(display_name)),
category(std::move(category)),
preset_query_id(std::move(preset_query_id)) {}
QuickInsertEditorResult::QuickInsertEditorResult(
const QuickInsertEditorResult&) = default;
QuickInsertEditorResult& QuickInsertEditorResult::operator=(
const QuickInsertEditorResult&) = default;
QuickInsertEditorResult::QuickInsertEditorResult(QuickInsertEditorResult&&) =
default;
QuickInsertEditorResult& QuickInsertEditorResult::operator=(
QuickInsertEditorResult&&) = default;
QuickInsertEditorResult::~QuickInsertEditorResult() = default;
bool QuickInsertEditorResult::operator==(const QuickInsertEditorResult&) const =
default;
QuickInsertLobsterResult::QuickInsertLobsterResult(Mode mode,
std::u16string display_name)
: mode(mode), display_name(std::move(display_name)) {}
QuickInsertLobsterResult::QuickInsertLobsterResult(
const QuickInsertLobsterResult&) = default;
QuickInsertLobsterResult& QuickInsertLobsterResult::operator=(
const QuickInsertLobsterResult&) = default;
QuickInsertLobsterResult::QuickInsertLobsterResult(QuickInsertLobsterResult&&) =
default;
QuickInsertLobsterResult& QuickInsertLobsterResult::operator=(
QuickInsertLobsterResult&&) = default;
QuickInsertLobsterResult::~QuickInsertLobsterResult() = default;
bool QuickInsertLobsterResult::operator==(
const QuickInsertLobsterResult&) const = default;
QuickInsertNewWindowResult::QuickInsertNewWindowResult(Type type)
: type(type) {}
QuickInsertNewWindowResult::QuickInsertNewWindowResult(
const QuickInsertNewWindowResult&) = default;
QuickInsertNewWindowResult& QuickInsertNewWindowResult::operator=(
const QuickInsertNewWindowResult&) = default;
QuickInsertNewWindowResult::QuickInsertNewWindowResult(
QuickInsertNewWindowResult&&) = default;
QuickInsertNewWindowResult& QuickInsertNewWindowResult::operator=(
QuickInsertNewWindowResult&&) = default;
QuickInsertNewWindowResult::~QuickInsertNewWindowResult() = default;
bool QuickInsertNewWindowResult::operator==(
const QuickInsertNewWindowResult&) const = default;
QuickInsertCapsLockResult::QuickInsertCapsLockResult(
bool enabled,
QuickInsertCapsLockResult::Shortcut shortcut)
: enabled(enabled), shortcut(shortcut) {}
QuickInsertCapsLockResult::QuickInsertCapsLockResult(
const QuickInsertCapsLockResult&) = default;
QuickInsertCapsLockResult& QuickInsertCapsLockResult::operator=(
const QuickInsertCapsLockResult&) = default;
QuickInsertCapsLockResult::QuickInsertCapsLockResult(
QuickInsertCapsLockResult&&) = default;
QuickInsertCapsLockResult& QuickInsertCapsLockResult::operator=(
QuickInsertCapsLockResult&&) = default;
QuickInsertCapsLockResult::~QuickInsertCapsLockResult() = default;
bool QuickInsertCapsLockResult::operator==(
const QuickInsertCapsLockResult&) const = default;
QuickInsertCaseTransformResult::QuickInsertCaseTransformResult(Type type)
: type(type) {}
QuickInsertCaseTransformResult::QuickInsertCaseTransformResult(
const QuickInsertCaseTransformResult&) = default;
QuickInsertCaseTransformResult& QuickInsertCaseTransformResult::operator=(
const QuickInsertCaseTransformResult&) = default;
QuickInsertCaseTransformResult::QuickInsertCaseTransformResult(
QuickInsertCaseTransformResult&&) = default;
QuickInsertCaseTransformResult& QuickInsertCaseTransformResult::operator=(
QuickInsertCaseTransformResult&&) = default;
QuickInsertCaseTransformResult::~QuickInsertCaseTransformResult() = default;
bool QuickInsertCaseTransformResult::operator==(
const QuickInsertCaseTransformResult&) const = default;
} // namespace ash