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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILE_MENU_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PROFILE_MENU_BUTTON_H_ 7 #pragma once 8 9 #include <string> 10 11 #include "views/controls/button/menu_button.h" 12 13 namespace gfx { 14 class Canvas; 15 } 16 17 namespace views { 18 19 // ProfileMenuButton 20 // 21 // Shows the button for the multiprofile menu with an image layered 22 // underneath that displays the profile tag. 23 24 class ProfileMenuButton : public MenuButton { 25 public: 26 // Space between window controls and end of profile tag. 27 static const int kProfileTagHorizontalSpacing = 5; 28 29 ProfileMenuButton(ButtonListener* listener, 30 const std::wstring& text, 31 ViewMenuDelegate* menu_delegate); 32 33 virtual ~ProfileMenuButton(); 34 35 // Override MenuButton to clamp text at kMaxTextWidth. 36 virtual void SetText(const std::wstring& text) OVERRIDE; 37 38 private: 39 DISALLOW_COPY_AND_ASSIGN(ProfileMenuButton); 40 }; 41 42 } // namespace views 43 44 #endif // CHROME_BROWSER_UI_VIEWS_PROFILE_MENU_BUTTON_H_ 45 46