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" | |
22 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
23 #include "third_party/skia/include/core/SkColor.h" | 22 #include "third_party/skia/include/core/SkColor.h" |
24 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/base/theme_provider.h" | 24 #include "ui/base/theme_provider.h" |
26 #include "ui/gfx/image/image.h" | 25 #include "ui/gfx/image/image.h" |
27 #include "ui/views/background.h" | 26 #include "ui/views/background.h" |
28 | 27 |
29 BrowserNonClientFrameView::BrowserNonClientFrameView(BrowserFrame* frame, | 28 BrowserNonClientFrameView::BrowserNonClientFrameView(BrowserFrame* frame, |
30 BrowserView* browser_view) | 29 BrowserView* browser_view) |
31 : frame_(frame), | 30 : frame_(frame), |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON); | 153 new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON); |
155 AddChildView(new_avatar_button_); | 154 AddChildView(new_avatar_button_); |
156 frame_->GetRootView()->Layout(); | 155 frame_->GetRootView()->Layout(); |
157 } | 156 } |
158 } else if (new_avatar_button_) { | 157 } else if (new_avatar_button_) { |
159 delete new_avatar_button_; | 158 delete new_avatar_button_; |
160 new_avatar_button_ = NULL; | 159 new_avatar_button_ = NULL; |
161 frame_->GetRootView()->Layout(); | 160 frame_->GetRootView()->Layout(); |
162 } | 161 } |
163 } | 162 } |
OLD | NEW |