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

Side by Side Diff: ui/message_center/views/message_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
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 "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "grit/ui_strings.h" 8 #include "grit/ui_strings.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 private: 72 private:
73 gfx::Insets padding_; 73 gfx::Insets padding_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(ControlButton); 75 DISALLOW_COPY_AND_ASSIGN(ControlButton);
76 }; 76 };
77 77
78 ControlButton::ControlButton(views::ButtonListener* listener) 78 ControlButton::ControlButton(views::ButtonListener* listener)
79 : views::ImageButton(listener) { 79 : views::ImageButton(listener) {
80 set_focusable(true); 80 set_focusable(true);
81 set_request_focus_on_press(false);
81 } 82 }
82 83
83 ControlButton::~ControlButton() { 84 ControlButton::~ControlButton() {
84 } 85 }
85 86
86 void ControlButton::SetPadding(int horizontal_padding, int vertical_padding) { 87 void ControlButton::SetPadding(int horizontal_padding, int vertical_padding) {
87 padding_.Set(std::max(vertical_padding, 0), 88 padding_.Set(std::max(vertical_padding, 0),
88 std::max(horizontal_padding, 0), 89 std::max(horizontal_padding, 0),
89 std::max(-vertical_padding, 0), 90 std::max(-vertical_padding, 0),
90 std::max(-horizontal_padding, 0)); 91 std::max(-horizontal_padding, 0));
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 gfx::Rect(screen_location, gfx::Size()), 383 gfx::Rect(screen_location, gfx::Size()),
383 views::MenuItemView::TOPRIGHT, 384 views::MenuItemView::TOPRIGHT,
384 views::MenuRunner::HAS_MNEMONICS)); 385 views::MenuRunner::HAS_MNEMONICS));
385 } 386 }
386 387
387 void MessageView::OnSlideOut() { 388 void MessageView::OnSlideOut() {
388 message_center_->RemoveNotification(notification_id_, true); // By user. 389 message_center_->RemoveNotification(notification_id_, true); // By user.
389 } 390 }
390 391
391 } // namespace message_center 392 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_view.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698