Chromium Code Reviews| Index: chrome/browser/ui/views/profiles/themed_avatar_button.h |
| diff --git a/chrome/browser/ui/views/profiles/themed_avatar_button.h b/chrome/browser/ui/views/profiles/themed_avatar_button.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bec2ca277749e78cc8b8df5a2a6bf8ddb3ed9a3b |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/profiles/themed_avatar_button.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_THEMED_AVATAR_BUTTON_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_PROFILES_THEMED_AVATAR_BUTTON_H_ |
| + |
| +#include "chrome/browser/ui/views/profiles/avatar_button.h" |
| +#include "chrome/browser/ui/views/profiles/avatar_button_style.h" |
| +#include "ui/views/controls/button/menu_button_listener.h" |
| + |
| +class ThemedAvatarButton : public AvatarButton { |
|
Evan Stade
2017/05/02 15:49:20
so now that these two/three avatar button classes
|
| + public: |
| + ThemedAvatarButton(views::MenuButtonListener* listener, |
| + AvatarButtonStyle button_style, |
| + Profile* profile); |
| + ~ThemedAvatarButton() override; |
| + |
| + protected: |
| + gfx::Size GetPreferredSize() const override; |
| + |
| + private: |
| + std::unique_ptr<views::Border> CreateBorder( |
| + const int normal_image_set[], |
| + const int hot_image_set[], |
| + const int pushed_image_set[]) const; |
| + // Sets generic_avatar_ to the image with the specified IDR. |
| + void SetButtonAvatar(int avatar_idr); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ThemedAvatarButton); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_PROFILES_THEMED_AVATAR_BUTTON_H_ |