| 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/bookmark_bubble_view.h" | 5 #include "chrome/browser/ui/views/bookmark_bubble_view.h" |
| 6 | 6 |
| 7 #include "app/keyboard_codes.h" | 7 #include "app/keyboard_codes.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 close_button_ = | 199 close_button_ = |
| 200 new NativeButton(this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_DONE))); | 200 new NativeButton(this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_DONE))); |
| 201 close_button_->SetIsDefault(true); | 201 close_button_->SetIsDefault(true); |
| 202 | 202 |
| 203 Label* combobox_label = new Label( | 203 Label* combobox_label = new Label( |
| 204 UTF16ToWide(l10n_util::GetStringUTF16(IDS_BOOMARK_BUBBLE_FOLDER_TEXT))); | 204 UTF16ToWide(l10n_util::GetStringUTF16(IDS_BOOMARK_BUBBLE_FOLDER_TEXT))); |
| 205 | 205 |
| 206 parent_combobox_ = new Combobox(&parent_model_); | 206 parent_combobox_ = new Combobox(&parent_model_); |
| 207 parent_combobox_->SetSelectedItem(parent_model_.node_parent_index()); | 207 parent_combobox_->SetSelectedItem(parent_model_.node_parent_index()); |
| 208 parent_combobox_->set_listener(this); | 208 parent_combobox_->set_listener(this); |
| 209 parent_combobox_->SetAccessibleName(combobox_label->GetText()); | 209 parent_combobox_->SetAccessibleName( |
| 210 WideToUTF16Hack(combobox_label->GetText())); |
| 210 | 211 |
| 211 Label* title_label = new Label(UTF16ToWide(l10n_util::GetStringUTF16( | 212 Label* title_label = new Label(UTF16ToWide(l10n_util::GetStringUTF16( |
| 212 newly_bookmarked_ ? IDS_BOOMARK_BUBBLE_PAGE_BOOKMARKED : | 213 newly_bookmarked_ ? IDS_BOOMARK_BUBBLE_PAGE_BOOKMARKED : |
| 213 IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK))); | 214 IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK))); |
| 214 title_label->SetFont( | 215 title_label->SetFont( |
| 215 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont)); | 216 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont)); |
| 216 title_label->SetColor(kTitleColor); | 217 title_label->SetColor(kTitleColor); |
| 217 | 218 |
| 218 GridLayout* layout = new GridLayout(this); | 219 GridLayout* layout = new GridLayout(this); |
| 219 SetLayoutManager(layout); | 220 SetLayoutManager(layout); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 const BookmarkNode* new_parent = | 416 const BookmarkNode* new_parent = |
| 416 parent_model_.GetNodeAt(parent_combobox_->selected_item()); | 417 parent_model_.GetNodeAt(parent_combobox_->selected_item()); |
| 417 if (new_parent != node->GetParent()) { | 418 if (new_parent != node->GetParent()) { |
| 418 UserMetrics::RecordAction( | 419 UserMetrics::RecordAction( |
| 419 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); | 420 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); |
| 420 model->Move(node, new_parent, new_parent->GetChildCount()); | 421 model->Move(node, new_parent, new_parent->GetChildCount()); |
| 421 } | 422 } |
| 422 } | 423 } |
| 423 } | 424 } |
| 424 } | 425 } |
| OLD | NEW |