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

Unified Diff: ui/message_center/message_center_tray_host.h

Issue 11819048: Implement message center on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase on master @fa1d2262 and rearrange dependencies. Created 7 years, 11 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: ui/message_center/message_center_tray_host.h
diff --git a/ui/message_center/message_center_tray_host.h b/ui/message_center/message_center_tray_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..96730b76362f72000d3df35650ef531d8061f164
--- /dev/null
+++ b/ui/message_center/message_center_tray_host.h
@@ -0,0 +1,45 @@
+// 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 UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_HOST_H_
+#define UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_HOST_H_
+
+#include <string>
+
+#include "ui/gfx/rect.h"
+#include "ui/message_center/message_center.h"
+#include "ui/message_center/message_center_export.h"
+#include "ui/views/bubble/tray_bubble_view.h"
+#include "ui/views/view.h"
+
+namespace ui {
+
+// System-specific code that manages the UI in the notification area for each
+// system should implement MessageCenterTrayHost.
+class MESSAGE_CENTER_EXPORT MessageCenterTrayHost {
+ public:
+ static MessageCenterTrayHost* GetInstance();
+ virtual ~MessageCenterTrayHost() {}
+
+ virtual message_center::MessageCenter* message_center() = 0;
+ // Events.
+ virtual void OnMessageCenterTrayChanged() = 0;
+ virtual void OnShowMessageCenterBubble() = 0;
+ virtual void OnHideMessageCenterBubble() = 0;
+ // System-specific information related to rendering the bubbles.
+ virtual gfx::NativeView GetBubbleWindowContainer() = 0;
+ virtual views::View* GetAnchorView() = 0;
+ virtual gfx::Rect GetAnchorRect(
+ views::Widget* anchor_widget,
+ views::TrayBubbleView::AnchorType anchor_type,
+ views::TrayBubbleView::AnchorAlignment anchor_alignment) = 0;
+ virtual views::TrayBubbleView::AnchorAlignment GetAnchorAlignment() = 0;
+ virtual void UpdateInitParams(
+ views::TrayBubbleView::InitParams* init_params) = 0;
+ virtual string16 GetAccessibleNameForBubble() = 0;
+ virtual bool CanShowPopups() = 0;
+};
+
+} // namespace ui
+#endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_TRAY_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698