| Index: ash/common/system/toast/toast_overlay.h
|
| diff --git a/ash/common/system/toast/toast_overlay.h b/ash/common/system/toast/toast_overlay.h
|
| index ea2bb391a75349878f3f595f142aee40d5c07f51..4d3fe97fc8a720d81dcf6cd68286c31d9e56864f 100644
|
| --- a/ash/common/system/toast/toast_overlay.h
|
| +++ b/ash/common/system/toast/toast_overlay.h
|
| @@ -8,6 +8,7 @@
|
| #include <memory>
|
|
|
| #include "ash/ash_export.h"
|
| +#include "base/optional.h"
|
| #include "base/strings/string16.h"
|
| #include "ui/compositor/layer_animation_observer.h"
|
| #include "ui/events/event.h"
|
| @@ -38,10 +39,12 @@ class ASH_EXPORT ToastOverlay : public ui::ImplicitAnimationObserver {
|
|
|
| // Creates the Toast overlay UI. |text| is the message to be shown, and
|
| // |dismiss_text| is the message for the button to dismiss the toast message.
|
| - // |dismiss_text| is optional. If empty, the default text is used.
|
| + // If |dismiss_text| is null, no dismiss button will be shown. If
|
| + // |dismiss_text| has a value but the string is empty, the default text is
|
| + // used.
|
| ToastOverlay(Delegate* delegate,
|
| const base::string16& text,
|
| - const base::string16& dismiss_text);
|
| + base::Optional<base::string16> dismiss_text);
|
| ~ToastOverlay() override;
|
|
|
| // Shows or hides the overlay.
|
| @@ -58,11 +61,12 @@ class ASH_EXPORT ToastOverlay : public ui::ImplicitAnimationObserver {
|
| void OnImplicitAnimationsCompleted() override;
|
|
|
| views::Widget* widget_for_testing();
|
| + ToastOverlayButton* dismiss_button_for_testing();
|
| void ClickDismissButtonForTesting(const ui::Event& event);
|
|
|
| Delegate* const delegate_;
|
| const base::string16 text_;
|
| - const base::string16 dismiss_text_;
|
| + const base::Optional<base::string16> dismiss_text_;
|
| std::unique_ptr<views::Widget> overlay_widget_;
|
| std::unique_ptr<ToastOverlayView> overlay_view_;
|
| gfx::Size widget_size_;
|
|
|