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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 this, l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_OPTIONS)); | 155 this, l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_OPTIONS)); |
156 | 156 |
157 close_button_ = new views::NativeTextButton( | 157 close_button_ = new views::NativeTextButton( |
158 this, l10n_util::GetStringUTF16(IDS_DONE)); | 158 this, l10n_util::GetStringUTF16(IDS_DONE)); |
159 close_button_->SetIsDefault(true); | 159 close_button_->SetIsDefault(true); |
160 | 160 |
161 views::Label* combobox_label = new views::Label( | 161 views::Label* combobox_label = new views::Label( |
162 l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_FOLDER_TEXT)); | 162 l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_FOLDER_TEXT)); |
163 | 163 |
164 parent_combobox_ = new views::Combobox(&parent_model_); | 164 parent_combobox_ = new views::Combobox(&parent_model_); |
165 parent_combobox_->SetSelectedIndex(parent_model_.node_parent_index()); | |
166 parent_combobox_->set_listener(this); | 165 parent_combobox_->set_listener(this); |
167 parent_combobox_->SetAccessibleName(combobox_label->text()); | 166 parent_combobox_->SetAccessibleName(combobox_label->text()); |
168 | 167 |
169 views::Label* title_label = new views::Label( | 168 views::Label* title_label = new views::Label( |
170 l10n_util::GetStringUTF16( | 169 l10n_util::GetStringUTF16( |
171 newly_bookmarked_ ? IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARKED : | 170 newly_bookmarked_ ? IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARKED : |
172 IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARK)); | 171 IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARK)); |
173 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 172 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
174 title_label->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); | 173 title_label->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); |
175 title_label->SetEnabledColor(SkColorSetRGB(6, 45, 117)); | 174 title_label->SetEnabledColor(SkColorSetRGB(6, 45, 117)); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 const BookmarkNode* new_parent = | 335 const BookmarkNode* new_parent = |
337 parent_model_.GetNodeAt(parent_combobox_->selected_index()); | 336 parent_model_.GetNodeAt(parent_combobox_->selected_index()); |
338 if (new_parent != node->parent()) { | 337 if (new_parent != node->parent()) { |
339 content::RecordAction( | 338 content::RecordAction( |
340 UserMetricsAction("BookmarkBubble_ChangeParent")); | 339 UserMetricsAction("BookmarkBubble_ChangeParent")); |
341 model->Move(node, new_parent, new_parent->child_count()); | 340 model->Move(node, new_parent, new_parent->child_count()); |
342 } | 341 } |
343 } | 342 } |
344 } | 343 } |
345 } | 344 } |
OLD | NEW |