diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 22:16:38 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 22:16:38 +0000 |
commit | c4c052845d062c1ff7ce74e2b94922463039e632 (patch) | |
tree | 2416f3b7f67852e57686656982a407234ce53936 | |
parent | 25c3d7b0d4d8dbfcda2f5e4f55f68c626dee27f1 (diff) | |
download | chromium_src-c4c052845d062c1ff7ce74e2b94922463039e632.zip chromium_src-c4c052845d062c1ff7ce74e2b94922463039e632.tar.gz chromium_src-c4c052845d062c1ff7ce74e2b94922463039e632.tar.bz2 |
views: Nuke is_mouse_gesture parameter from ContextMenuController::ShowContextMenuForView().
BUG=117092
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9665008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126081 0039d316-1c4b-4281-b951-d872f2087c98
23 files changed, 56 insertions, 85 deletions
diff --git a/ash/app_list/app_list_item_view.cc b/ash/app_list/app_list_item_view.cc index 96b6b13..e47305a 100644 --- a/ash/app_list/app_list_item_view.cc +++ b/ash/app_list/app_list_item_view.cc @@ -128,8 +128,7 @@ void AppListItemView::OnPaint(gfx::Canvas* canvas) { } void AppListItemView::ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { ui::MenuModel* menu_model = model_->GetContextMenuModel(); if (!menu_model) return; @@ -139,7 +138,7 @@ void AppListItemView::ShowContextMenuForView(views::View* source, new views::MenuRunner(new views::MenuItemView(&menu_adapter))); menu_adapter.BuildMenu(context_menu_runner_->GetMenu()); if (context_menu_runner_->RunMenuAt( - GetWidget(), NULL, gfx::Rect(p, gfx::Size()), + GetWidget(), NULL, gfx::Rect(point, gfx::Size()), views::MenuItemView::TOPLEFT, views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED) return; diff --git a/ash/app_list/app_list_item_view.h b/ash/app_list/app_list_item_view.h index 025629e..39ef59d 100644 --- a/ash/app_list/app_list_item_view.h +++ b/ash/app_list/app_list_item_view.h @@ -60,8 +60,7 @@ class ASH_EXPORT AppListItemView : public views::CustomButton, private: // views::ContextMenuController overrides: virtual void ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; AppListItemModel* model_; diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc index 68f3d32..303f1ef 100644 --- a/ash/launcher/launcher_view.cc +++ b/ash/launcher/launcher_view.cc @@ -707,8 +707,7 @@ void LauncherView::ButtonPressed(views::Button* sender, } void LauncherView::ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { int view_index = view_model_->GetIndexOfView(source); // May be -1 while in the process of animating closed. if (view_index == -1 || !delegate_) @@ -727,7 +726,7 @@ void LauncherView::ShowContextMenuForView(views::View* source, // NOTE: if you convert to HAS_MNEMONICS be sure and update menu building // code. if (launcher_menu_runner_->RunMenuAt( - source->GetWidget(), NULL, gfx::Rect(p, gfx::Size()), + source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) return; #endif diff --git a/ash/launcher/launcher_view.h b/ash/launcher/launcher_view.h index 39bceef..09f215a 100644 --- a/ash/launcher/launcher_view.h +++ b/ash/launcher/launcher_view.h @@ -139,8 +139,7 @@ class ASH_EXPORT LauncherView : public views::View, // Overriden from views::ContextMenuController: virtual void ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; // The model; owned by Launcher. LauncherModel* model_; diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index 222221d..d77e66f 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -356,8 +356,7 @@ void WindowTypeLauncher::ExecuteCommand(int id) { #if !defined(OS_MACOSX) void WindowTypeLauncher::ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { MenuItemView* root = new MenuItemView(this); root->AppendMenuItem(COMMAND_NEW_WINDOW, ASCIIToUTF16("New Window"), @@ -367,7 +366,7 @@ void WindowTypeLauncher::ShowContextMenuForView(views::View* source, MenuItemView::NORMAL); // MenuRunner takes ownership of root. menu_runner_.reset(new MenuRunner(root)); - if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(p, gfx::Size(0, 0)), + if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), MenuItemView::TOPLEFT, MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) return; diff --git a/ash/shell/window_type_launcher.h b/ash/shell/window_type_launcher.h index 08be5e1..fb7cf37 100644 --- a/ash/shell/window_type_launcher.h +++ b/ash/shell/window_type_launcher.h @@ -62,8 +62,7 @@ class WindowTypeLauncher : public views::WidgetDelegateView, // Override from views::ContextMenuController: virtual void ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; #endif // !defined(OS_MACOSX) views::NativeTextButton* create_button_; diff --git a/chrome/browser/chromeos/frame/browser_view.cc b/chrome/browser/chromeos/frame/browser_view.cc index d76a433d..3a020b7 100644 --- a/chrome/browser/chromeos/frame/browser_view.cc +++ b/chrome/browser/chromeos/frame/browser_view.cc @@ -462,20 +462,19 @@ WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( // views::ContextMenuController implementation. void BrowserView::ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { // Only show context menu if point is in unobscured parts of browser, i.e. // if NonClientHitTest returns : // - HTCAPTION: in title bar or unobscured part of tabstrip // - HTNOWHERE: as the name implies. - gfx::Point point_in_parent_coords(p); + gfx::Point point_in_parent_coords(point); views::View::ConvertPointToView(NULL, parent(), &point_in_parent_coords); int hit_test = NonClientHitTest(point_in_parent_coords); if (hit_test == HTCAPTION || hit_test == HTNOWHERE) { // rebuild menu so it reflects current application state InitSystemMenu(); if (system_menu_runner_->RunMenuAt(source->GetWidget(), NULL, - gfx::Rect(p, gfx::Size(0,0)), views::MenuItemView::TOPLEFT, + gfx::Rect(point, gfx::Size()), views::MenuItemView::TOPLEFT, views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED) return; diff --git a/chrome/browser/chromeos/frame/browser_view.h b/chrome/browser/chromeos/frame/browser_view.h index a3e32f6..75de22d 100644 --- a/chrome/browser/chromeos/frame/browser_view.h +++ b/chrome/browser/chromeos/frame/browser_view.h @@ -79,8 +79,7 @@ class BrowserView : public ::BrowserView, // views::ContextMenuController implementation. virtual void ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; // views::MenuListener implementation. virtual void OnMenuOpened() OVERRIDE; diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 4615095..17c8c194 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -800,7 +800,7 @@ int BookmarkBarView::OnPerformDrop(const DropTargetEvent& event) { void BookmarkBarView::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) { - ShowContextMenuForView(this, p, is_mouse_gesture); + ShowContextMenuForView(this, p); } void BookmarkBarView::OnThemeChanged() { @@ -1049,9 +1049,8 @@ void BookmarkBarView::ButtonPressed(views::Button* sender, content::RecordAction(UserMetricsAction("ClickedBookmarkBarURLButton")); } -void BookmarkBarView::ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) { +void BookmarkBarView::ShowContextMenuForView(views::View* source, + const gfx::Point& point) { if (!model_->IsLoaded()) { // Don't do anything if the model isn't loaded. return; @@ -1084,7 +1083,7 @@ void BookmarkBarView::ShowContextMenuForView(View* source, (parent->child_count() == 1); context_menu_.reset(new BookmarkContextMenu(GetWidget(), profile, browser_->GetSelectedWebContents(), parent, nodes, close_on_remove)); - context_menu_->RunMenuAt(p); + context_menu_->RunMenuAt(point); } void BookmarkBarView::Observe(int type, diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h index f16ea643..4dc81bb 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h @@ -233,8 +233,7 @@ class BookmarkBarView : public DetachableToolbarView, // ContextMenuController virtual void ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; // NotificationService: virtual void Observe(int type, diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc index 3491429..5443eba 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc @@ -279,9 +279,8 @@ void BookmarkEditorView::Close() { GetWidget()->Close(); } -void BookmarkEditorView::ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) { +void BookmarkEditorView::ShowContextMenuForView(views::View* source, + const gfx::Point& point) { DCHECK(source == tree_view_); if (!tree_view_->GetSelectedNode()) return; @@ -300,7 +299,7 @@ void BookmarkEditorView::ShowContextMenuForView(View* source, IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM); context_menu_.reset(new views::Menu2(context_menu_contents_.get())); } - context_menu_->RunContextMenuAt(p); + context_menu_->RunContextMenuAt(point); #endif } diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h index 67ee872..e087d35 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h +++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h @@ -126,9 +126,8 @@ class BookmarkEditorView : public BookmarkEditor, void Close(); // views::ContextMenuController: - virtual void ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + virtual void ShowContextMenuForView(views::View* source, + const gfx::Point& point) OVERRIDE; private: friend class BookmarkEditorViewTest; diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc index abca94b..4b1d0da 100644 --- a/chrome/browser/ui/views/tabs/base_tab.cc +++ b/chrome/browser/ui/views/tabs/base_tab.cc @@ -508,10 +508,9 @@ void BaseTab::ButtonPressed(views::Button* sender, const views::Event& event) { } void BaseTab::ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { if (controller() && !closing()) - controller()->ShowContextMenuForTab(this, p); + controller()->ShowContextMenuForTab(this, point); } int BaseTab::loading_animation_frame() const { diff --git a/chrome/browser/ui/views/tabs/base_tab.h b/chrome/browser/ui/views/tabs/base_tab.h index 630b893..f72153c 100644 --- a/chrome/browser/ui/views/tabs/base_tab.h +++ b/chrome/browser/ui/views/tabs/base_tab.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -131,8 +131,7 @@ class BaseTab : public ui::AnimationDelegate, // Overridden from views::ContextMenuController: virtual void ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; // Returns the bounds of the title and icon. virtual const gfx::Rect& GetTitleBounds() const = 0; diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc index 9d5fb9e..8b51726 100644 --- a/chrome/browser/ui/views/task_manager_view.cc +++ b/chrome/browser/ui/views/task_manager_view.cc @@ -277,17 +277,17 @@ class TaskManagerView : public views::ButtonListener, // resources in the resource display. static void Show(bool highlight_background_resources); - // views::View + // views::View: virtual void Layout() OVERRIDE; virtual gfx::Size GetPreferredSize() OVERRIDE; virtual void ViewHierarchyChanged(bool is_add, views::View* parent, views::View* child) OVERRIDE; - // ButtonListener implementation. + // views::ButtonListener: virtual void ButtonPressed(views::Button* sender, const views::Event& event) OVERRIDE; - // views::DialogDelegate + // views::DialogDelegateView: virtual bool CanResize() const OVERRIDE; virtual bool CanMaximize() const OVERRIDE; virtual bool ExecuteWindowsCommand(int command_id) OVERRIDE; @@ -297,24 +297,23 @@ class TaskManagerView : public views::ButtonListener, virtual void WindowClosing() OVERRIDE; virtual views::View* GetContentsView() OVERRIDE; - // views::TableViewObserver implementation. + // views::TableViewObserver: virtual void OnSelectionChanged() OVERRIDE; virtual void OnDoubleClick() OVERRIDE; virtual void OnKeyDown(ui::KeyboardCode keycode) OVERRIDE; - // views::LinkListener implementation. + // views::LinkListener: virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; // Called by the column picker to pick up any new stat counters that // may have appeared since last time. void UpdateStatsCounters(); - // views::ContextMenuController + // views::ContextMenuController: virtual void ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; - // views::Menu::Delegate + // views::Menu::Delegate: virtual bool IsItemChecked(int id) const OVERRIDE; virtual void ExecuteCommand(int id) OVERRIDE; @@ -708,8 +707,7 @@ void TaskManagerView::LinkClicked(views::Link* source, int event_flags) { } void TaskManagerView::ShowContextMenuForView(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { UpdateStatsCounters(); scoped_ptr<views::Menu> menu(views::Menu::Create( this, views::Menu::TOPLEFT, source->GetWidget()->GetNativeView())); @@ -718,7 +716,7 @@ void TaskManagerView::ShowContextMenuForView(views::View* source, menu->AppendMenuItem(i->id, l10n_util::GetStringUTF16(i->id), views::Menu::CHECKBOX); } - menu->RunMenuAt(p.x(), p.y()); + menu->RunMenuAt(point.x(), point.y()); } bool TaskManagerView::IsItemChecked(int id) const { diff --git a/ui/views/context_menu_controller.h b/ui/views/context_menu_controller.h index 5bee8b7..e427117 100644 --- a/ui/views/context_menu_controller.h +++ b/ui/views/context_menu_controller.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -28,15 +28,10 @@ class View; // implementation for mouse processing. class VIEWS_EXPORT ContextMenuController { public: - // Invoked to show the context menu for the source view. If |is_mouse_gesture| - // is true, |p| is the location of the mouse. If |is_mouse_gesture| is false, - // this method was not invoked by a mouse gesture and |p| is the recommended - // location to show the menu at. - // - // |p| is in screen coordinates. + // Invoked to show the context menu for |source|. + // |point| is in screen coordinates. virtual void ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) = 0; + const gfx::Point& point) = 0; protected: virtual ~ContextMenuController() {} diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc index 54d4b44..01ef304 100644 --- a/ui/views/controls/scrollbar/base_scroll_bar.cc +++ b/ui/views/controls/scrollbar/base_scroll_bar.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -202,9 +202,7 @@ enum ScrollBarContextMenuCommands { ScrollBarContextMenuCommand_ScrollNext }; -void BaseScrollBar::ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) { +void BaseScrollBar::ShowContextMenuForView(View* source, const gfx::Point& p) { Widget* widget = GetWidget(); gfx::Rect widget_bounds = widget->GetWindowScreenBounds(); gfx::Point temp_pt(p.x() - widget_bounds.x(), p.y() - widget_bounds.y()); @@ -224,8 +222,8 @@ void BaseScrollBar::ShowContextMenuForView(View* source, menu->AppendSeparator(); menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPrev); menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollNext); - if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(p, gfx::Size(0, 0)), - MenuItemView::TOPLEFT, MenuRunner::HAS_MNEMONICS) == + if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(p, gfx::Size()), + MenuItemView::TOPLEFT, MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) return; } diff --git a/ui/views/controls/scrollbar/base_scroll_bar.h b/ui/views/controls/scrollbar/base_scroll_bar.h index 46515d5..d7e8b8c 100644 --- a/ui/views/controls/scrollbar/base_scroll_bar.h +++ b/ui/views/controls/scrollbar/base_scroll_bar.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -74,8 +74,7 @@ class VIEWS_EXPORT BaseScrollBar : public ScrollBar, // ContextMenuController overrides. virtual void ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; // Menu::Delegate overrides: virtual string16 GetLabel(int id) const OVERRIDE; diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc index 709a031..ab41c83 100644 --- a/ui/views/controls/textfield/native_textfield_views.cc +++ b/ui/views/controls/textfield/native_textfield_views.cc @@ -295,13 +295,11 @@ gfx::NativeCursor NativeTextfieldViews::GetCursor(const MouseEvent& event) { ///////////////////////////////////////////////////////////////// // NativeTextfieldViews, ContextMenuController overrides: void NativeTextfieldViews::ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { UpdateContextMenu(); - if (context_menu_runner_->RunMenuAt( - GetWidget(), NULL, gfx::Rect(p, gfx::Size()), - views::MenuItemView::TOPLEFT, MenuRunner::HAS_MNEMONICS) == - MenuRunner::MENU_DELETED) + if (context_menu_runner_->RunMenuAt(GetWidget(), NULL, + gfx::Rect(point, gfx::Size()), views::MenuItemView::TOPLEFT, + MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) return; } diff --git a/ui/views/controls/textfield/native_textfield_views.h b/ui/views/controls/textfield/native_textfield_views.h index 722d295..83341e1 100644 --- a/ui/views/controls/textfield/native_textfield_views.h +++ b/ui/views/controls/textfield/native_textfield_views.h @@ -76,8 +76,7 @@ class VIEWS_EXPORT NativeTextfieldViews : public TouchSelectionClientView, // ContextMenuController overrides: virtual void ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; // Overridden from DragController: virtual void WriteDragDataForView(View* sender, diff --git a/ui/views/examples/tree_view_example.cc b/ui/views/examples/tree_view_example.cc index cd98d07..e2a9d4f 100644 --- a/ui/views/examples/tree_view_example.cc +++ b/ui/views/examples/tree_view_example.cc @@ -123,8 +123,7 @@ bool TreeViewExample::CanEdit(TreeView* tree_view, } void TreeViewExample::ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) { + const gfx::Point& point) { ui::SimpleMenuModel context_menu_model(this); context_menu_model.AddItem(ID_EDIT, ASCIIToUTF16("Edit")); context_menu_model.AddItem(ID_REMOVE, ASCIIToUTF16("Remove")); @@ -132,7 +131,7 @@ void TreeViewExample::ShowContextMenuForView(View* source, views::MenuModelAdapter menu_adapter(&context_menu_model); context_menu_runner_.reset(new views::MenuRunner(menu_adapter.CreateMenu())); if (context_menu_runner_->RunMenuAt(source->GetWidget(), NULL, - gfx::Rect(p, gfx::Size()), views::MenuItemView::TOPLEFT, 0) == + gfx::Rect(point, gfx::Size()), views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) return; } diff --git a/ui/views/examples/tree_view_example.h b/ui/views/examples/tree_view_example.h index 99ed43b..4709091 100644 --- a/ui/views/examples/tree_view_example.h +++ b/ui/views/examples/tree_view_example.h @@ -57,8 +57,7 @@ class TreeViewExample : public ExampleBase, // ContextMenuController: virtual void ShowContextMenuForView(View* source, - const gfx::Point& p, - bool is_mouse_gesture) OVERRIDE; + const gfx::Point& point) OVERRIDE; // SimpleMenuModel::Delegate: virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; diff --git a/ui/views/view.cc b/ui/views/view.cc index 9cb513e..fb9e774 100644 --- a/ui/views/view.cc +++ b/ui/views/view.cc @@ -992,7 +992,7 @@ void View::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) { if (!context_menu_controller_) return; - context_menu_controller_->ShowContextMenuForView(this, p, is_mouse_gesture); + context_menu_controller_->ShowContextMenuForView(this, p); } // Drag and drop --------------------------------------------------------------- |