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/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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 close_button_ = new views::NativeTextButton( | 164 close_button_ = new views::NativeTextButton( |
165 this, l10n_util::GetStringUTF16(IDS_DONE)); | 165 this, l10n_util::GetStringUTF16(IDS_DONE)); |
166 close_button_->SetIsDefault(true); | 166 close_button_->SetIsDefault(true); |
167 | 167 |
168 views::Label* combobox_label = new views::Label( | 168 views::Label* combobox_label = new views::Label( |
169 l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_FOLDER_TEXT)); | 169 l10n_util::GetStringUTF16(IDS_BOOKMARK_BUBBLE_FOLDER_TEXT)); |
170 | 170 |
171 parent_combobox_ = new views::Combobox(&parent_model_); | 171 parent_combobox_ = new views::Combobox(&parent_model_); |
172 parent_combobox_->SetSelectedItem(parent_model_.node_parent_index()); | 172 parent_combobox_->SetSelectedItem(parent_model_.node_parent_index()); |
173 parent_combobox_->set_listener(this); | 173 parent_combobox_->set_listener(this); |
174 parent_combobox_->SetAccessibleName(combobox_label->GetText()); | 174 parent_combobox_->SetAccessibleName(combobox_label->text()); |
175 | 175 |
176 views::Label* title_label = new views::Label( | 176 views::Label* title_label = new views::Label( |
177 l10n_util::GetStringUTF16( | 177 l10n_util::GetStringUTF16( |
178 newly_bookmarked_ ? IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARKED : | 178 newly_bookmarked_ ? IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARKED : |
179 IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARK)); | 179 IDS_BOOKMARK_BUBBLE_PAGE_BOOKMARK)); |
180 title_label->SetFont( | 180 title_label->SetFont( |
181 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont)); | 181 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont)); |
182 title_label->SetEnabledColor(SkColorSetRGB(6, 45, 117)); | 182 title_label->SetEnabledColor(SkColorSetRGB(6, 45, 117)); |
183 | 183 |
184 GridLayout* layout = new GridLayout(this); | 184 GridLayout* layout = new GridLayout(this); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 const BookmarkNode* new_parent = | 338 const BookmarkNode* new_parent = |
339 parent_model_.GetNodeAt(parent_combobox_->selected_item()); | 339 parent_model_.GetNodeAt(parent_combobox_->selected_item()); |
340 if (new_parent != node->parent()) { | 340 if (new_parent != node->parent()) { |
341 content::RecordAction( | 341 content::RecordAction( |
342 UserMetricsAction("BookmarkBubble_ChangeParent")); | 342 UserMetricsAction("BookmarkBubble_ChangeParent")); |
343 model->Move(node, new_parent, new_parent->child_count()); | 343 model->Move(node, new_parent, new_parent->child_count()); |
344 } | 344 } |
345 } | 345 } |
346 } | 346 } |
347 } | 347 } |
OLD | NEW |