OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 VIEWS_CONTROLS_IMAGE_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_IMAGE_VIEW_H_ |
6 #define VIEWS_CONTROLS_IMAGE_VIEW_H_ | 6 #define VIEWS_CONTROLS_IMAGE_VIEW_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 Alignment GetVerticalAlignment(); | 67 Alignment GetVerticalAlignment(); |
68 | 68 |
69 // Set / Get the tooltip text. | 69 // Set / Get the tooltip text. |
70 void SetTooltipText(const std::wstring& tooltip); | 70 void SetTooltipText(const std::wstring& tooltip); |
71 std::wstring GetTooltipText(); | 71 std::wstring GetTooltipText(); |
72 | 72 |
73 // Return whether the image should be centered inside the view. | 73 // Return whether the image should be centered inside the view. |
74 // Overriden from View | 74 // Overriden from View |
75 virtual gfx::Size GetPreferredSize(); | 75 virtual gfx::Size GetPreferredSize(); |
76 virtual void Paint(gfx::Canvas* canvas); | 76 virtual void Paint(gfx::Canvas* canvas); |
| 77 virtual bool GetAccessibleName(std::wstring* name); |
| 78 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); |
77 | 79 |
78 // Overriden from View. | 80 // Overriden from View. |
79 virtual bool GetTooltipText(int x, int y, std::wstring* tooltip); | 81 virtual bool GetTooltipText(int x, int y, std::wstring* tooltip); |
80 | 82 |
81 private: | 83 private: |
82 // Compute the image origin given the desired size and the receiver alignment | 84 // Compute the image origin given the desired size and the receiver alignment |
83 // properties. | 85 // properties. |
84 void ComputeImageOrigin(int image_width, int image_height, int *x, int *y); | 86 void ComputeImageOrigin(int image_width, int image_height, int *x, int *y); |
85 | 87 |
86 // Whether the image size is set. | 88 // Whether the image size is set. |
(...skipping 13 matching lines...) Expand all Loading... |
100 | 102 |
101 // The current tooltip text. | 103 // The current tooltip text. |
102 std::wstring tooltip_text_; | 104 std::wstring tooltip_text_; |
103 | 105 |
104 DISALLOW_EVIL_CONSTRUCTORS(ImageView); | 106 DISALLOW_EVIL_CONSTRUCTORS(ImageView); |
105 }; | 107 }; |
106 | 108 |
107 } // namespace views | 109 } // namespace views |
108 | 110 |
109 #endif // VIEWS_CONTROLS_IMAGE_VIEW_H_ | 111 #endif // VIEWS_CONTROLS_IMAGE_VIEW_H_ |
OLD | NEW |