| 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 "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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 void CookieInfoView::ItemChanged(views::Combobox* combo_box, | 138 void CookieInfoView::ItemChanged(views::Combobox* combo_box, |
| 139 int prev_index, | 139 int prev_index, |
| 140 int new_index) { | 140 int new_index) { |
| 141 DCHECK(combo_box == expires_value_combobox_); | 141 DCHECK(combo_box == expires_value_combobox_); |
| 142 if (delegate_) | 142 if (delegate_) |
| 143 delegate_->ModifyExpireDate(new_index != 0); | 143 delegate_->ModifyExpireDate(new_index != 0); |
| 144 } | 144 } |
| 145 | 145 |
| 146 /////////////////////////////////////////////////////////////////////////////// | 146 /////////////////////////////////////////////////////////////////////////////// |
| 147 // CookieInfoView, ui::ComboboxModel overrides. | 147 // CookieInfoView, ui::ComboboxModel overrides. |
| 148 int CookieInfoView::GetItemCount() { | 148 int CookieInfoView::GetItemCount() const { |
| 149 return static_cast<int>(expire_combo_values_.size()); | 149 return static_cast<int>(expire_combo_values_.size()); |
| 150 } | 150 } |
| 151 | 151 |
| 152 string16 CookieInfoView::GetItemAt(int index) { | 152 string16 CookieInfoView::GetItemAt(int index) { |
| 153 return expire_combo_values_[index]; | 153 return expire_combo_values_[index]; |
| 154 } | 154 } |
| 155 | 155 |
| 156 void CookieInfoView::AddLabelRow(int layout_id, views::GridLayout* layout, | 156 void CookieInfoView::AddLabelRow(int layout_id, views::GridLayout* layout, |
| 157 views::View* label, views::View* value) { | 157 views::View* label, views::View* value) { |
| 158 layout->StartRow(0, layout_id); | 158 layout->StartRow(0, layout_id); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 send_for_value_field_->SetBackgroundColor(text_area_background); | 274 send_for_value_field_->SetBackgroundColor(text_area_background); |
| 275 created_value_field_->SetReadOnly(true); | 275 created_value_field_->SetReadOnly(true); |
| 276 created_value_field_->RemoveBorder(); | 276 created_value_field_->RemoveBorder(); |
| 277 created_value_field_->SetBackgroundColor(text_area_background); | 277 created_value_field_->SetBackgroundColor(text_area_background); |
| 278 if (expires_value_field_) { | 278 if (expires_value_field_) { |
| 279 expires_value_field_->SetReadOnly(true); | 279 expires_value_field_->SetReadOnly(true); |
| 280 expires_value_field_->RemoveBorder(); | 280 expires_value_field_->RemoveBorder(); |
| 281 expires_value_field_->SetBackgroundColor(text_area_background); | 281 expires_value_field_->SetBackgroundColor(text_area_background); |
| 282 } | 282 } |
| 283 } | 283 } |
| OLD | NEW |