| 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/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/keyboard_codes.h" | 9 #include "base/keyboard_codes.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 static_cast<views::WidgetGtk*>(GetWidget())->GetTransientParent()); | 421 static_cast<views::WidgetGtk*>(GetWidget())->GetTransientParent()); |
| 422 #endif | 422 #endif |
| 423 | 423 |
| 424 // Even though we just hid the window, we need to invoke Close to schedule | 424 // Even though we just hid the window, we need to invoke Close to schedule |
| 425 // the delete and all that. | 425 // the delete and all that. |
| 426 Close(); | 426 Close(); |
| 427 | 427 |
| 428 if (node) { | 428 if (node) { |
| 429 BookmarkEditor::Show(parent, profile_, NULL, | 429 BookmarkEditor::Show(parent, profile_, NULL, |
| 430 BookmarkEditor::EditDetails(node), | 430 BookmarkEditor::EditDetails(node), |
| 431 BookmarkEditor::SHOW_TREE, NULL); | 431 BookmarkEditor::SHOW_TREE); |
| 432 } | 432 } |
| 433 } | 433 } |
| 434 | 434 |
| 435 void BookmarkBubbleView::ApplyEdits() { | 435 void BookmarkBubbleView::ApplyEdits() { |
| 436 // Set this to make sure we don't attempt to apply edits again. | 436 // Set this to make sure we don't attempt to apply edits again. |
| 437 apply_edits_ = false; | 437 apply_edits_ = false; |
| 438 | 438 |
| 439 BookmarkModel* model = profile_->GetBookmarkModel(); | 439 BookmarkModel* model = profile_->GetBookmarkModel(); |
| 440 const BookmarkNode* node = model->GetMostRecentlyAddedNodeForURL(url_); | 440 const BookmarkNode* node = model->GetMostRecentlyAddedNodeForURL(url_); |
| 441 if (node) { | 441 if (node) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 452 const BookmarkNode* new_parent = | 452 const BookmarkNode* new_parent = |
| 453 parent_model_.GetNodeAt(parent_combobox_->selected_item()); | 453 parent_model_.GetNodeAt(parent_combobox_->selected_item()); |
| 454 if (new_parent != node->GetParent()) { | 454 if (new_parent != node->GetParent()) { |
| 455 UserMetrics::RecordAction( | 455 UserMetrics::RecordAction( |
| 456 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); | 456 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); |
| 457 model->Move(node, new_parent, new_parent->GetChildCount()); | 457 model->Move(node, new_parent, new_parent->GetChildCount()); |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 } | 460 } |
| 461 } | 461 } |
| OLD | NEW |