Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Side by Side Diff: chrome/browser/ui/views/wrench_menu.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.h ('k') | ui/app_list/contents_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 bool WrenchMenu::CanDrop(MenuItemView* menu, 827 bool WrenchMenu::CanDrop(MenuItemView* menu,
828 const ui::OSExchangeData& data) { 828 const ui::OSExchangeData& data) {
829 CreateBookmarkMenu(); 829 CreateBookmarkMenu();
830 return bookmark_menu_delegate_.get() && 830 return bookmark_menu_delegate_.get() &&
831 bookmark_menu_delegate_->CanDrop(menu, data); 831 bookmark_menu_delegate_->CanDrop(menu, data);
832 } 832 }
833 833
834 int WrenchMenu::GetDropOperation( 834 int WrenchMenu::GetDropOperation(
835 MenuItemView* item, 835 MenuItemView* item,
836 const views::DropTargetEvent& event, 836 const ui::DropTargetEvent& event,
837 DropPosition* position) { 837 DropPosition* position) {
838 return is_bookmark_command(item->GetCommand()) ? 838 return is_bookmark_command(item->GetCommand()) ?
839 bookmark_menu_delegate_->GetDropOperation(item, event, position) : 839 bookmark_menu_delegate_->GetDropOperation(item, event, position) :
840 ui::DragDropTypes::DRAG_NONE; 840 ui::DragDropTypes::DRAG_NONE;
841 } 841 }
842 842
843 int WrenchMenu::OnPerformDrop(MenuItemView* menu, 843 int WrenchMenu::OnPerformDrop(MenuItemView* menu,
844 DropPosition position, 844 DropPosition position,
845 const views::DropTargetEvent& event) { 845 const ui::DropTargetEvent& event) {
846 if (!is_bookmark_command(menu->GetCommand())) 846 if (!is_bookmark_command(menu->GetCommand()))
847 return ui::DragDropTypes::DRAG_NONE; 847 return ui::DragDropTypes::DRAG_NONE;
848 848
849 int result = bookmark_menu_delegate_->OnPerformDrop(menu, position, event); 849 int result = bookmark_menu_delegate_->OnPerformDrop(menu, position, event);
850 return result; 850 return result;
851 } 851 }
852 852
853 bool WrenchMenu::ShowContextMenu(MenuItemView* source, 853 bool WrenchMenu::ShowContextMenu(MenuItemView* source,
854 int id, 854 int id,
855 const gfx::Point& p, 855 const gfx::Point& p,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 bookmark_menu_delegate_.reset( 1113 bookmark_menu_delegate_.reset(
1114 new BookmarkMenuDelegate(browser_, 1114 new BookmarkMenuDelegate(browser_,
1115 browser_, 1115 browser_,
1116 parent, 1116 parent,
1117 first_bookmark_command_id_)); 1117 first_bookmark_command_id_));
1118 bookmark_menu_delegate_->Init( 1118 bookmark_menu_delegate_->Init(
1119 this, bookmark_menu_, model->bookmark_bar_node(), 0, 1119 this, bookmark_menu_, model->bookmark_bar_node(), 0,
1120 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS, 1120 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS,
1121 bookmark_utils::LAUNCH_WRENCH_MENU); 1121 bookmark_utils::LAUNCH_WRENCH_MENU);
1122 } 1122 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.h ('k') | ui/app_list/contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698