diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 04:57:58 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 04:57:58 +0000 |
commit | 0933ab808b0245878803552b9908c720b0faf1d1 (patch) | |
tree | 99d088873b45c8295af71287b3ad2865e141bf59 /chrome | |
parent | eb8a06d3f439f3be31a5a0dcbcdd86160c50cbb7 (diff) | |
download | chromium_src-0933ab808b0245878803552b9908c720b0faf1d1.zip chromium_src-0933ab808b0245878803552b9908c720b0faf1d1.tar.gz chromium_src-0933ab808b0245878803552b9908c720b0faf1d1.tar.bz2 |
Rename ContextMenuController::ShowContextMenu() to ShowContextMenuForView().
For classes deriving from both View and ContextMenuController, this
makes it clear which of method is overridden.
Rename TabController::ShowContextMenu to ShowContextMenuForTab for the same reason.
No intended functionality change.
BUG=70465,72205
TEST=none
TBR=beng
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
13 files changed, 34 insertions, 34 deletions
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 3f58c8e..149681d 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -672,7 +672,7 @@ int BookmarkBarView::OnPerformDrop(const DropTargetEvent& event) { void BookmarkBarView::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) { - ShowContextMenu(this, p, is_mouse_gesture); + ShowContextMenuForView(this, p, is_mouse_gesture); } bool BookmarkBarView::IsAccessibleViewTraversable(views::View* view) { @@ -1206,9 +1206,9 @@ void BookmarkBarView::ButtonPressed(views::Button* sender, profile_); } -void BookmarkBarView::ShowContextMenu(View* source, - const gfx::Point& p, - bool is_mouse_gesture) { +void BookmarkBarView::ShowContextMenuForView(View* source, + const gfx::Point& p, + bool is_mouse_gesture) { if (!model_->IsLoaded()) { // Don't do anything if the model isn't loaded. return; diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h index f3fbda2..8b88a28cb 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h @@ -380,9 +380,9 @@ class BookmarkBarView : public DetachableToolbarView, // Invoked for this View, one of the buttons or the 'other' button. Shows the // appropriate context menu. - virtual void ShowContextMenu(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture); + virtual void ShowContextMenuForView(views::View* source, + const gfx::Point& p, + bool is_mouse_gesture); // Creates the button for rendering the specified bookmark node. views::View* CreateBookmarkButton(const BookmarkNode* node); diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc index a06cec5..b1d3885 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc @@ -239,9 +239,9 @@ void BookmarkEditorView::Close() { window()->Close(); } -void BookmarkEditorView::ShowContextMenu(View* source, - const gfx::Point& p, - bool is_mouse_gesture) { +void BookmarkEditorView::ShowContextMenuForView(View* source, + const gfx::Point& p, + bool is_mouse_gesture) { DCHECK(source == tree_view_); if (!tree_view_->GetSelectedNode()) return; diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h index 0271399..0bdfbca 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h +++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h @@ -122,9 +122,9 @@ class BookmarkEditorView : public BookmarkEditor, void Close(); // Shows the context menu. - virtual void ShowContextMenu(View* source, - const gfx::Point& p, - bool is_mouse_gesture); + virtual void ShowContextMenuForView(View* source, + const gfx::Point& p, + bool is_mouse_gesture); 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 9c99e47..740dc1d 100644 --- a/chrome/browser/ui/views/tabs/base_tab.cc +++ b/chrome/browser/ui/views/tabs/base_tab.cc @@ -473,11 +473,11 @@ void BaseTab::ButtonPressed(views::Button* sender, const views::Event& event) { controller()->CloseTab(this); } -void BaseTab::ShowContextMenu(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { +void BaseTab::ShowContextMenuForView(views::View* source, + const gfx::Point& p, + bool is_mouse_gesture) { if (controller()) - controller()->ShowContextMenu(this, p); + controller()->ShowContextMenuForTab(this, p); } void BaseTab::SetFavIconHidingOffset(int offset) { diff --git a/chrome/browser/ui/views/tabs/base_tab.h b/chrome/browser/ui/views/tabs/base_tab.h index 8a43f06..f51eab9 100644 --- a/chrome/browser/ui/views/tabs/base_tab.h +++ b/chrome/browser/ui/views/tabs/base_tab.h @@ -128,9 +128,9 @@ class BaseTab : public ui::AnimationDelegate, const views::Event& event); // views::ContextMenuController overrides: - virtual void ShowContextMenu(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture); + virtual void ShowContextMenuForView(views::View* source, + const gfx::Point& p, + bool is_mouse_gesture); // Returns the bounds of the title and icon. virtual const gfx::Rect& GetTitleBounds() const = 0; diff --git a/chrome/browser/ui/views/tabs/base_tab_strip.cc b/chrome/browser/ui/views/tabs/base_tab_strip.cc index 35c1e66..715e2e2 100644 --- a/chrome/browser/ui/views/tabs/base_tab_strip.cc +++ b/chrome/browser/ui/views/tabs/base_tab_strip.cc @@ -251,8 +251,8 @@ void BaseTabStrip::CloseTab(BaseTab* tab) { controller_->CloseTab(model_index); } -void BaseTabStrip::ShowContextMenu(BaseTab* tab, const gfx::Point& p) { - controller_->ShowContextMenu(tab, p); +void BaseTabStrip::ShowContextMenuForTab(BaseTab* tab, const gfx::Point& p) { + controller_->ShowContextMenuForTab(tab, p); } bool BaseTabStrip::IsTabSelected(const BaseTab* tab) const { diff --git a/chrome/browser/ui/views/tabs/base_tab_strip.h b/chrome/browser/ui/views/tabs/base_tab_strip.h index 34fd070..fd92839 100644 --- a/chrome/browser/ui/views/tabs/base_tab_strip.h +++ b/chrome/browser/ui/views/tabs/base_tab_strip.h @@ -129,7 +129,7 @@ class BaseTabStrip : public views::View, // TabController overrides: virtual void SelectTab(BaseTab* tab); virtual void CloseTab(BaseTab* tab); - virtual void ShowContextMenu(BaseTab* tab, const gfx::Point& p); + virtual void ShowContextMenuForTab(BaseTab* tab, const gfx::Point& p); virtual bool IsTabSelected(const BaseTab* tab) const; virtual bool IsTabPinned(const BaseTab* tab) const; virtual bool IsTabCloseable(const BaseTab* tab) const; diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc index 5038265..355e366 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc @@ -215,8 +215,8 @@ void BrowserTabStripController::CloseTab(int model_index) { TabStripModel::CLOSE_CREATE_HISTORICAL_TAB); } -void BrowserTabStripController::ShowContextMenu(BaseTab* tab, - const gfx::Point& p) { +void BrowserTabStripController::ShowContextMenuForTab(BaseTab* tab, + const gfx::Point& p) { context_menu_contents_.reset(new TabContextMenuContents(tab, this)); context_menu_contents_->RunMenuAt(p); } diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h index a0c0c73..6cbf07f 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h @@ -48,7 +48,7 @@ class BrowserTabStripController : public TabStripController, virtual bool IsNewTabPage(int model_index) const; virtual void SelectTab(int model_index); virtual void CloseTab(int model_index); - virtual void ShowContextMenu(BaseTab* tab, const gfx::Point& p); + virtual void ShowContextMenuForTab(BaseTab* tab, const gfx::Point& p); virtual void UpdateLoadingAnimations(); virtual int HasAvailableDragActions() const; virtual void PerformDrop(bool drop_before, int index, const GURL& url); diff --git a/chrome/browser/ui/views/tabs/tab_controller.h b/chrome/browser/ui/views/tabs/tab_controller.h index c876346..b00d513 100644 --- a/chrome/browser/ui/views/tabs/tab_controller.h +++ b/chrome/browser/ui/views/tabs/tab_controller.h @@ -25,7 +25,7 @@ class TabController { virtual void CloseTab(BaseTab* tab) = 0; // Shows a context menu for the tab at the specified point in screen coords. - virtual void ShowContextMenu(BaseTab* tab, const gfx::Point& p) = 0; + virtual void ShowContextMenuForTab(BaseTab* tab, const gfx::Point& p) = 0; // Returns true if the specified Tab is selected. virtual bool IsTabSelected(const BaseTab* tab) const = 0; diff --git a/chrome/browser/ui/views/tabs/tab_strip_controller.h b/chrome/browser/ui/views/tabs/tab_strip_controller.h index 835f95d..b78ea5e 100644 --- a/chrome/browser/ui/views/tabs/tab_strip_controller.h +++ b/chrome/browser/ui/views/tabs/tab_strip_controller.h @@ -45,7 +45,7 @@ class TabStripController { virtual void CloseTab(int index) = 0; // Shows a context menu for the tab at the specified point in screen coords. - virtual void ShowContextMenu(BaseTab* tab, const gfx::Point& p) = 0; + virtual void ShowContextMenuForTab(BaseTab* tab, const gfx::Point& p) = 0; // Updates the loading animations of all the tabs. virtual void UpdateLoadingAnimations() = 0; diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc index 442eb96..489194c 100644 --- a/chrome/browser/ui/views/task_manager_view.cc +++ b/chrome/browser/ui/views/task_manager_view.cc @@ -300,9 +300,9 @@ class TaskManagerView : public views::View, void UpdateStatsCounters(); // Menu::Delegate - virtual void ShowContextMenu(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture); + virtual void ShowContextMenuForView(views::View* source, + const gfx::Point& p, + bool is_mouse_gesture); virtual bool IsItemChecked(int id) const; virtual void ExecuteCommand(int id); @@ -683,9 +683,9 @@ void TaskManagerView::LinkActivated(views::Link* source, int event_flags) { task_manager_->OpenAboutMemory(); } -void TaskManagerView::ShowContextMenu(views::View* source, - const gfx::Point& p, - bool is_mouse_gesture) { +void TaskManagerView::ShowContextMenuForView(views::View* source, + const gfx::Point& p, + bool is_mouse_gesture) { UpdateStatsCounters(); scoped_ptr<views::Menu> menu(views::Menu::Create( this, views::Menu::TOPLEFT, source->GetWidget()->GetNativeView())); |