OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wrench_menu.h" | 5 #include "chrome/browser/ui/views/wrench_menu.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 selected_menu_model_->ActivatedAt(selected_index_); | 662 selected_menu_model_->ActivatedAt(selected_index_); |
663 } | 663 } |
664 | 664 |
665 string16 WrenchMenu::GetTooltipText(int id, | 665 string16 WrenchMenu::GetTooltipText(int id, |
666 const gfx::Point& p) const { | 666 const gfx::Point& p) const { |
667 return is_bookmark_command(id) ? | 667 return is_bookmark_command(id) ? |
668 bookmark_menu_delegate_->GetTooltipText(id, p) : string16(); | 668 bookmark_menu_delegate_->GetTooltipText(id, p) : string16(); |
669 } | 669 } |
670 | 670 |
671 bool WrenchMenu::IsTriggerableEvent(views::MenuItemView* menu, | 671 bool WrenchMenu::IsTriggerableEvent(views::MenuItemView* menu, |
672 const views::MouseEvent& e) { | 672 const views::Event& e) { |
673 return is_bookmark_command(menu->GetCommand()) ? | 673 return is_bookmark_command(menu->GetCommand()) ? |
674 bookmark_menu_delegate_->IsTriggerableEvent(menu, e) : | 674 bookmark_menu_delegate_->IsTriggerableEvent(menu, e) : |
675 MenuDelegate::IsTriggerableEvent(menu, e); | 675 MenuDelegate::IsTriggerableEvent(menu, e); |
676 } | 676 } |
677 | 677 |
678 bool WrenchMenu::GetDropFormats( | 678 bool WrenchMenu::GetDropFormats( |
679 MenuItemView* menu, | 679 MenuItemView* menu, |
680 int* formats, | 680 int* formats, |
681 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { | 681 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { |
682 CreateBookmarkMenu(); | 682 CreateBookmarkMenu(); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 bookmark_menu_delegate_.reset( | 960 bookmark_menu_delegate_.reset( |
961 new BookmarkMenuDelegate(browser_->profile(), | 961 new BookmarkMenuDelegate(browser_->profile(), |
962 NULL, | 962 NULL, |
963 parent, | 963 parent, |
964 first_bookmark_command_id_)); | 964 first_bookmark_command_id_)); |
965 bookmark_menu_delegate_->Init( | 965 bookmark_menu_delegate_->Init( |
966 this, bookmark_menu_, model->bookmark_bar_node(), 0, | 966 this, bookmark_menu_, model->bookmark_bar_node(), 0, |
967 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS, | 967 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS, |
968 bookmark_utils::LAUNCH_WRENCH_MENU); | 968 bookmark_utils::LAUNCH_WRENCH_MENU); |
969 } | 969 } |
OLD | NEW |