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

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

Issue 11028134: Re-factor Ash Message Center code part 2/4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: HideBubble -> HideBubbleWithView Created 8 years, 2 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
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..7ef28b45ef84da5118c803c62c4a7ac90e9631a4
--- /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/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/views/widget/widget_observer.h"
+
+namespace ash {
+
+class TrayBubbleView;
+
+namespace internal {
+
+class TrayBackgroundView;
+class TrayEventFilter;
+
+// Creates and manages thes withe Widget and EventFilter components of a bubble.
jennyz 2012/10/12 23:05:34 "thes withe"->"the"?
stevenjb 2012/10/12 23:41:50 Done.
+
+class TrayBubbleWrapper : public views::WidgetObserver {
+ public:
+ TrayBubbleWrapper(TrayBackgroundView* tray, TrayBubbleView* bubble_view);
+ virtual ~TrayBubbleWrapper();
+
+ // views::WidgetObserver overrides:
+ void OnWidgetClosing(views::Widget* widget);
+
+ TrayBackgroundView* tray() { return tray_; }
+ TrayBubbleView* bubble_view() { return bubble_view_; }
+ views::Widget* bubble_widget() { return bubble_widget_; }
+
+ private:
+ TrayBackgroundView* tray_;
+ TrayBubbleView* bubble_view_; // unowned
+ views::Widget* bubble_widget_;
+ scoped_ptr<TrayEventFilter> tray_event_filter_;
+
+ DISALLOW_COPY_AND_ASSIGN(TrayBubbleWrapper);
+};
+
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_

Powered by Google App Engine
This is Rietveld 408576698