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

Unified Diff: chrome/browser/ui/views/avatar_menu_button.h

Issue 229293002: [Win] Move profile related UI from ui/views/ to ui/views/profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/avatar_menu_button.h
diff --git a/chrome/browser/ui/views/avatar_menu_button.h b/chrome/browser/ui/views/avatar_menu_button.h
deleted file mode 100644
index 8961e9ff780cf4f3692e91d3a3379ce8ec081661..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/avatar_menu_button.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 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_AVATAR_MENU_BUTTON_H_
-#define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_
-
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "ui/base/models/simple_menu_model.h"
-#include "ui/views/controls/button/menu_button.h"
-#include "ui/views/controls/button/menu_button_listener.h"
-
-namespace gfx {
-class Canvas;
-class Image;
-}
-class Browser;
-
-// AvatarMenuButton
-//
-// A button used to show either the incognito avatar or the profile avatar.
-// The button can optionally have a menu attached to it.
-
-class AvatarMenuButton : public views::MenuButton,
- public views::MenuButtonListener {
- public:
- // Internal class name.
- static const char kViewClassName[];
-
- // Creates a new button. If |disabled| is true and we're not in managed mode,
- // clicking on the button will cause the profile menu to be displayed.
- AvatarMenuButton(Browser* browser, bool disabled);
-
- virtual ~AvatarMenuButton();
-
- // views::MenuButton:
- virtual const char* GetClassName() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
-
- // Sets the image for the avatar button. Rectangular images, as opposed
- // to Chrome avatar icons, will be resized and modified for the title bar.
- virtual void SetAvatarIcon(const gfx::Image& icon, bool is_rectangle);
-
- void set_button_on_right(bool button_on_right) {
- button_on_right_ = button_on_right;
- }
- bool button_on_right() { return button_on_right_; }
-
- void ShowAvatarBubble();
-
- private:
- // views::MenuButtonListener:
- virtual void OnMenuButtonClicked(views::View* source,
- const gfx::Point& point) OVERRIDE;
-
- Browser* browser_;
- bool disabled_;
- scoped_ptr<ui::MenuModel> menu_model_;
-
- // Use a scoped ptr because gfx::Image doesn't have a default constructor.
- scoped_ptr<gfx::Image> icon_;
- gfx::ImageSkia button_icon_;
- bool is_rectangle_;
- int old_height_;
- // True if the avatar button is on the right side of the browser window.
- bool button_on_right_;
-
- DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton);
-};
-
-#endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698