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

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: Change profile menu button to avatar button 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | views/controls/button/text_button.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) 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // Overridden from View: 346 // Overridden from View:
347 virtual gfx::Size GetPreferredSize() OVERRIDE; 347 virtual gfx::Size GetPreferredSize() OVERRIDE;
348 virtual std::string GetClassName() const OVERRIDE; 348 virtual std::string GetClassName() const OVERRIDE;
349 349
350 // Overridden from TextButtonBase: 350 // Overridden from TextButtonBase:
351 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; 351 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE;
352 352
353 protected: 353 protected:
354 SkBitmap icon() const { return icon_; } 354 SkBitmap icon() const { return icon_; }
355 355
356 // Returns the image to paint. This is invoked from paint.
357 virtual const SkBitmap& GetImageToPaint() const;
358
356 // Overridden from NativeThemeDelegate: 359 // Overridden from NativeThemeDelegate:
357 virtual gfx::NativeTheme::Part GetThemePart() const OVERRIDE; 360 virtual gfx::NativeTheme::Part GetThemePart() const OVERRIDE;
358 361
359 // Overridden from TextButtonBase: 362 // Overridden from TextButtonBase:
360 virtual void GetExtraParams( 363 virtual void GetExtraParams(
361 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; 364 gfx::NativeTheme::ExtraParams* params) const OVERRIDE;
362 virtual gfx::Rect GetTextBounds() const OVERRIDE; 365 virtual gfx::Rect GetTextBounds() const OVERRIDE;
363 366
364 private: 367 private:
365 // The position of the icon. 368 // The position of the icon.
(...skipping 12 matching lines...) Expand all
378 381
379 // Space between icon and text. 382 // Space between icon and text.
380 int icon_text_spacing_; 383 int icon_text_spacing_;
381 384
382 DISALLOW_COPY_AND_ASSIGN(TextButton); 385 DISALLOW_COPY_AND_ASSIGN(TextButton);
383 }; 386 };
384 387
385 } // namespace views 388 } // namespace views
386 389
387 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 390 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698