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

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

Issue 7003080: Change profile menu button to avatar button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BUTTON_TEXT_BUTTON_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // Overridden from View: 335 // Overridden from View:
336 virtual gfx::Size GetPreferredSize() OVERRIDE; 336 virtual gfx::Size GetPreferredSize() OVERRIDE;
337 virtual std::string GetClassName() const OVERRIDE; 337 virtual std::string GetClassName() const OVERRIDE;
338 338
339 // Overridden from TextButtonBase: 339 // Overridden from TextButtonBase:
340 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; 340 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE;
341 341
342 protected: 342 protected:
343 SkBitmap icon() const { return icon_; } 343 SkBitmap icon() const { return icon_; }
344 344
345 // Returns the image to paint. This is invoked from paint.
346 virtual const SkBitmap& GetImageToPaint() const;
347
345 // Overridden from NativeThemeDelegate: 348 // Overridden from NativeThemeDelegate:
346 virtual gfx::NativeTheme::Part GetThemePart() const OVERRIDE; 349 virtual gfx::NativeTheme::Part GetThemePart() const OVERRIDE;
347 350
348 // Overridden from TextButtonBase: 351 // Overridden from TextButtonBase:
349 virtual void GetExtraParams( 352 virtual void GetExtraParams(
350 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; 353 gfx::NativeTheme::ExtraParams* params) const OVERRIDE;
351 virtual gfx::Rect GetTextBounds() const OVERRIDE; 354 virtual gfx::Rect GetTextBounds() const OVERRIDE;
352 355
353 private: 356 private:
354 // The position of the icon. 357 // The position of the icon.
(...skipping 12 matching lines...) Expand all
367 370
368 // Space between icon and text. 371 // Space between icon and text.
369 int icon_text_spacing_; 372 int icon_text_spacing_;
370 373
371 DISALLOW_COPY_AND_ASSIGN(TextButton); 374 DISALLOW_COPY_AND_ASSIGN(TextButton);
372 }; 375 };
373 376
374 } // namespace views 377 } // namespace views
375 378
376 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 379 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698