OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/frame/browser_non_client_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/profiles/avatar_menu.h" | 8 #include "chrome/browser/profiles/avatar_menu.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
11 #include "chrome/browser/profiles/profile_info_cache.h" | 11 #include "chrome/browser/profiles/profile_info_cache.h" |
12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
13 #include "chrome/browser/profiles/profiles_state.h" | 13 #include "chrome/browser/profiles/profiles_state.h" |
14 #include "chrome/browser/ui/view_ids.h" | 14 #include "chrome/browser/ui/view_ids.h" |
15 #include "chrome/browser/ui/views/frame/browser_view.h" | 15 #include "chrome/browser/ui/views/frame/browser_view.h" |
16 #include "chrome/browser/ui/views/frame/taskbar_decorator.h" | 16 #include "chrome/browser/ui/views/frame/taskbar_decorator.h" |
17 #include "chrome/browser/ui/views/profiles/avatar_label.h" | 17 #include "chrome/browser/ui/views/profiles/avatar_label.h" |
18 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" | 18 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" |
19 #include "chrome/browser/ui/views/profiles/new_avatar_button.h" | 19 #include "chrome/browser/ui/views/profiles/new_avatar_button.h" |
20 #include "components/signin/core/common/profile_management_switches.h" | 20 #include "components/signin/core/common/profile_management_switches.h" |
21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
23 #include "third_party/skia/include/core/SkColor.h" | 23 #include "third_party/skia/include/core/SkColor.h" |
24 #include "ui/base/l10n/l10n_util.h" | |
25 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
26 #include "ui/base/theme_provider.h" | 25 #include "ui/base/theme_provider.h" |
27 #include "ui/gfx/image/image.h" | 26 #include "ui/gfx/image/image.h" |
28 #include "ui/views/background.h" | 27 #include "ui/views/background.h" |
29 | 28 |
30 BrowserNonClientFrameView::BrowserNonClientFrameView(BrowserFrame* frame, | 29 BrowserNonClientFrameView::BrowserNonClientFrameView(BrowserFrame* frame, |
31 BrowserView* browser_view) | 30 BrowserView* browser_view) |
32 : frame_(frame), | 31 : frame_(frame), |
33 browser_view_(browser_view), | 32 browser_view_(browser_view), |
34 avatar_button_(NULL), | 33 avatar_button_(NULL), |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON); | 154 new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON); |
156 AddChildView(new_avatar_button_); | 155 AddChildView(new_avatar_button_); |
157 frame_->GetRootView()->Layout(); | 156 frame_->GetRootView()->Layout(); |
158 } | 157 } |
159 } else if (new_avatar_button_) { | 158 } else if (new_avatar_button_) { |
160 delete new_avatar_button_; | 159 delete new_avatar_button_; |
161 new_avatar_button_ = NULL; | 160 new_avatar_button_ = NULL; |
162 frame_->GetRootView()->Layout(); | 161 frame_->GetRootView()->Layout(); |
163 } | 162 } |
164 } | 163 } |
OLD | NEW |