| Tommy Steimel | 2d48404 | 2025-06-17 19:16:40 | [diff] [blame] | 1 | // Copyright 2025 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_GLIC_GLIC_OCCLUSION_NOTIFIER_H_ |
| 6 | #define CHROME_BROWSER_GLIC_GLIC_OCCLUSION_NOTIFIER_H_ |
| 7 | |
| 8 | #include "chrome/browser/glic/widget/glic_window_controller.h" |
| 9 | |
| 10 | namespace glic { |
| 11 | |
| 12 | // The GlicOcclusionNotifier notifies the PictureInPictureOcclusionTracker when |
| 13 | // to track the Glic window for occlusion of important security dialogs. |
| harringtond | b7441a33 | 2025-10-13 23:50:58 | [diff] [blame] | 14 | class GlicOcclusionNotifier : public PanelStateObserver { |
| Tommy Steimel | 2d48404 | 2025-06-17 19:16:40 | [diff] [blame] | 15 | public: |
| harringtond | b7441a33 | 2025-10-13 23:50:58 | [diff] [blame] | 16 | explicit GlicOcclusionNotifier(GlicInstance& instance); |
| Tommy Steimel | 2d48404 | 2025-06-17 19:16:40 | [diff] [blame] | 17 | GlicOcclusionNotifier(const GlicOcclusionNotifier&) = delete; |
| 18 | GlicOcclusionNotifier& operator=(const GlicOcclusionNotifier&) = delete; |
| 19 | ~GlicOcclusionNotifier() override; |
| 20 | |
| harringtond | b7441a33 | 2025-10-13 23:50:58 | [diff] [blame] | 21 | // PanelStateObserver: |
| Bryant Chandler | b4c8d3f6 | 2025-08-21 16:41:41 | [diff] [blame] | 22 | void PanelStateChanged( |
| 23 | const mojom::PanelState& panel_state, |
| 24 | const GlicWindowController::PanelStateContext& context) override; |
| Tommy Steimel | 2d48404 | 2025-06-17 19:16:40 | [diff] [blame] | 25 | |
| 26 | private: |
| harringtond | b7441a33 | 2025-10-13 23:50:58 | [diff] [blame] | 27 | raw_ref<GlicInstance> glic_instance_; |
| Tommy Steimel | 2d48404 | 2025-06-17 19:16:40 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace glic |
| 31 | |
| 32 | #endif // CHROME_BROWSER_GLIC_GLIC_OCCLUSION_NOTIFIER_H_ |