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

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

Issue 10693160: Add and specify Views::Textfield::SelectAll |reversed| flag, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove redundant comments. Created 8 years, 5 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/gfx/render_text_unittest.cc ('k') | ui/views/controls/textfield/native_textfield_views.h » ('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/string_split.h" 9 #include "base/string_split.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 /////////////////////////////////////////////////////////////////////////////// 120 ///////////////////////////////////////////////////////////////////////////////
121 // MessageBoxView, View overrides: 121 // MessageBoxView, View overrides:
122 122
123 void MessageBoxView::ViewHierarchyChanged(bool is_add, 123 void MessageBoxView::ViewHierarchyChanged(bool is_add,
124 View* parent, 124 View* parent,
125 View* child) { 125 View* child) {
126 if (child == this && is_add) { 126 if (child == this && is_add) {
127 if (prompt_field_) 127 if (prompt_field_)
128 prompt_field_->SelectAll(); 128 prompt_field_->SelectAll(true);
129 129
130 GetWidget()->NotifyAccessibilityEvent( 130 GetWidget()->NotifyAccessibilityEvent(
131 this, ui::AccessibilityTypes::EVENT_ALERT, true); 131 this, ui::AccessibilityTypes::EVENT_ALERT, true);
132 } 132 }
133 } 133 }
134 134
135 bool MessageBoxView::AcceleratorPressed(const ui::Accelerator& accelerator) { 135 bool MessageBoxView::AcceleratorPressed(const ui::Accelerator& accelerator) {
136 // We only accepts Ctrl-C. 136 // We only accepts Ctrl-C.
137 DCHECK(accelerator.key_code() == 'C' && accelerator.IsCtrlDown()); 137 DCHECK(accelerator.key_code() == 'C' && accelerator.IsCtrlDown());
138 138
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if (checkbox_) { 261 if (checkbox_) {
262 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 262 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
263 layout->StartRow(0, checkbox_column_view_set_id); 263 layout->StartRow(0, checkbox_column_view_set_id);
264 layout->AddView(checkbox_); 264 layout->AddView(checkbox_);
265 } 265 }
266 266
267 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 267 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
268 } 268 }
269 269
270 } // namespace views 270 } // namespace views
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698