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

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: fix 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
« no previous file with comments | « ui/message_center/views/message_view.cc ('k') | no next file » | 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/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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 private: 263 private:
264 views::ImageView* icon_; 264 views::ImageView* icon_;
265 views::Label* title_; 265 views::Label* title_;
266 }; 266 };
267 267
268 NotificationButton::NotificationButton(views::ButtonListener* listener) 268 NotificationButton::NotificationButton(views::ButtonListener* listener)
269 : views::CustomButton(listener), 269 : views::CustomButton(listener),
270 icon_(NULL), 270 icon_(NULL),
271 title_(NULL) { 271 title_(NULL) {
272 set_focusable(true); 272 set_focusable(true);
273 set_request_focus_on_press(false);
273 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 274 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
274 kButtonHorizontalPadding, 275 kButtonHorizontalPadding,
275 kButtonVecticalPadding, 276 kButtonVecticalPadding,
276 kButtonIconToTitlePadding)); 277 kButtonIconToTitlePadding));
277 } 278 }
278 279
279 NotificationButton::~NotificationButton() { 280 NotificationButton::~NotificationButton() {
280 } 281 }
281 282
282 void NotificationButton::SetIcon(const gfx::ImageSkia& image) { 283 void NotificationButton::SetIcon(const gfx::ImageSkia& image) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 return message_view_ ? 616 return message_view_ ?
616 message_view_->GetLinesForWidthAndLimit(width, limit) : 0; 617 message_view_->GetLinesForWidthAndLimit(width, limit) : 0;
617 } 618 }
618 619
619 int NotificationView::GetMessageHeight(int width, int limit) { 620 int NotificationView::GetMessageHeight(int width, int limit) {
620 return message_view_ ? 621 return message_view_ ?
621 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; 622 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0;
622 } 623 }
623 624
624 } // namespace message_center 625 } // namespace message_center
OLDNEW
« no previous file with comments | « 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