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

Side by Side Diff: chrome/browser/ui/views/cookie_info_view.cc

Issue 9965017: views: Rename ComboboxListener::ItemChanged to something more accurate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: combo_box -> combobox Created 8 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 | « chrome/browser/ui/views/cookie_info_view.h ('k') | ui/views/controls/combobox/combobox.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 "chrome/browser/ui/views/cookie_info_view.h" 5 #include "chrome/browser/ui/views/cookie_info_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void CookieInfoView::ViewHierarchyChanged(bool is_add, 132 void CookieInfoView::ViewHierarchyChanged(bool is_add,
133 views::View* parent, 133 views::View* parent,
134 views::View* child) { 134 views::View* child) {
135 if (is_add && child == this) 135 if (is_add && child == this)
136 Init(); 136 Init();
137 } 137 }
138 138
139 /////////////////////////////////////////////////////////////////////////////// 139 ///////////////////////////////////////////////////////////////////////////////
140 // CookieInfoView, views::ComboboxListener overrides. 140 // CookieInfoView, views::ComboboxListener overrides.
141 141
142 void CookieInfoView::ItemChanged(views::Combobox* combo_box, 142 void CookieInfoView::OnSelectedIndexChanged(views::Combobox* combobox) {
143 int prev_index, 143 DCHECK_EQ(combobox, expires_value_combobox_);
144 int new_index) {
145 DCHECK(combo_box == expires_value_combobox_);
146 if (delegate_) 144 if (delegate_)
147 delegate_->ModifyExpireDate(new_index != 0); 145 delegate_->ModifyExpireDate(combobox->selected_index() != 0);
148 } 146 }
149 147
150 /////////////////////////////////////////////////////////////////////////////// 148 ///////////////////////////////////////////////////////////////////////////////
151 // CookieInfoView, ui::ComboboxModel overrides. 149 // CookieInfoView, ui::ComboboxModel overrides.
152 int CookieInfoView::GetItemCount() const { 150 int CookieInfoView::GetItemCount() const {
153 return static_cast<int>(expire_combo_values_.size()); 151 return static_cast<int>(expire_combo_values_.size());
154 } 152 }
155 153
156 string16 CookieInfoView::GetItemAt(int index) { 154 string16 CookieInfoView::GetItemAt(int index) {
157 return expire_combo_values_[index]; 155 return expire_combo_values_[index];
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 send_for_value_field_->SetBackgroundColor(text_area_background); 276 send_for_value_field_->SetBackgroundColor(text_area_background);
279 created_value_field_->SetReadOnly(true); 277 created_value_field_->SetReadOnly(true);
280 created_value_field_->RemoveBorder(); 278 created_value_field_->RemoveBorder();
281 created_value_field_->SetBackgroundColor(text_area_background); 279 created_value_field_->SetBackgroundColor(text_area_background);
282 if (expires_value_field_) { 280 if (expires_value_field_) {
283 expires_value_field_->SetReadOnly(true); 281 expires_value_field_->SetReadOnly(true);
284 expires_value_field_->RemoveBorder(); 282 expires_value_field_->RemoveBorder();
285 expires_value_field_->SetBackgroundColor(text_area_background); 283 expires_value_field_->SetBackgroundColor(text_area_background);
286 } 284 }
287 } 285 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/cookie_info_view.h ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698