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

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

Issue 1761443003: [MD] simplify and unify some ink drop center calculations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: works in rtl Created 4 years, 9 months 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
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_LABEL_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void SetBorder(scoped_ptr<Border> border) override; 98 void SetBorder(scoped_ptr<Border> border) override;
99 gfx::Size GetPreferredSize() const override; 99 gfx::Size GetPreferredSize() const override;
100 int GetHeightForWidth(int w) const override; 100 int GetHeightForWidth(int w) const override;
101 void Layout() override; 101 void Layout() override;
102 const char* GetClassName() const override; 102 const char* GetClassName() const override;
103 void EnableCanvasFlippingForRTLUI(bool flip) override; 103 void EnableCanvasFlippingForRTLUI(bool flip) override;
104 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; 104 void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
105 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; 105 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
106 scoped_ptr<InkDropAnimation> CreateInkDropAnimation() const override; 106 scoped_ptr<InkDropAnimation> CreateInkDropAnimation() const override;
107 scoped_ptr<InkDropHover> CreateInkDropHover() const override; 107 scoped_ptr<InkDropHover> CreateInkDropHover() const override;
108 gfx::Point GetInkDropCenter() const override;
108 109
109 protected: 110 protected:
110 ImageView* image() const { return image_; } 111 ImageView* image() const { return image_; }
111 Label* label() const { return label_; } 112 Label* label() const { return label_; }
112 113
113 // Returns the available area for the label and image. Subclasses can change 114 // Returns the available area for the label and image. Subclasses can change
114 // these bounds if they need room to do manual painting. 115 // these bounds if they need room to do manual painting.
115 virtual gfx::Rect GetChildAreaBounds(); 116 virtual gfx::Rect GetChildAreaBounds();
116 117
117 // View: 118 // View:
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 gfx::HorizontalAlignment horizontal_alignment_; 215 gfx::HorizontalAlignment horizontal_alignment_;
215 216
216 scoped_ptr<Painter> focus_painter_; 217 scoped_ptr<Painter> focus_painter_;
217 218
218 DISALLOW_COPY_AND_ASSIGN(LabelButton); 219 DISALLOW_COPY_AND_ASSIGN(LabelButton);
219 }; 220 };
220 221
221 } // namespace views 222 } // namespace views
222 223
223 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 224 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698