| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/database_open_info_view.h" | 5 #include "chrome/browser/views/database_open_info_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 /////////////////////////////////////////////////////////////////////////////// | 55 /////////////////////////////////////////////////////////////////////////////// |
| 56 // DatabaseOpenInfoView, private: | 56 // DatabaseOpenInfoView, private: |
| 57 | 57 |
| 58 void DatabaseOpenInfoView::Init() { | 58 void DatabaseOpenInfoView::Init() { |
| 59 SkColor border_color = color_utils::GetSysSkColor(COLOR_3DSHADOW); | 59 SkColor border_color = color_utils::GetSysSkColor(COLOR_3DSHADOW); |
| 60 views::Border* border = views::Border::CreateSolidBorder( | 60 views::Border* border = views::Border::CreateSolidBorder( |
| 61 kDatabaseOpenInfoViewBorderSize, border_color); | 61 kDatabaseOpenInfoViewBorderSize, border_color); |
| 62 set_border(border); | 62 set_border(border); |
| 63 | 63 |
| 64 // TODO(jorlow): These strings are not quite right, but we're post-freeze. | |
| 65 views::Label* host_label = new views::Label( | 64 views::Label* host_label = new views::Label( |
| 66 l10n_util::GetString(IDS_COOKIES_COOKIE_DOMAIN_LABEL)); | 65 l10n_util::GetString(IDS_COOKIES_COOKIE_DOMAIN_LABEL)); |
| 67 host_value_field_ = new views::Textfield; | 66 host_value_field_ = new views::Textfield; |
| 68 views::Label* database_name_label = new views::Label( | 67 views::Label* database_name_label = new views::Label( |
| 69 l10n_util::GetString(IDS_COOKIES_COOKIE_NAME_LABEL)); | 68 l10n_util::GetString(IDS_COOKIES_WEB_DATABASE_NAME)); |
| 70 database_name_value_field_ = new views::Textfield; | 69 database_name_value_field_ = new views::Textfield; |
| 71 | 70 |
| 72 using views::GridLayout; | 71 using views::GridLayout; |
| 73 | 72 |
| 74 GridLayout* layout = new GridLayout(this); | 73 GridLayout* layout = new GridLayout(this); |
| 75 layout->SetInsets(kDatabaseOpenInfoViewInsetSize, | 74 layout->SetInsets(kDatabaseOpenInfoViewInsetSize, |
| 76 kDatabaseOpenInfoViewInsetSize, | 75 kDatabaseOpenInfoViewInsetSize, |
| 77 kDatabaseOpenInfoViewInsetSize, | 76 kDatabaseOpenInfoViewInsetSize, |
| 78 kDatabaseOpenInfoViewInsetSize); | 77 kDatabaseOpenInfoViewInsetSize); |
| 79 SetLayoutManager(layout); | 78 SetLayoutManager(layout); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 98 SkColor text_area_background = color_utils::GetSysSkColor(COLOR_3DFACE); | 97 SkColor text_area_background = color_utils::GetSysSkColor(COLOR_3DFACE); |
| 99 // Now that the Textfields are in the view hierarchy, we can initialize them. | 98 // Now that the Textfields are in the view hierarchy, we can initialize them. |
| 100 host_value_field_->SetReadOnly(true); | 99 host_value_field_->SetReadOnly(true); |
| 101 host_value_field_->RemoveBorder(); | 100 host_value_field_->RemoveBorder(); |
| 102 host_value_field_->SetBackgroundColor(text_area_background); | 101 host_value_field_->SetBackgroundColor(text_area_background); |
| 103 database_name_value_field_->SetReadOnly(true); | 102 database_name_value_field_->SetReadOnly(true); |
| 104 database_name_value_field_->RemoveBorder(); | 103 database_name_value_field_->RemoveBorder(); |
| 105 database_name_value_field_->SetBackgroundColor(text_area_background); | 104 database_name_value_field_->SetBackgroundColor(text_area_background); |
| 106 } | 105 } |
| 107 | 106 |
| OLD | NEW |