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

Unified Diff: ash/system/toast/toast_overlay.h

Issue 2139183003: mash: Migrate //ash/system/toast to WM common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move test back Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/toast/toast_manager_unittest.cc ('k') | ash/system/toast/toast_overlay.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/toast/toast_overlay.h
diff --git a/ash/system/toast/toast_overlay.h b/ash/system/toast/toast_overlay.h
deleted file mode 100644
index 2b4fbbd81eb86980cc4cbe7e79a3137b7b98ce72..0000000000000000000000000000000000000000
--- a/ash/system/toast/toast_overlay.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TOAST_TOAST_OVERLAY_H_
-#define ASH_SYSTEM_TOAST_TOAST_OVERLAY_H_
-
-#include <memory>
-
-#include "ash/ash_export.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/geometry/size.h"
-#include "ui/views/view.h"
-
-namespace gfx {
-class Rect;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-class ToastManagerTest;
-class ToastOverlayView;
-class ToastOverlayButton;
-
-class ASH_EXPORT ToastOverlay : public ui::ImplicitAnimationObserver {
- public:
- class ASH_EXPORT Delegate {
- public:
- virtual ~Delegate() {}
- virtual void OnClosed() = 0;
- };
-
- // 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.
- ToastOverlay(Delegate* delegate,
- const std::string& text,
- const std::string& dismiss_text);
- ~ToastOverlay() override;
-
- // Shows or hides the overlay.
- void Show(bool visible);
-
- private:
- friend class ToastManagerTest;
-
- // Returns the current bounds of the overlay, which is based on visibility.
- gfx::Rect CalculateOverlayBounds();
-
- void OnImplicitAnimationsScheduled() override;
- void OnImplicitAnimationsCompleted() override;
-
- views::Widget* widget_for_testing();
- void ClickDismissButtonForTesting(const ui::Event& event);
-
- Delegate* const delegate_;
- const std::string text_;
- const std::string dismiss_text_;
- std::unique_ptr<views::Widget> overlay_widget_;
- std::unique_ptr<ToastOverlayView> overlay_view_;
- gfx::Size widget_size_;
-
- DISALLOW_COPY_AND_ASSIGN(ToastOverlay);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TOAST_TOAST_OVERLAY_H_
« no previous file with comments | « ash/system/toast/toast_manager_unittest.cc ('k') | ash/system/toast/toast_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698