OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/strings/string16.h" |
11 #include "ui/gfx/point.h" | 12 #include "ui/gfx/point.h" |
12 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
13 #include "ui/message_center/message_center.h" | 14 #include "ui/message_center/message_center.h" |
14 #include "ui/message_center/message_center_tray.h" | 15 #include "ui/message_center/message_center_tray.h" |
15 #include "ui/message_center/message_center_tray_delegate.h" | 16 #include "ui/message_center/message_center_tray_delegate.h" |
16 #include "ui/message_center/views/message_center_view.h" | 17 #include "ui/message_center/views/message_center_view.h" |
17 #include "ui/views/widget/widget_delegate.h" | 18 #include "ui/views/widget/widget_delegate.h" |
18 #include "ui/views/widget/widget_observer.h" | 19 #include "ui/views/widget/widget_observer.h" |
19 | 20 |
20 namespace message_center { | 21 namespace message_center { |
(...skipping 26 matching lines...) Expand all Loading... |
47 // creates the message center widget and sets the notifications. | 48 // creates the message center widget and sets the notifications. |
48 // | 49 // |
49 //////////////////////////////////////////////////////////////////////////////// | 50 //////////////////////////////////////////////////////////////////////////////// |
50 class MessageCenterWidgetDelegate : public views::WidgetDelegate, | 51 class MessageCenterWidgetDelegate : public views::WidgetDelegate, |
51 public message_center::MessageCenterView, | 52 public message_center::MessageCenterView, |
52 public views::WidgetObserver { | 53 public views::WidgetObserver { |
53 public: | 54 public: |
54 MessageCenterWidgetDelegate(WebNotificationTray* tray, | 55 MessageCenterWidgetDelegate(WebNotificationTray* tray, |
55 MessageCenterTray* mc_tray, | 56 MessageCenterTray* mc_tray, |
56 bool initially_settings_visible, | 57 bool initially_settings_visible, |
57 const PositionInfo& pos_info); | 58 const PositionInfo& pos_info, |
| 59 const base::string16& title); |
58 virtual ~MessageCenterWidgetDelegate(); | 60 virtual ~MessageCenterWidgetDelegate(); |
59 | 61 |
60 // WidgetDelegate overrides: | 62 // WidgetDelegate overrides: |
61 virtual View* GetContentsView() OVERRIDE; | 63 virtual View* GetContentsView() OVERRIDE; |
62 virtual views::NonClientFrameView* CreateNonClientFrameView( | 64 virtual views::NonClientFrameView* CreateNonClientFrameView( |
63 views::Widget* widget) OVERRIDE; | 65 views::Widget* widget) OVERRIDE; |
64 virtual void DeleteDelegate() OVERRIDE; | 66 virtual void DeleteDelegate() OVERRIDE; |
65 virtual views::Widget* GetWidget() OVERRIDE; | 67 virtual views::Widget* GetWidget() OVERRIDE; |
66 virtual const views::Widget* GetWidget() const OVERRIDE; | 68 virtual const views::Widget* GetWidget() const OVERRIDE; |
67 | 69 |
(...skipping 28 matching lines...) Expand all Loading... |
96 | 98 |
97 // Info necessary to calculate the estimated position of the message center. | 99 // Info necessary to calculate the estimated position of the message center. |
98 PositionInfo pos_info_; | 100 PositionInfo pos_info_; |
99 | 101 |
100 WebNotificationTray* tray_; | 102 WebNotificationTray* tray_; |
101 }; | 103 }; |
102 | 104 |
103 } // namespace message_center | 105 } // namespace message_center |
104 | 106 |
105 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE
_H_ | 107 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE
_H_ |
OLD | NEW |