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/bookmarks/bookmark_bubble_view.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" |
6 | 6 |
7 #include "base/string16.h" | 7 #include "base/string16.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 parent_combobox_ = new views::Combobox(&parent_model_); | 165 parent_combobox_ = new views::Combobox(&parent_model_); |
166 parent_combobox_->set_listener(this); | 166 parent_combobox_->set_listener(this); |
167 parent_combobox_->SetAccessibleName(combobox_label->text()); | 167 parent_combobox_->SetAccessibleName(combobox_label->text()); |
168 | 168 |
169 views::Label* title_label = new views::Label( | 169 views::Label* title_label = new views::Label( |
170 l10n_util::GetStringUTF16( | 170 l10n_util::GetStringUTF16( |
171 newly_bookmarked_ ? IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARKED : | 171 newly_bookmarked_ ? IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARKED : |
172 IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARK)); | 172 IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARK)); |
173 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 173 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
174 title_label->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); | 174 title_label->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); |
175 title_label->SetEnabledColor(SkColorSetRGB(6, 45, 117)); | |
176 | 175 |
177 GridLayout* layout = new GridLayout(this); | 176 GridLayout* layout = new GridLayout(this); |
178 SetLayoutManager(layout); | 177 SetLayoutManager(layout); |
179 | 178 |
180 ColumnSet* cs = layout->AddColumnSet(0); | 179 ColumnSet* cs = layout->AddColumnSet(0); |
181 | 180 |
182 // Top (title) row. | 181 // Top (title) row. |
183 cs->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF, | 182 cs->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF, |
184 0, 0); | 183 0, 0); |
185 cs->AddPaddingColumn(1, views::kUnrelatedControlHorizontalSpacing); | 184 cs->AddPaddingColumn(1, views::kUnrelatedControlHorizontalSpacing); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 if (node) { | 326 if (node) { |
328 const string16 new_title = title_tf_->text(); | 327 const string16 new_title = title_tf_->text(); |
329 if (new_title != node->GetTitle()) { | 328 if (new_title != node->GetTitle()) { |
330 model->SetTitle(node, new_title); | 329 model->SetTitle(node, new_title); |
331 content::RecordAction( | 330 content::RecordAction( |
332 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble")); | 331 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble")); |
333 } | 332 } |
334 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index()); | 333 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index()); |
335 } | 334 } |
336 } | 335 } |
OLD | NEW |