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

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

Issue 10824359: Remove ImageSkia::empty and ImageSkia::extractSubset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/button/image_button_unittest.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TEXT_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 void set_icon_text_spacing(int icon_text_spacing) { 317 void set_icon_text_spacing(int icon_text_spacing) {
318 icon_text_spacing_ = icon_text_spacing; 318 icon_text_spacing_ = icon_text_spacing;
319 } 319 }
320 320
321 // Sets the icon. 321 // Sets the icon.
322 virtual void SetIcon(const gfx::ImageSkia& icon); 322 virtual void SetIcon(const gfx::ImageSkia& icon);
323 virtual void SetHoverIcon(const gfx::ImageSkia& icon); 323 virtual void SetHoverIcon(const gfx::ImageSkia& icon);
324 virtual void SetPushedIcon(const gfx::ImageSkia& icon); 324 virtual void SetPushedIcon(const gfx::ImageSkia& icon);
325 325
326 bool HasIcon() const { return !icon_.empty(); } 326 bool HasIcon() const { return !icon_.isNull(); }
327 327
328 // Meanings are reversed for right-to-left layouts. 328 // Meanings are reversed for right-to-left layouts.
329 enum IconPlacement { 329 enum IconPlacement {
330 ICON_ON_LEFT, 330 ICON_ON_LEFT,
331 ICON_ON_RIGHT 331 ICON_ON_RIGHT
332 }; 332 };
333 333
334 IconPlacement icon_placement() { return icon_placement_; } 334 IconPlacement icon_placement() { return icon_placement_; }
335 void set_icon_placement(IconPlacement icon_placement) { 335 void set_icon_placement(IconPlacement icon_placement) {
336 icon_placement_ = icon_placement; 336 icon_placement_ = icon_placement;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // Overridden from TextButton: 413 // Overridden from TextButton:
414 virtual void GetExtraParams( 414 virtual void GetExtraParams(
415 ui::NativeTheme::ExtraParams* params) const OVERRIDE; 415 ui::NativeTheme::ExtraParams* params) const OVERRIDE;
416 416
417 DISALLOW_COPY_AND_ASSIGN(NativeTextButton); 417 DISALLOW_COPY_AND_ASSIGN(NativeTextButton);
418 }; 418 };
419 419
420 } // namespace views 420 } // namespace views
421 421
422 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 422 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/image_button_unittest.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698