| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_MESSAGE_CENTER_VIEWS_NOTIFIER_SETTINGS_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFIER_SETTINGS_VIEW_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFIER_SETTINGS_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFIER_SETTINGS_VIEW_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "ui/gfx/image/image.h" | 12 #include "ui/gfx/image/image.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 15 #include "ui/message_center/message_center_export.h" | 15 #include "ui/message_center/message_center_export.h" |
| 16 #include "ui/message_center/notifier_settings.h" | 16 #include "ui/message_center/notifier_settings.h" |
| 17 #include "ui/views/controls/button/button.h" | 17 #include "ui/views/controls/button/button.h" |
| 18 #include "ui/views/widget/widget_delegate.h" | 18 #include "ui/views/widget/widget_delegate.h" |
| 19 | 19 |
| 20 namespace views { |
| 21 class ScrollView; |
| 22 } |
| 23 |
| 20 namespace message_center { | 24 namespace message_center { |
| 21 | 25 |
| 22 // A class to show the list of notifier extensions / URL patterns and allow | 26 // A class to show the list of notifier extensions / URL patterns and allow |
| 23 // users to customize the settings. | 27 // users to customize the settings. |
| 24 class MESSAGE_CENTER_EXPORT NotifierSettingsView | 28 class MESSAGE_CENTER_EXPORT NotifierSettingsView |
| 25 : public NotifierSettingsDelegate, | 29 : public NotifierSettingsDelegate, |
| 26 public views::WidgetDelegateView, | 30 public views::WidgetDelegateView, |
| 27 public views::ButtonListener { | 31 public views::ButtonListener { |
| 28 public: | 32 public: |
| 29 // Create a new widget of the notifier settings and returns it. Note that | 33 // Create a new widget of the notifier settings and returns it. Note that |
| (...skipping 11 matching lines...) Expand all Loading... |
| 41 delegate_ = new_delegate; | 45 delegate_ = new_delegate; |
| 42 } | 46 } |
| 43 | 47 |
| 44 private: | 48 private: |
| 45 class NotifierButton; | 49 class NotifierButton; |
| 46 | 50 |
| 47 NotifierSettingsView(NotifierSettingsProvider* delegate); | 51 NotifierSettingsView(NotifierSettingsProvider* delegate); |
| 48 virtual ~NotifierSettingsView(); | 52 virtual ~NotifierSettingsView(); |
| 49 | 53 |
| 50 // Overridden from views::WidgetDelegate: | 54 // Overridden from views::WidgetDelegate: |
| 51 virtual bool CanResize() const OVERRIDE; | |
| 52 virtual string16 GetWindowTitle() const OVERRIDE; | |
| 53 virtual void WindowClosing() OVERRIDE; | 55 virtual void WindowClosing() OVERRIDE; |
| 54 virtual views::View* GetContentsView() OVERRIDE; | 56 virtual views::View* GetContentsView() OVERRIDE; |
| 55 | 57 |
| 58 // Overridden from views::View: |
| 59 virtual void Layout() OVERRIDE; |
| 60 virtual gfx::Size GetMinimumSize() OVERRIDE; |
| 61 |
| 56 // Overridden from views::ButtonListener: | 62 // Overridden from views::ButtonListener: |
| 57 virtual void ButtonPressed(views::Button* sender, | 63 virtual void ButtonPressed(views::Button* sender, |
| 58 const ui::Event& event) OVERRIDE; | 64 const ui::Event& event) OVERRIDE; |
| 59 | 65 |
| 66 views::View* title_entry_; |
| 67 views::ScrollView* scroller_; |
| 68 views::View* separator_; |
| 60 NotifierSettingsProvider* delegate_; | 69 NotifierSettingsProvider* delegate_; |
| 61 std::set<NotifierButton*> buttons_; | 70 std::set<NotifierButton*> buttons_; |
| 62 | 71 |
| 63 DISALLOW_COPY_AND_ASSIGN(NotifierSettingsView); | 72 DISALLOW_COPY_AND_ASSIGN(NotifierSettingsView); |
| 64 }; | 73 }; |
| 65 | 74 |
| 66 } // namespace message_center | 75 } // namespace message_center |
| 67 | 76 |
| 68 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFIER_SETTINGS_VIEW_H_ | 77 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFIER_SETTINGS_VIEW_H_ |
| OLD | NEW |