| Index: chrome/browser/ui/views/new_avatar_button.h
|
| diff --git a/chrome/browser/ui/views/new_avatar_button.h b/chrome/browser/ui/views/new_avatar_button.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..240214f7a7961fd7525780079441f456e75d9f06
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/views/new_avatar_button.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2013 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_NEW_AVATAR_BUTTON_H_
|
| +#define CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "ui/views/controls/button/menu_button.h"
|
| +#include "ui/views/controls/button/text_button.h"
|
| +
|
| +class BrowserView;
|
| +
|
| +namespace ui {
|
| +class MouseEvent;
|
| +class ThemeProvider;
|
| +}
|
| +
|
| +// Avatar button that displays the active profile's name in the caption area.
|
| +class NewAvatarButton : public views::MenuButton {
|
| + public:
|
| + NewAvatarButton(BrowserView* browser_view, const string16& profile_name);
|
| + virtual ~NewAvatarButton();
|
| +
|
| + // views::TextButton:
|
| + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
|
| +
|
| + // views::View:
|
| + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
|
| +
|
| + void set_avatar_bubble_align_right(bool align) {
|
| + avatar_bubble_align_right_ = align;
|
| + }
|
| +
|
| + private:
|
| + // Shows the ProfileChooserView bubble.
|
| + void ShowAvatarBubble();
|
| +
|
| + BrowserView* browser_view_;
|
| +
|
| + // Whether the ProfileChooserView bubble is aligned with the left or right
|
| + // margin of the button;
|
| + bool avatar_bubble_align_right_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(NewAvatarButton);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_
|
|
|