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_button.h" | 5 #include "chrome/browser/ui/views/avatar_menu_button.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile_metrics.h" | 7 #include "chrome/browser/profiles/profile_metrics.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" | 9 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
11 #include "ui/gfx/canvas_skia.h" | 11 #include "ui/gfx/canvas_skia.h" |
12 #include "views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
13 | 13 |
14 | 14 |
15 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
16 #include <shobjidl.h> | 16 #include <shobjidl.h> |
17 #include "base/win/scoped_comptr.h" | 17 #include "base/win/scoped_comptr.h" |
18 #include "base/win/windows_version.h" | 18 #include "base/win/windows_version.h" |
19 #include "skia/ext/image_operations.h" | 19 #include "skia/ext/image_operations.h" |
20 #include "ui/gfx/icon_util.h" | 20 #include "ui/gfx/icon_util.h" |
21 #endif | 21 #endif |
22 | 22 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bubble_view, bubble_view); | 163 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bubble_view, bubble_view); |
164 bubble_->AddObserver(this); | 164 bubble_->AddObserver(this); |
165 | 165 |
166 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); | 166 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
167 } | 167 } |
168 | 168 |
169 void AvatarMenuButton::OnBubbleClosing() { | 169 void AvatarMenuButton::OnBubbleClosing() { |
170 bubble_->RemoveObserver(this); | 170 bubble_->RemoveObserver(this); |
171 bubble_ = NULL; | 171 bubble_ = NULL; |
172 } | 172 } |
OLD | NEW |