OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 NotificationService::current()->Notify( | 379 NotificationService::current()->Notify( |
380 NotificationType::BOOKMARK_BUBBLE_HIDDEN, | 380 NotificationType::BOOKMARK_BUBBLE_HIDDEN, |
381 Source<Profile>(profile_->GetOriginalProfile()), | 381 Source<Profile>(profile_->GetOriginalProfile()), |
382 NotificationService::NoDetails()); | 382 NotificationService::NoDetails()); |
383 } | 383 } |
384 | 384 |
385 bool BookmarkBubbleView::CloseOnEscape() { | 385 bool BookmarkBubbleView::CloseOnEscape() { |
386 return delegate_ ? delegate_->CloseOnEscape() : true; | 386 return delegate_ ? delegate_->CloseOnEscape() : true; |
387 } | 387 } |
388 | 388 |
| 389 std::wstring BookmarkBubbleView::accessible_name() { |
| 390 return l10n_util::GetString(IDS_BOOMARK_BUBBLE_ADD_BOOKMARK); |
| 391 } |
| 392 |
389 void BookmarkBubbleView::Close() { | 393 void BookmarkBubbleView::Close() { |
390 static_cast<InfoBubble*>(GetWidget())->Close(); | 394 static_cast<InfoBubble*>(GetWidget())->Close(); |
391 } | 395 } |
392 | 396 |
393 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) { | 397 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) { |
394 if (sender == edit_button_) { | 398 if (sender == edit_button_) { |
395 UserMetrics::RecordAction(UserMetricsAction("BookmarkBubble_Edit"), | 399 UserMetrics::RecordAction(UserMetricsAction("BookmarkBubble_Edit"), |
396 profile_); | 400 profile_); |
397 info_bubble_->set_fade_away_on_close(true); | 401 info_bubble_->set_fade_away_on_close(true); |
398 ShowEditor(); | 402 ShowEditor(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 const BookmarkNode* new_parent = | 464 const BookmarkNode* new_parent = |
461 parent_model_.GetNodeAt(parent_combobox_->selected_item()); | 465 parent_model_.GetNodeAt(parent_combobox_->selected_item()); |
462 if (new_parent != node->GetParent()) { | 466 if (new_parent != node->GetParent()) { |
463 UserMetrics::RecordAction( | 467 UserMetrics::RecordAction( |
464 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); | 468 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); |
465 model->Move(node, new_parent, new_parent->GetChildCount()); | 469 model->Move(node, new_parent, new_parent->GetChildCount()); |
466 } | 470 } |
467 } | 471 } |
468 } | 472 } |
469 } | 473 } |
OLD | NEW |