| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/bookmark_bubble_view.h" | 5 #include "chrome/browser/views/bookmark_bubble_view.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #include "app/gfx/color_utils.h" | 8 #include "app/gfx/color_utils.h" |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 initialized = true; | 235 initialized = true; |
| 236 } | 236 } |
| 237 | 237 |
| 238 remove_link_ = new Link(l10n_util::GetString( | 238 remove_link_ = new Link(l10n_util::GetString( |
| 239 IDS_BOOMARK_BUBBLE_REMOVE_BOOKMARK)); | 239 IDS_BOOMARK_BUBBLE_REMOVE_BOOKMARK)); |
| 240 remove_link_->SetController(this); | 240 remove_link_->SetController(this); |
| 241 | 241 |
| 242 edit_button_ = new NativeButton( | 242 edit_button_ = new NativeButton( |
| 243 this, l10n_util::GetString(IDS_BOOMARK_BUBBLE_OPTIONS)); | 243 this, l10n_util::GetString(IDS_BOOMARK_BUBBLE_OPTIONS)); |
| 244 | 244 |
| 245 close_button_ = new NativeButton(this, l10n_util::GetString(IDS_CLOSE)); | 245 close_button_ = new NativeButton(this, l10n_util::GetString(IDS_DONE)); |
| 246 close_button_->SetIsDefault(true); | 246 close_button_->SetIsDefault(true); |
| 247 | 247 |
| 248 parent_combobox_ = new Combobox(&parent_model_); | 248 parent_combobox_ = new Combobox(&parent_model_); |
| 249 parent_combobox_->SetSelectedItem(parent_model_.node_parent_index()); | 249 parent_combobox_->SetSelectedItem(parent_model_.node_parent_index()); |
| 250 parent_combobox_->set_listener(this); | 250 parent_combobox_->set_listener(this); |
| 251 | 251 |
| 252 Label* title_label = new Label(l10n_util::GetString( | 252 Label* title_label = new Label(l10n_util::GetString( |
| 253 newly_bookmarked_ ? IDS_BOOMARK_BUBBLE_PAGE_BOOKMARKED : | 253 newly_bookmarked_ ? IDS_BOOMARK_BUBBLE_PAGE_BOOKMARKED : |
| 254 IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK)); | 254 IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK)); |
| 255 title_label->SetFont( | 255 title_label->SetFont( |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 parent_model_.GetItemCount() - 1) { | 444 parent_model_.GetItemCount() - 1) { |
| 445 const BookmarkNode* new_parent = | 445 const BookmarkNode* new_parent = |
| 446 parent_model_.GetNodeAt(parent_combobox_->selected_item()); | 446 parent_model_.GetNodeAt(parent_combobox_->selected_item()); |
| 447 if (new_parent != node->GetParent()) { | 447 if (new_parent != node->GetParent()) { |
| 448 UserMetrics::RecordAction("BookmarkBubble_ChangeParent", profile_); | 448 UserMetrics::RecordAction("BookmarkBubble_ChangeParent", profile_); |
| 449 model->Move(node, new_parent, new_parent->GetChildCount()); | 449 model->Move(node, new_parent, new_parent->GetChildCount()); |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 } | 452 } |
| 453 } | 453 } |
| OLD | NEW |