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

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 7492054: Don't send ViewMsg_ContextMenuClosed to the renderer process for submenus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tabs/browser_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/extensions/extension_tab_helper.h" 10 #include "chrome/browser/extensions/extension_tab_helper.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 virtual void ExecuteCommand(int command_id) OVERRIDE { 98 virtual void ExecuteCommand(int command_id) OVERRIDE {
99 // Executing the command destroys |this|, and can also end up destroying 99 // Executing the command destroys |this|, and can also end up destroying
100 // |controller_| (e.g. for |CommandUseVerticalTabs|). So stop the highlights 100 // |controller_| (e.g. for |CommandUseVerticalTabs|). So stop the highlights
101 // before executing the command. 101 // before executing the command.
102 controller_->tabstrip_->StopAllHighlighting(); 102 controller_->tabstrip_->StopAllHighlighting();
103 controller_->ExecuteCommandForTab( 103 controller_->ExecuteCommandForTab(
104 static_cast<TabStripModel::ContextMenuCommand>(command_id), 104 static_cast<TabStripModel::ContextMenuCommand>(command_id),
105 tab_); 105 tab_);
106 } 106 }
107 107
108 virtual void MenuClosed() OVERRIDE { 108 virtual void MenuClosed(ui::SimpleMenuModel* /*source*/) OVERRIDE {
109 if (controller_) 109 if (controller_)
110 controller_->tabstrip_->StopAllHighlighting(); 110 controller_->tabstrip_->StopAllHighlighting();
111 } 111 }
112 112
113 private: 113 private:
114 TabMenuModel model_; 114 TabMenuModel model_;
115 views::MenuModelAdapter menu_model_adapter_; 115 views::MenuModelAdapter menu_model_adapter_;
116 views::MenuItemView menu_; 116 views::MenuItemView menu_;
117 117
118 // The tab we're showing a menu for. 118 // The tab we're showing a menu for.
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 void BrowserTabStripController::StopHighlightTabsForCommand( 487 void BrowserTabStripController::StopHighlightTabsForCommand(
488 TabStripModel::ContextMenuCommand command_id, 488 TabStripModel::ContextMenuCommand command_id,
489 BaseTab* tab) { 489 BaseTab* tab) {
490 if (command_id == TabStripModel::CommandCloseTabsToRight || 490 if (command_id == TabStripModel::CommandCloseTabsToRight ||
491 command_id == TabStripModel::CommandCloseOtherTabs) { 491 command_id == TabStripModel::CommandCloseOtherTabs) {
492 // Just tell all Tabs to stop pulsing - it's safe. 492 // Just tell all Tabs to stop pulsing - it's safe.
493 tabstrip_->StopAllHighlighting(); 493 tabstrip_->StopAllHighlighting();
494 } 494 }
495 } 495 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/button_dropdown_test.cc ('k') | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698