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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 165223002: rAc: minimal crash fix for bug 342990. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 | « no previous file | 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 "chrome/browser/ui/views/autofill/autofill_dialog_views.h" 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 return all_valid; 2202 return all_valid;
2203 } 2203 }
2204 2204
2205 void AutofillDialogViews::InputEditedOrActivated(ServerFieldType type, 2205 void AutofillDialogViews::InputEditedOrActivated(ServerFieldType type,
2206 const gfx::Rect& bounds, 2206 const gfx::Rect& bounds,
2207 bool was_edit) { 2207 bool was_edit) {
2208 DCHECK_NE(UNKNOWN_TYPE, type); 2208 DCHECK_NE(UNKNOWN_TYPE, type);
2209 2209
2210 DecoratedTextfield* decorated = TextfieldForType(type); 2210 DecoratedTextfield* decorated = TextfieldForType(type);
2211 views::Combobox* combobox = ComboboxForType(type); 2211 views::Combobox* combobox = ComboboxForType(type);
2212
2213 // Both views may be NULL if the event comes from an inactive section, which
2214 // may occur when using an IME.
2215 if (!combobox && !decorated)
2216 return;
2217
2212 DCHECK_NE(!!combobox, !!decorated); 2218 DCHECK_NE(!!combobox, !!decorated);
2213 DetailsGroup* group = decorated ? GroupForView(decorated) : 2219 DetailsGroup* group = decorated ? GroupForView(decorated) :
2214 GroupForView(combobox); 2220 GroupForView(combobox);
2215 base::string16 text = decorated ? 2221 base::string16 text = decorated ?
2216 decorated->text() : 2222 decorated->text() :
2217 combobox->model()->GetItemAt(combobox->selected_index()); 2223 combobox->model()->GetItemAt(combobox->selected_index());
2218 DCHECK(group); 2224 DCHECK(group);
2219 2225
2220 delegate_->UserEditedOrActivatedInput(group->section, 2226 delegate_->UserEditedOrActivatedInput(group->section,
2221 type, 2227 type,
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2448 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2443 : section(section), 2449 : section(section),
2444 container(NULL), 2450 container(NULL),
2445 manual_input(NULL), 2451 manual_input(NULL),
2446 suggested_info(NULL), 2452 suggested_info(NULL),
2447 suggested_button(NULL) {} 2453 suggested_button(NULL) {}
2448 2454
2449 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2455 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2450 2456
2451 } // namespace autofill 2457 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698