Index: ui/views/style/platform_style.h |
diff --git a/ui/views/style/platform_style.h b/ui/views/style/platform_style.h |
index 3103691642a72c4a6d2b8444a942123a63bac170..8949979b0ebabd6ae43a552dfb6247a6c6ccd327 100644 |
--- a/ui/views/style/platform_style.h |
+++ b/ui/views/style/platform_style.h |
@@ -19,8 +19,29 @@ class LabelButtonBorder; |
class ScrollBar; |
// Cross-platform API for providing platform-specific styling for toolkit-views. |
-class PlatformStyle { |
+class VIEWS_EXPORT PlatformStyle { |
public: |
+ enum class CONTROL { |
+ BUTTON, |
+ COMBOBOX, |
+ LINK, |
+ ICON, |
+ SCROLLBAR_VIEW, |
+ SEPARATOR, |
+ SLIDER, |
+ TREE_VIEW, |
+ TEXTFIELD, |
+ TABLE_VIEW, |
+ TABBED_PANE, |
+ IN_MENU_BUTTON, // To be used for buttons in Menus. |
+ WEBVIEW, |
+ COLOR_CHOOSER_VIEW, |
+ CREDENTIALS_ITEM_VIEW, |
+ DESKTOP_MEDIA_SOURCE_VIEW, |
+ DESKTOP_MEDIA_LIST_VIEW, |
+ TOOLBAR_BUTTON, |
+ }; |
+ |
// Creates an ImageSkia containing the image to use for the combobox arrow. |
// The |is_enabled| argument is true if the control the arrow is for is |
// enabled, and false if the control is disabled. The |style| argument is the |
@@ -45,6 +66,10 @@ class PlatformStyle { |
// Creates the default scrollbar for the given orientation. |
static scoped_ptr<ScrollBar> CreateScrollBar(bool is_horizontal); |
+ // Sets the correct focusability setting on |view| based on the |control| |
+ // type. |
+ static void ConfigureFocus(CONTROL control, View* view); |
+ |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); |
}; |