#ifndef ASH_BOCA_SPOTLIGHT_SPOTLIGHT_NOTIFICATION_BUBBLE_CONTROLLER_H_
#define ASH_BOCA_SPOTLIGHT_SPOTLIGHT_NOTIFICATION_BUBBLE_CONTROLLER_H_
#include <memory>
#include <string>
#include "ash/ash_export.h"
#include "ui/events/event.h"
#include "ui/events/event_observer.h"
#include "ui/views/event_monitor.h"
#include "ui/views/widget/widget.h"
namespace ash {
enum class WidgetLocation { kLeft, kRight };
class ASH_EXPORT SpotlightNotificationBubbleController
: public ui::EventObserver {
public:
SpotlightNotificationBubbleController();
SpotlightNotificationBubbleController(
const SpotlightNotificationBubbleController&) = delete;
SpotlightNotificationBubbleController& operator=(
const SpotlightNotificationBubbleController&) = delete;
~SpotlightNotificationBubbleController() override;
views::Widget* GetNotificationWidgetForTesting() {
return notification_widget_.get();
}
WidgetLocation GetWidgetLocationForTesting() { return location_; }
void OnEvent(const ui::Event& event) override;
void ShowNotificationBubble(const std::string& teacher_name);
void HideNotificationBubble();
bool IsNotificationBubbleVisible();
void OnSessionEnded();
private:
const gfx::Rect CalculateWidgetBounds();
void CloseNotificationBubbleNow();
WidgetLocation location_ = WidgetLocation::kRight;
std::unique_ptr<views::Widget> notification_widget_;
std::unique_ptr<views::EventMonitor> event_monitor_;
};
}
#endif