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

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

Issue 14225010: Sets request_focus_on_press to false for message_center_buttons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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/notification_view.h" 5 #include "ui/message_center/views/notification_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "grit/ui_resources.h" 9 #include "grit/ui_resources.h"
10 #include "ui/base/accessibility/accessible_view_state.h" 10 #include "ui/base/accessibility/accessible_view_state.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 private: 262 private:
263 views::ImageView* icon_; 263 views::ImageView* icon_;
264 views::Label* title_; 264 views::Label* title_;
265 }; 265 };
266 266
267 NotificationButton::NotificationButton(views::ButtonListener* listener) 267 NotificationButton::NotificationButton(views::ButtonListener* listener)
268 : views::CustomButton(listener), 268 : views::CustomButton(listener),
269 icon_(NULL), 269 icon_(NULL),
270 title_(NULL) { 270 title_(NULL) {
271 set_focusable(true); 271 set_focusable(true);
272 set_request_focus_on_press(false);
272 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 273 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
273 kButtonHorizontalPadding, 274 kButtonHorizontalPadding,
274 kButtonVecticalPadding, 275 kButtonVecticalPadding,
275 kButtonIconToTitlePadding)); 276 kButtonIconToTitlePadding));
276 } 277 }
277 278
278 NotificationButton::~NotificationButton() { 279 NotificationButton::~NotificationButton() {
279 } 280 }
280 281
281 void NotificationButton::SetIcon(const gfx::ImageSkia& image) { 282 void NotificationButton::SetIcon(const gfx::ImageSkia& image) {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 return message_view_ ? 605 return message_view_ ?
605 message_view_->GetLinesForWidthAndLimit(width, limit) : 0; 606 message_view_->GetLinesForWidthAndLimit(width, limit) : 0;
606 } 607 }
607 608
608 int NotificationView::GetMessageHeight(int width, int limit) { 609 int NotificationView::GetMessageHeight(int width, int limit) {
609 return message_view_ ? 610 return message_view_ ?
610 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; 611 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0;
611 } 612 }
612 613
613 } // namespace message_center 614 } // namespace message_center
OLDNEW
« ui/message_center/views/message_center_view.cc ('K') | « ui/message_center/views/message_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698