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

Side by Side Diff: ui/message_center/views/message_view.cc

Issue 884653003: gfx::ShadowValue: offset is a Vector2d, not Point. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile. Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/shadow_value_unittest.cc ('k') | ui/views/button_drag_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // static 121 // static
122 gfx::Insets MessageView::GetShadowInsets() { 122 gfx::Insets MessageView::GetShadowInsets() {
123 return gfx::Insets(kShadowBlur / 2 - kShadowOffset, 123 return gfx::Insets(kShadowBlur / 2 - kShadowOffset,
124 kShadowBlur / 2, 124 kShadowBlur / 2,
125 kShadowBlur / 2 + kShadowOffset, 125 kShadowBlur / 2 + kShadowOffset,
126 kShadowBlur / 2); 126 kShadowBlur / 2);
127 } 127 }
128 128
129 void MessageView::CreateShadowBorder() { 129 void MessageView::CreateShadowBorder() {
130 SetBorder(scoped_ptr<views::Border>(new views::ShadowBorder( 130 SetBorder(scoped_ptr<views::Border>(new views::ShadowBorder(
131 gfx::ShadowValue(gfx::Point(0, kShadowOffset), kShadowBlur, 131 gfx::ShadowValue(gfx::Vector2d(0, kShadowOffset), kShadowBlur,
132 message_center::kShadowColor)))); 132 message_center::kShadowColor))));
133 } 133 }
134 134
135 bool MessageView::IsCloseButtonFocused() { 135 bool MessageView::IsCloseButtonFocused() {
136 views::FocusManager* focus_manager = GetFocusManager(); 136 views::FocusManager* focus_manager = GetFocusManager();
137 return focus_manager && focus_manager->GetFocusedView() == close_button(); 137 return focus_manager && focus_manager->GetFocusedView() == close_button();
138 } 138 }
139 139
140 void MessageView::RequestFocusOnCloseButton() { 140 void MessageView::RequestFocusOnCloseButton() {
141 close_button_->RequestFocus(); 141 close_button_->RequestFocus();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 void MessageView::SetDrawBackgroundAsActive(bool active) { 271 void MessageView::SetDrawBackgroundAsActive(bool active) {
272 if (!switches::IsTouchFeedbackEnabled()) 272 if (!switches::IsTouchFeedbackEnabled())
273 return; 273 return;
274 background_view_->background()-> 274 background_view_->background()->
275 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : 275 SetNativeControlColor(active ? kHoveredButtonBackgroundColor :
276 kNotificationBackgroundColor); 276 kNotificationBackgroundColor);
277 SchedulePaint(); 277 SchedulePaint();
278 } 278 }
279 279
280 } // namespace message_center 280 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/gfx/shadow_value_unittest.cc ('k') | ui/views/button_drag_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698