OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MESSAGE_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void CreateShadowBorder(); | 67 void CreateShadowBorder(); |
68 | 68 |
69 bool IsCloseButtonFocused(); | 69 bool IsCloseButtonFocused(); |
70 void RequestFocusOnCloseButton(); | 70 void RequestFocusOnCloseButton(); |
71 | 71 |
72 void set_accessible_name(const base::string16& accessible_name) { | 72 void set_accessible_name(const base::string16& accessible_name) { |
73 accessible_name_ = accessible_name; | 73 accessible_name_ = accessible_name; |
74 } | 74 } |
75 | 75 |
76 // Overridden from views::View: | 76 // Overridden from views::View: |
77 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 77 virtual void GetAccessibleState(ui::AXViewState* state) override; |
78 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 78 virtual bool OnMousePressed(const ui::MouseEvent& event) override; |
79 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 79 virtual bool OnKeyPressed(const ui::KeyEvent& event) override; |
80 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; | 80 virtual bool OnKeyReleased(const ui::KeyEvent& event) override; |
81 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 81 virtual void OnPaint(gfx::Canvas* canvas) override; |
82 virtual void OnFocus() OVERRIDE; | 82 virtual void OnFocus() override; |
83 virtual void OnBlur() OVERRIDE; | 83 virtual void OnBlur() override; |
84 virtual void Layout() OVERRIDE; | 84 virtual void Layout() override; |
85 | 85 |
86 // Overridden from ui::EventHandler: | 86 // Overridden from ui::EventHandler: |
87 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 87 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
88 | 88 |
89 // Overridden from ButtonListener: | 89 // Overridden from ButtonListener: |
90 virtual void ButtonPressed(views::Button* sender, | 90 virtual void ButtonPressed(views::Button* sender, |
91 const ui::Event& event) OVERRIDE; | 91 const ui::Event& event) override; |
92 | 92 |
93 void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; } | 93 void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; } |
94 std::string notification_id() { return notification_id_; } | 94 std::string notification_id() { return notification_id_; } |
95 NotifierId notifier_id() { return notifier_id_; } | 95 NotifierId notifier_id() { return notifier_id_; } |
96 const base::string16& display_source() const { return display_source_; } | 96 const base::string16& display_source() const { return display_source_; } |
97 | 97 |
98 protected: | 98 protected: |
99 // Overridden from views::SlideOutView: | 99 // Overridden from views::SlideOutView: |
100 virtual void OnSlideOut() OVERRIDE; | 100 virtual void OnSlideOut() override; |
101 | 101 |
102 views::ImageView* small_image() { return small_image_view_.get(); } | 102 views::ImageView* small_image() { return small_image_view_.get(); } |
103 views::ImageButton* close_button() { return close_button_.get(); } | 103 views::ImageButton* close_button() { return close_button_.get(); } |
104 views::ScrollView* scroller() { return scroller_; } | 104 views::ScrollView* scroller() { return scroller_; } |
105 | 105 |
106 private: | 106 private: |
107 MessageViewController* controller_; | 107 MessageViewController* controller_; |
108 std::string notification_id_; | 108 std::string notification_id_; |
109 NotifierId notifier_id_; | 109 NotifierId notifier_id_; |
110 views::View* background_view_; // Owned by views hierarchy. | 110 views::View* background_view_; // Owned by views hierarchy. |
(...skipping 10 matching lines...) Expand all Loading... |
121 // Changes the background color being used by |background_view_| and schedules | 121 // Changes the background color being used by |background_view_| and schedules |
122 // a paint. | 122 // a paint. |
123 void SetDrawBackgroundAsActive(bool active); | 123 void SetDrawBackgroundAsActive(bool active); |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(MessageView); | 125 DISALLOW_COPY_AND_ASSIGN(MessageView); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace message_center | 128 } // namespace message_center |
129 | 129 |
130 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ | 130 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ |
OLD | NEW |