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

Side by Side Diff: ui/views/controls/menu/menu_controller.cc

Issue 13524005: Cleanup: remove NotifyAccessibilityEvent from views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/submenu_view.cc » ('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 "ui/views/controls/menu/menu_controller.h" 5 #include "ui/views/controls/menu/menu_controller.h"
6 6
7 #include "base/i18n/case_conversion.h" 7 #include "base/i18n/case_conversion.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 805
806 if (selection_types & SELECTION_UPDATE_IMMEDIATELY) 806 if (selection_types & SELECTION_UPDATE_IMMEDIATELY)
807 CommitPendingSelection(); 807 CommitPendingSelection();
808 else if (pending_item_changed) 808 else if (pending_item_changed)
809 StartShowTimer(); 809 StartShowTimer();
810 810
811 // Notify an accessibility focus event on all menu items except for the root. 811 // Notify an accessibility focus event on all menu items except for the root.
812 if (menu_item && 812 if (menu_item &&
813 (MenuDepth(menu_item) != 1 || 813 (MenuDepth(menu_item) != 1 ||
814 menu_item->GetType() != MenuItemView::SUBMENU)) { 814 menu_item->GetType() != MenuItemView::SUBMENU)) {
815 menu_item->GetWidget()->NotifyAccessibilityEvent( 815 menu_item->NotifyAccessibilityEvent(
816 menu_item, ui::AccessibilityTypes::EVENT_FOCUS, true); 816 ui::AccessibilityTypes::EVENT_FOCUS, true);
817 } 817 }
818 } 818 }
819 819
820 void MenuController::SetSelectionOnPointerDown(SubmenuView* source, 820 void MenuController::SetSelectionOnPointerDown(SubmenuView* source,
821 const ui::LocatedEvent& event) { 821 const ui::LocatedEvent& event) {
822 if (!blocking_run_) 822 if (!blocking_run_)
823 return; 823 return;
824 824
825 DCHECK(!active_mouse_view_); 825 DCHECK(!active_mouse_view_);
826 826
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 (!pending_state_.item->HasSubmenu() || 2275 (!pending_state_.item->HasSubmenu() ||
2276 !pending_state_.item->GetSubmenu()->IsShowing())) { 2276 !pending_state_.item->GetSubmenu()->IsShowing())) {
2277 // On exit if the user hasn't selected an item with a submenu, move the 2277 // On exit if the user hasn't selected an item with a submenu, move the
2278 // selection back to the parent menu item. 2278 // selection back to the parent menu item.
2279 SetSelection(pending_state_.item->GetParentMenuItem(), 2279 SetSelection(pending_state_.item->GetParentMenuItem(),
2280 SELECTION_OPEN_SUBMENU); 2280 SELECTION_OPEN_SUBMENU);
2281 } 2281 }
2282 } 2282 }
2283 2283
2284 } // namespace views 2284 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/submenu_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698