1 // Copyright 2020 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef ASH_SYSTEM_ACCESSIBILITY_FLOATING_MENU_UTILS_H_ 6 #define ASH_SYSTEM_ACCESSIBILITY_FLOATING_MENU_UTILS_H_ 7 8 #include "ui/views/bubble/bubble_border.h" 9 10 namespace gfx { 11 class Size; 12 } 13 14 namespace ash { 15 16 enum class FloatingMenuPosition; 17 18 // Helper functions that are used by floating menus. 19 20 // Default position for the floating menu. This depends on whether the user's 21 // language is LTR or RTL. 22 FloatingMenuPosition DefaultSystemFloatingMenuPosition(); 23 24 // Determines bounds for the floating menu depending on the desired menu 25 // position. 26 gfx::Rect GetOnScreenBoundsForFloatingMenuPosition( 27 const gfx::Size& menu_size, 28 FloatingMenuPosition position); 29 30 // Determines the position for the view anchored to the floating menu. 31 views::BubbleBorder::Arrow GetAnchorAlignmentForFloatingMenuPosition( 32 FloatingMenuPosition position); 33 34 } // namespace ash 35 36 #endif // ASH_SYSTEM_ACCESSIBILITY_FLOATING_MENU_UTILS_H_ 37