| 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/local_storage_info_view.h" | 5 #include "chrome/browser/ui/views/local_storage_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/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 /////////////////////////////////////////////////////////////////////////////// | 70 /////////////////////////////////////////////////////////////////////////////// |
| 71 // LocalStorageInfoView, private: | 71 // LocalStorageInfoView, private: |
| 72 | 72 |
| 73 void LocalStorageInfoView::Init() { | 73 void LocalStorageInfoView::Init() { |
| 74 SkColor border_color = color_utils::GetSysSkColor(COLOR_3DSHADOW); | 74 SkColor border_color = color_utils::GetSysSkColor(COLOR_3DSHADOW); |
| 75 views::Border* border = views::Border::CreateSolidBorder( | 75 views::Border* border = views::Border::CreateSolidBorder( |
| 76 kLocalStorageInfoViewBorderSize, border_color); | 76 kLocalStorageInfoViewBorderSize, border_color); |
| 77 set_border(border); | 77 set_border(border); |
| 78 | 78 |
| 79 views::Label* origin_label = new views::Label( | 79 views::Label* origin_label = new views::Label(UTF16ToWide( |
| 80 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL)); | 80 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL))); |
| 81 origin_value_field_ = new views::Textfield; | 81 origin_value_field_ = new views::Textfield; |
| 82 views::Label* size_label = new views::Label( | 82 views::Label* size_label = new views::Label(UTF16ToWide( |
| 83 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL)); | 83 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL))); |
| 84 size_value_field_ = new views::Textfield; | 84 size_value_field_ = new views::Textfield; |
| 85 views::Label* last_modified_label = new views::Label( | 85 views::Label* last_modified_label = new views::Label(UTF16ToWide( |
| 86 l10n_util::GetStringUTF16( | 86 l10n_util::GetStringUTF16( |
| 87 IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL)); | 87 IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL))); |
| 88 last_modified_value_field_ = new views::Textfield; | 88 last_modified_value_field_ = new views::Textfield; |
| 89 | 89 |
| 90 using views::GridLayout; | 90 using views::GridLayout; |
| 91 | 91 |
| 92 GridLayout* layout = new GridLayout(this); | 92 GridLayout* layout = new GridLayout(this); |
| 93 layout->SetInsets(kLocalStorageInfoViewInsetSize, | 93 layout->SetInsets(kLocalStorageInfoViewInsetSize, |
| 94 kLocalStorageInfoViewInsetSize, | 94 kLocalStorageInfoViewInsetSize, |
| 95 kLocalStorageInfoViewInsetSize, | 95 kLocalStorageInfoViewInsetSize, |
| 96 kLocalStorageInfoViewInsetSize); | 96 kLocalStorageInfoViewInsetSize); |
| 97 SetLayoutManager(layout); | 97 SetLayoutManager(layout); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 123 origin_value_field_->RemoveBorder(); | 123 origin_value_field_->RemoveBorder(); |
| 124 origin_value_field_->SetBackgroundColor(text_area_background); | 124 origin_value_field_->SetBackgroundColor(text_area_background); |
| 125 size_value_field_->SetReadOnly(true); | 125 size_value_field_->SetReadOnly(true); |
| 126 size_value_field_->RemoveBorder(); | 126 size_value_field_->RemoveBorder(); |
| 127 size_value_field_->SetBackgroundColor(text_area_background); | 127 size_value_field_->SetBackgroundColor(text_area_background); |
| 128 last_modified_value_field_->SetReadOnly(true); | 128 last_modified_value_field_->SetReadOnly(true); |
| 129 last_modified_value_field_->RemoveBorder(); | 129 last_modified_value_field_->RemoveBorder(); |
| 130 last_modified_value_field_->SetBackgroundColor(text_area_background); | 130 last_modified_value_field_->SetBackgroundColor(text_area_background); |
| 131 } | 131 } |
| 132 | 132 |
| OLD | NEW |