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 #include "ui/message_center/views/message_view.h" | 5 #include "ui/message_center/views/message_view.h" |
6 | 6 |
7 #include "ui/accessibility/ax_view_state.h" | 7 #include "ui/accessibility/ax_view_state.h" |
8 #include "ui/base/l10n/l10n_util.h" | 8 #include "ui/base/l10n/l10n_util.h" |
9 #include "ui/base/models/simple_menu_model.h" | 9 #include "ui/base/models/simple_menu_model.h" |
10 #include "ui/base/ui_base_switches_util.h" | 10 #include "ui/base/ui_base_switches_util.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 // static | 75 // static |
76 gfx::Insets MessageView::GetShadowInsets() { | 76 gfx::Insets MessageView::GetShadowInsets() { |
77 return gfx::Insets(kShadowBlur / 2 - kShadowOffset, | 77 return gfx::Insets(kShadowBlur / 2 - kShadowOffset, |
78 kShadowBlur / 2, | 78 kShadowBlur / 2, |
79 kShadowBlur / 2 + kShadowOffset, | 79 kShadowBlur / 2 + kShadowOffset, |
80 kShadowBlur / 2); | 80 kShadowBlur / 2); |
81 } | 81 } |
82 | 82 |
83 void MessageView::CreateShadowBorder() { | 83 void MessageView::CreateShadowBorder() { |
84 SetBorder(scoped_ptr<views::Border>(new views::ShadowBorder( | 84 SetBorder(std::unique_ptr<views::Border>(new views::ShadowBorder( |
85 gfx::ShadowValue(gfx::Vector2d(0, kShadowOffset), kShadowBlur, | 85 gfx::ShadowValue(gfx::Vector2d(0, kShadowOffset), kShadowBlur, |
86 message_center::kShadowColor)))); | 86 message_center::kShadowColor)))); |
87 } | 87 } |
88 | 88 |
89 bool MessageView::IsCloseButtonFocused() { | 89 bool MessageView::IsCloseButtonFocused() { |
90 // May be overridden by the owner of the close button. | 90 // May be overridden by the owner of the close button. |
91 return false; | 91 return false; |
92 } | 92 } |
93 | 93 |
94 void MessageView::RequestFocusOnCloseButton() { | 94 void MessageView::RequestFocusOnCloseButton() { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 void MessageView::SetDrawBackgroundAsActive(bool active) { | 217 void MessageView::SetDrawBackgroundAsActive(bool active) { |
218 if (!switches::IsTouchFeedbackEnabled()) | 218 if (!switches::IsTouchFeedbackEnabled()) |
219 return; | 219 return; |
220 background_view_->background()-> | 220 background_view_->background()-> |
221 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : | 221 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : |
222 kNotificationBackgroundColor); | 222 kNotificationBackgroundColor); |
223 SchedulePaint(); | 223 SchedulePaint(); |
224 } | 224 } |
225 | 225 |
226 } // namespace message_center | 226 } // namespace message_center |
OLD | NEW |