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

Side by Side Diff: ui/views/controls/button/image_button.h

Issue 108063004: Give up focus if the focused view becomes unfocusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extracted to common code into FocusManager class Created 7 years 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
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 #ifndef UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/base/layout.h" 10 #include "ui/base/layout.h"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "ui/views/controls/button/custom_button.h" 12 #include "ui/views/controls/button/custom_button.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 class Painter; 16 class Painter;
17 17
18 // An image button. 18 // An image button.
19 19
20 // Note that this type of button is not focusable by default and will not be 20 // Note that this type of button is not focusable by default and will not be
21 // part of the focus chain. Call set_focusable(true) to make it part of the 21 // part of the focus chain. Call SetFocusable(true) to make it part of the
22 // focus chain. 22 // focus chain.
23 23
24 class VIEWS_EXPORT ImageButton : public CustomButton { 24 class VIEWS_EXPORT ImageButton : public CustomButton {
25 public: 25 public:
26 static const char kViewClassName[]; 26 static const char kViewClassName[];
27 27
28 enum HorizontalAlignment { 28 enum HorizontalAlignment {
29 ALIGN_LEFT = 0, 29 ALIGN_LEFT = 0,
30 ALIGN_CENTER, 30 ALIGN_CENTER,
31 ALIGN_RIGHT 31 ALIGN_RIGHT
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // The parent class's tooltip_text_ is displayed when not toggled, and 169 // The parent class's tooltip_text_ is displayed when not toggled, and
170 // this one is shown when toggled. 170 // this one is shown when toggled.
171 string16 toggled_tooltip_text_; 171 string16 toggled_tooltip_text_;
172 172
173 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton); 173 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton);
174 }; 174 };
175 175
176 } // namespace views 176 } // namespace views
177 177
178 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ 178 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698