| OLD | NEW |
| 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 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" | 5 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/profiles/avatar_menu_model.h" | 11 #include "chrome/browser/profiles/avatar_menu_model.h" |
| 12 #include "chrome/browser/profiles/profile_info_cache.h" | 12 #include "chrome/browser/profiles/profile_info_cache.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
| 19 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
| 20 #include "ui/gfx/canvas_skia.h" | 20 #include "ui/gfx/canvas_skia.h" |
| 21 #include "ui/gfx/font.h" | 21 #include "ui/gfx/font.h" |
| 22 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
| 23 #include "ui/views/controls/button/custom_button.h" | 23 #include "ui/views/controls/button/custom_button.h" |
| 24 #include "ui/views/controls/button/image_button.h" | 24 #include "ui/views/controls/button/image_button.h" |
| 25 #include "ui/views/controls/image_view.h" |
| 25 #include "ui/views/controls/label.h" | 26 #include "ui/views/controls/label.h" |
| 26 #include "ui/views/controls/link.h" | 27 #include "ui/views/controls/link.h" |
| 27 #include "views/controls/image_view.h" | 28 #include "ui/views/controls/separator.h" |
| 28 #include "views/controls/separator.h" | |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // TODO(msw): Get color from theme/window color. | 32 // TODO(msw): Get color from theme/window color. |
| 33 const SkColor kColor = SK_ColorWHITE; | 33 const SkColor kColor = SK_ColorWHITE; |
| 34 | 34 |
| 35 const int kItemHeight = 44; | 35 const int kItemHeight = 44; |
| 36 const int kItemMarginY = 4; | 36 const int kItemMarginY = 4; |
| 37 const int kIconWidth = 38; | 37 const int kIconWidth = 38; |
| 38 const int kIconMarginX = 6; | 38 const int kIconMarginX = 6; |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 add_profile_link_ = new views::Link( | 481 add_profile_link_ = new views::Link( |
| 482 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)); | 482 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)); |
| 483 add_profile_link_->set_listener(this); | 483 add_profile_link_->set_listener(this); |
| 484 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 484 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 485 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); | 485 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); |
| 486 AddChildView(add_profile_link_); | 486 AddChildView(add_profile_link_); |
| 487 | 487 |
| 488 PreferredSizeChanged(); | 488 PreferredSizeChanged(); |
| 489 } | 489 } |
| OLD | NEW |