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

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

Issue 10546104: Make IsTriggerableEvent take Event objects and use it to verify whether tap events should trigger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass Event to ShouldEnterPushedState. Created 8 years, 6 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/views/controls/button/button_dropdown.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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.h ('k') | ui/views/controls/button/button_dropdown.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698