| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |