| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 NotificationService::current()->Notify( | 326 NotificationService::current()->Notify( |
| 327 NotificationType::BOOKMARK_BUBBLE_HIDDEN, | 327 NotificationType::BOOKMARK_BUBBLE_HIDDEN, |
| 328 Source<Profile>(profile_->GetOriginalProfile()), | 328 Source<Profile>(profile_->GetOriginalProfile()), |
| 329 NotificationService::NoDetails()); | 329 NotificationService::NoDetails()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 bool BookmarkBubbleView::CloseOnEscape() { | 332 bool BookmarkBubbleView::CloseOnEscape() { |
| 333 return delegate_ ? delegate_->CloseOnEscape() : true; | 333 return delegate_ ? delegate_->CloseOnEscape() : true; |
| 334 } | 334 } |
| 335 | 335 |
| 336 bool BookmarkBubbleView::FadeInOnShow() { |
| 337 return false; |
| 338 } |
| 339 |
| 336 std::wstring BookmarkBubbleView::accessible_name() { | 340 std::wstring BookmarkBubbleView::accessible_name() { |
| 337 return UTF16ToWide( | 341 return UTF16ToWide( |
| 338 l10n_util::GetStringUTF16(IDS_BOOMARK_BUBBLE_ADD_BOOKMARK)); | 342 l10n_util::GetStringUTF16(IDS_BOOMARK_BUBBLE_ADD_BOOKMARK)); |
| 339 } | 343 } |
| 340 | 344 |
| 341 void BookmarkBubbleView::Close() { | 345 void BookmarkBubbleView::Close() { |
| 342 static_cast<InfoBubble*>(GetWidget())->Close(); | 346 static_cast<InfoBubble*>(GetWidget())->Close(); |
| 343 } | 347 } |
| 344 | 348 |
| 345 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) { | 349 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 const BookmarkNode* new_parent = | 416 const BookmarkNode* new_parent = |
| 413 parent_model_.GetNodeAt(parent_combobox_->selected_item()); | 417 parent_model_.GetNodeAt(parent_combobox_->selected_item()); |
| 414 if (new_parent != node->GetParent()) { | 418 if (new_parent != node->GetParent()) { |
| 415 UserMetrics::RecordAction( | 419 UserMetrics::RecordAction( |
| 416 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); | 420 UserMetricsAction("BookmarkBubble_ChangeParent"), profile_); |
| 417 model->Move(node, new_parent, new_parent->GetChildCount()); | 421 model->Move(node, new_parent, new_parent->GetChildCount()); |
| 418 } | 422 } |
| 419 } | 423 } |
| 420 } | 424 } |
| 421 } | 425 } |
| OLD | NEW |