| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 void CookieInfoView::ItemChanged(views::Combobox* combo_box, | 141 void CookieInfoView::ItemChanged(views::Combobox* combo_box, |
| 142 int prev_index, | 142 int prev_index, |
| 143 int new_index) { | 143 int new_index) { |
| 144 DCHECK(combo_box == expires_value_combobox_); | 144 DCHECK(combo_box == expires_value_combobox_); |
| 145 if (delegate_) | 145 if (delegate_) |
| 146 delegate_->ModifyExpireDate(new_index != 0); | 146 delegate_->ModifyExpireDate(new_index != 0); |
| 147 } | 147 } |
| 148 | 148 |
| 149 /////////////////////////////////////////////////////////////////////////////// | 149 /////////////////////////////////////////////////////////////////////////////// |
| 150 // CookieInfoView, ComboboxModel overrides. | 150 // CookieInfoView, ui::ComboboxModel overrides. |
| 151 int CookieInfoView::GetItemCount() { | 151 int CookieInfoView::GetItemCount() { |
| 152 return static_cast<int>(expire_combo_values_.size()); | 152 return static_cast<int>(expire_combo_values_.size()); |
| 153 } | 153 } |
| 154 | 154 |
| 155 string16 CookieInfoView::GetItemAt(int index) { | 155 string16 CookieInfoView::GetItemAt(int index) { |
| 156 return WideToUTF16Hack(expire_combo_values_[index]); | 156 return WideToUTF16Hack(expire_combo_values_[index]); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void CookieInfoView::AddLabelRow(int layout_id, views::GridLayout* layout, | 159 void CookieInfoView::AddLabelRow(int layout_id, views::GridLayout* layout, |
| 160 views::View* label, views::View* value) { | 160 views::View* label, views::View* value) { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 send_for_value_field_->SetBackgroundColor(text_area_background); | 269 send_for_value_field_->SetBackgroundColor(text_area_background); |
| 270 created_value_field_->SetReadOnly(true); | 270 created_value_field_->SetReadOnly(true); |
| 271 created_value_field_->RemoveBorder(); | 271 created_value_field_->RemoveBorder(); |
| 272 created_value_field_->SetBackgroundColor(text_area_background); | 272 created_value_field_->SetBackgroundColor(text_area_background); |
| 273 if (expires_value_field_) { | 273 if (expires_value_field_) { |
| 274 expires_value_field_->SetReadOnly(true); | 274 expires_value_field_->SetReadOnly(true); |
| 275 expires_value_field_->RemoveBorder(); | 275 expires_value_field_->RemoveBorder(); |
| 276 expires_value_field_->SetBackgroundColor(text_area_background); | 276 expires_value_field_->SetBackgroundColor(text_area_background); |
| 277 } | 277 } |
| 278 } | 278 } |
| OLD | NEW |