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

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

Issue 9693022: views: Rename MenuButtonDelegate::RunMenu to something more obvious. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: menu_button_listener.h Created 8 years, 9 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) 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/browser_actions_container.h" 5 #include "chrome/browser/ui/views/browser_actions_container.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 OnDragExited(); // Perform clean up after dragging. 718 OnDragExited(); // Perform clean up after dragging.
719 return ui::DragDropTypes::DRAG_MOVE; 719 return ui::DragDropTypes::DRAG_MOVE;
720 } 720 }
721 721
722 void BrowserActionsContainer::GetAccessibleState( 722 void BrowserActionsContainer::GetAccessibleState(
723 ui::AccessibleViewState* state) { 723 ui::AccessibleViewState* state) {
724 state->role = ui::AccessibilityTypes::ROLE_GROUPING; 724 state->role = ui::AccessibilityTypes::ROLE_GROUPING;
725 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_EXTENSIONS); 725 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_EXTENSIONS);
726 } 726 }
727 727
728 void BrowserActionsContainer::RunMenu(View* source, const gfx::Point& pt) { 728 void BrowserActionsContainer::OnMenuButtonClicked(views::View* source,
729 const gfx::Point& point) {
729 if (source == chevron_) { 730 if (source == chevron_) {
730 overflow_menu_ = new BrowserActionOverflowMenuController( 731 overflow_menu_ = new BrowserActionOverflowMenuController(
731 this, chevron_, browser_action_views_, VisibleBrowserActions()); 732 this, chevron_, browser_action_views_, VisibleBrowserActions());
732 overflow_menu_->set_observer(this); 733 overflow_menu_->set_observer(this);
733 overflow_menu_->RunMenu(GetWidget(), false); 734 overflow_menu_->RunMenu(GetWidget(), false);
734 } 735 }
735 } 736 }
736 737
737 void BrowserActionsContainer::WriteDragDataForView(View* sender, 738 void BrowserActionsContainer::WriteDragDataForView(View* sender,
738 const gfx::Point& press_pt, 739 const gfx::Point& press_pt,
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 } 1126 }
1126 } 1127 }
1127 1128
1128 bool BrowserActionsContainer::ShouldDisplayBrowserAction( 1129 bool BrowserActionsContainer::ShouldDisplayBrowserAction(
1129 const Extension* extension) { 1130 const Extension* extension) {
1130 // Only display incognito-enabled extensions while in incognito mode. 1131 // Only display incognito-enabled extensions while in incognito mode.
1131 return 1132 return
1132 (!profile_->IsOffTheRecord() || 1133 (!profile_->IsOffTheRecord() ||
1133 profile_->GetExtensionService()->IsIncognitoEnabled(extension->id())); 1134 profile_->GetExtensionService()->IsIncognitoEnabled(extension->id()));
1134 } 1135 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.h ('k') | chrome/browser/ui/views/infobars/after_translate_infobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698