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

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

Issue 98693017: Some nits I found while looking around rAc() code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 | « chrome/browser/ui/autofill/autofill_dialog_view_delegate.h ('k') | 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 for (DetailGroupMap::iterator iter = detail_groups_.begin(); 1912 for (DetailGroupMap::iterator iter = detail_groups_.begin();
1913 iter != detail_groups_.end(); ++iter) { 1913 iter != detail_groups_.end(); ++iter) {
1914 CreateDetailsSection(iter->second.section); 1914 CreateDetailsSection(iter->second.section);
1915 details_container_->AddChildView(iter->second.container); 1915 details_container_->AddChildView(iter->second.container);
1916 } 1916 }
1917 1917
1918 return details_container_; 1918 return details_container_;
1919 } 1919 }
1920 1920
1921 void AutofillDialogViews::CreateDetailsSection(DialogSection section) { 1921 void AutofillDialogViews::CreateDetailsSection(DialogSection section) {
1922 // Inputs container (manual inputs + combobox).
1923 views::View* inputs_container = CreateInputsContainer(section);
1924
1925 DetailsGroup* group = GroupForSection(section); 1922 DetailsGroup* group = GroupForSection(section);
1926 // Container (holds label + inputs). 1923 // Container (holds label + inputs).
1927 group->container = new SectionContainer( 1924 group->container = new SectionContainer(delegate_->LabelForSection(section),
1928 delegate_->LabelForSection(section), 1925 CreateInputsContainer(section),
1929 inputs_container, 1926 group->suggested_button);
1930 group->suggested_button);
1931 DCHECK(group->suggested_button->parent()); 1927 DCHECK(group->suggested_button->parent());
1932 UpdateDetailsGroupState(*group); 1928 UpdateDetailsGroupState(*group);
1933 } 1929 }
1934 1930
1935 views::View* AutofillDialogViews::CreateInputsContainer(DialogSection section) { 1931 views::View* AutofillDialogViews::CreateInputsContainer(DialogSection section) {
1936 // The |info_view| holds |manual_inputs| and |suggested_info|, allowing the 1932 // The |info_view| holds |manual_inputs| and |suggested_info|, allowing the
1937 // dialog to toggle which is shown. 1933 // dialog to toggle which is shown.
1938 views::View* info_view = new views::View(); 1934 views::View* info_view = new views::View();
1939 info_view->SetLayoutManager( 1935 info_view->SetLayoutManager(
1940 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 1936 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2448 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2453 : section(section), 2449 : section(section),
2454 container(NULL), 2450 container(NULL),
2455 manual_input(NULL), 2451 manual_input(NULL),
2456 suggested_info(NULL), 2452 suggested_info(NULL),
2457 suggested_button(NULL) {} 2453 suggested_button(NULL) {}
2458 2454
2459 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2455 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2460 2456
2461 } // namespace autofill 2457 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_view_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698