Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(918)

Side by Side Diff: ash/common/system/toast/toast_data.h

Issue 2506583005: Hide dismiss button on toast when doing partial screenshot using stylus tools. (Closed)
Patch Set: Add DCHECK Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_COMMON_SYSTEM_TOAST_TOAST_DATA_H_ 5 #ifndef ASH_COMMON_SYSTEM_TOAST_TOAST_DATA_H_
6 #define ASH_COMMON_SYSTEM_TOAST_TOAST_DATA_H_ 6 #define ASH_COMMON_SYSTEM_TOAST_TOAST_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "base/optional.h"
11 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 struct ASH_EXPORT ToastData { 16 struct ASH_EXPORT ToastData {
16 // "|duration_ms| == -1" means the toast view should be displayed until the 17 // "|duration_ms| == -1" means the toast view should be displayed until the
17 // dismiss button is clicked. 18 // dismiss button is clicked.
18 static const int32_t kInfiniteDuration = -1; 19 static const int32_t kInfiniteDuration = -1;
19 20
20 ToastData(std::string id, 21 ToastData(std::string id,
21 const base::string16& text, 22 const base::string16& text,
22 int32_t duration_ms, 23 int32_t duration_ms,
23 const base::string16& dismiss_text); 24 const base::Optional<base::string16>& dismiss_text);
24 ToastData(const ToastData& other); 25 ToastData(const ToastData& other);
26 ~ToastData();
25 27
26 std::string id; 28 std::string id;
27 base::string16 text; 29 base::string16 text;
28 int32_t duration_ms; 30 int32_t duration_ms;
29 base::string16 dismiss_text; 31 base::Optional<base::string16> dismiss_text;
30 }; 32 };
31 33
32 } // namespace ash 34 } // namespace ash
33 35
34 #endif // ASH_COMMON_SYSTEM_TOAST_TOAST_DATA_H_ 36 #endif // ASH_COMMON_SYSTEM_TOAST_TOAST_DATA_H_
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/palette/tools/capture_region_mode.cc ('k') | ash/common/system/toast/toast_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698