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

Side by Side Diff: ui/views/controls/message_box_view.cc

Issue 13524005: Cleanup: remove NotifyAccessibilityEvent from views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/views/controls/menu/submenu_view.cc ('k') | ui/views/controls/native/native_view_host.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/views/controls/message_box_view.h" 5 #include "ui/views/controls/message_box_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 /////////////////////////////////////////////////////////////////////////////// 125 ///////////////////////////////////////////////////////////////////////////////
126 // MessageBoxView, View overrides: 126 // MessageBoxView, View overrides:
127 127
128 void MessageBoxView::ViewHierarchyChanged(bool is_add, 128 void MessageBoxView::ViewHierarchyChanged(bool is_add,
129 View* parent, 129 View* parent,
130 View* child) { 130 View* child) {
131 if (child == this && is_add) { 131 if (child == this && is_add) {
132 if (prompt_field_) 132 if (prompt_field_)
133 prompt_field_->SelectAll(true); 133 prompt_field_->SelectAll(true);
134 134
135 GetWidget()->NotifyAccessibilityEvent( 135 NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_ALERT, true);
136 this, ui::AccessibilityTypes::EVENT_ALERT, true);
137 } 136 }
138 } 137 }
139 138
140 bool MessageBoxView::AcceleratorPressed(const ui::Accelerator& accelerator) { 139 bool MessageBoxView::AcceleratorPressed(const ui::Accelerator& accelerator) {
141 // We only accepts Ctrl-C. 140 // We only accepts Ctrl-C.
142 DCHECK(accelerator.key_code() == 'C' && accelerator.IsCtrlDown()); 141 DCHECK(accelerator.key_code() == 'C' && accelerator.IsCtrlDown());
143 142
144 // We must not intercept Ctrl-C when we have a text box and it's focused. 143 // We must not intercept Ctrl-C when we have a text box and it's focused.
145 if (prompt_field_ && prompt_field_->HasFocus()) 144 if (prompt_field_ && prompt_field_->HasFocus())
146 return false; 145 return false;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 if (checkbox_) { 272 if (checkbox_) {
274 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 273 layout->AddPaddingRow(0, inter_row_vertical_spacing_);
275 layout->StartRow(0, checkbox_column_view_set_id); 274 layout->StartRow(0, checkbox_column_view_set_id);
276 layout->AddView(checkbox_); 275 layout->AddView(checkbox_);
277 } 276 }
278 277
279 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 278 layout->AddPaddingRow(0, inter_row_vertical_spacing_);
280 } 279 }
281 280
282 } // namespace views 281 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/submenu_view.cc ('k') | ui/views/controls/native/native_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698