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

Unified Diff: ash/system/tray/tray_bubble_wrapper.h

Issue 2095663004: Revert of mash: Convert TrayBackgroundView to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/tray/tray_background_view.cc ('k') | ash/system/tray/tray_bubble_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_bubble_wrapper.h
diff --git a/ash/system/tray/tray_bubble_wrapper.h b/ash/system/tray/tray_bubble_wrapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..2e82b40c0c492ca984be9c17dce7e5d19c3994a4
--- /dev/null
+++ b/ash/system/tray/tray_bubble_wrapper.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 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_TRAY_TRAY_BUBBLE_WRAPPER_H_
+#define ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_
+
+#include "base/macros.h"
+#include "ui/views/widget/widget_observer.h"
+
+namespace views {
+class TrayBubbleView;
+}
+
+namespace ash {
+class TrayBackgroundView;
+class TrayEventFilter;
+
+// Creates and manages the Widget and EventFilter components of a bubble.
+
+class TrayBubbleWrapper : public views::WidgetObserver {
+ public:
+ TrayBubbleWrapper(TrayBackgroundView* tray,
+ views::TrayBubbleView* bubble_view);
+ ~TrayBubbleWrapper() override;
+
+ // views::WidgetObserver overrides:
+ void OnWidgetDestroying(views::Widget* widget) override;
+ void OnWidgetBoundsChanged(views::Widget* widget,
+ const gfx::Rect& new_bounds) override;
+
+ const TrayBackgroundView* tray() const { return tray_; }
+ TrayBackgroundView* tray() { return tray_; }
+ const views::TrayBubbleView* bubble_view() const { return bubble_view_; }
+ const views::Widget* bubble_widget() const { return bubble_widget_; }
+
+ private:
+ TrayBackgroundView* tray_;
+ views::TrayBubbleView* bubble_view_; // unowned
+ views::Widget* bubble_widget_;
+
+ DISALLOW_COPY_AND_ASSIGN(TrayBubbleWrapper);
+};
+
+} // namespace ash
+
+#endif // ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_
« no previous file with comments | « ash/system/tray/tray_background_view.cc ('k') | ash/system/tray/tray_bubble_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698