| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 5 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
| 12 #include "ui/views/controls/button/custom_button.h" |
| 12 #include "ui/views/controls/combobox/combobox.h" | 13 #include "ui/views/controls/combobox/combobox.h" |
| 13 #include "ui/views/views_export.h" | 14 #include "ui/views/views_export.h" |
| 14 | 15 |
| 15 namespace views { | 16 namespace views { |
| 16 | 17 |
| 17 class Border; | 18 class Border; |
| 18 class FocusableBorder; | 19 class FocusableBorder; |
| 19 class Label; | 20 class Label; |
| 20 class LabelButton; | 21 class LabelButton; |
| 21 class LabelButtonBorder; | 22 class LabelButtonBorder; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 static const int kMinLabelButtonWidth; | 36 static const int kMinLabelButtonWidth; |
| 36 static const int kMinLabelButtonHeight; | 37 static const int kMinLabelButtonHeight; |
| 37 | 38 |
| 38 // Whether dialog-default buttons are given a bold font style. | 39 // Whether dialog-default buttons are given a bold font style. |
| 39 static const bool kDefaultLabelButtonHasBoldFont; | 40 static const bool kDefaultLabelButtonHasBoldFont; |
| 40 | 41 |
| 41 // Whether dragging vertically above or below a textfield's bounds selects to | 42 // Whether dragging vertically above or below a textfield's bounds selects to |
| 42 // the left or right end of the text from the cursor, respectively. | 43 // the left or right end of the text from the cursor, respectively. |
| 43 static const bool kTextfieldDragVerticallyDragsToEnd; | 44 static const bool kTextfieldDragVerticallyDragsToEnd; |
| 44 | 45 |
| 46 // The menu button's action to show the menu. |
| 47 static const CustomButton::NotifyAction kMenuNotifyActivationAction; |
| 48 |
| 45 // Creates an ImageSkia containing the image to use for the combobox arrow. | 49 // Creates an ImageSkia containing the image to use for the combobox arrow. |
| 46 // The |is_enabled| argument is true if the control the arrow is for is | 50 // The |is_enabled| argument is true if the control the arrow is for is |
| 47 // enabled, and false if the control is disabled. The |style| argument is the | 51 // enabled, and false if the control is disabled. The |style| argument is the |
| 48 // style of the combobox the arrow is being drawn for. | 52 // style of the combobox the arrow is being drawn for. |
| 49 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, | 53 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, |
| 50 Combobox::Style style); | 54 Combobox::Style style); |
| 51 | 55 |
| 52 // Creates the appropriate border for a focusable Combobox. | 56 // Creates the appropriate border for a focusable Combobox. |
| 53 static std::unique_ptr<FocusableBorder> CreateComboboxBorder(); | 57 static std::unique_ptr<FocusableBorder> CreateComboboxBorder(); |
| 54 | 58 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 78 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( | 82 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( |
| 79 LabelButton* button); | 83 LabelButton* button); |
| 80 | 84 |
| 81 private: | 85 private: |
| 82 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); | 86 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); |
| 83 }; | 87 }; |
| 84 | 88 |
| 85 } // namespace views | 89 } // namespace views |
| 86 | 90 |
| 87 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 91 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| OLD | NEW |