| 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/avatar_menu_button.h" | 5 #include "chrome/browser/ui/views/avatar_menu_button.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/avatar_menu_model.h" | 7 #include "chrome/browser/profiles/avatar_menu_model.h" |
| 8 #include "chrome/browser/profiles/profile_metrics.h" | 8 #include "chrome/browser/profiles/profile_metrics.h" |
| 9 #include "chrome/browser/profiles/profile_info_util.h" | 9 #include "chrome/browser/profiles/profile_info_util.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" | 11 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" |
| 12 #include "chrome/browser/ui/views/frame/browser_view.h" | 12 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 13 #include "chrome/browser/ui/views/window.h" | 13 #include "chrome/browser/ui/views/window.h" |
| 14 #include "ui/gfx/canvas_skia.h" | 14 #include "ui/gfx/canvas.h" |
| 15 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
| 16 | 16 |
| 17 | 17 |
| 18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
| 19 #include <shobjidl.h> | 19 #include <shobjidl.h> |
| 20 #include "base/win/scoped_comptr.h" | 20 #include "base/win/scoped_comptr.h" |
| 21 #include "base/win/windows_version.h" | 21 #include "base/win/windows_version.h" |
| 22 #include "skia/ext/image_operations.h" | 22 #include "skia/ext/image_operations.h" |
| 23 #include "ui/gfx/icon_util.h" | 23 #include "ui/gfx/icon_util.h" |
| 24 #endif | 24 #endif |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 views::View::ConvertPointToScreen(this, &origin); | 155 views::View::ConvertPointToScreen(this, &origin); |
| 156 gfx::Rect bounds(origin, size()); | 156 gfx::Rect bounds(origin, size()); |
| 157 | 157 |
| 158 AvatarMenuBubbleView* bubble = new AvatarMenuBubbleView(this, | 158 AvatarMenuBubbleView* bubble = new AvatarMenuBubbleView(this, |
| 159 views::BubbleBorder::TOP_LEFT, bounds, browser_); | 159 views::BubbleBorder::TOP_LEFT, bounds, browser_); |
| 160 browser::CreateViewsBubble(bubble); | 160 browser::CreateViewsBubble(bubble); |
| 161 bubble->Show(); | 161 bubble->Show(); |
| 162 | 162 |
| 163 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); | 163 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
| 164 } | 164 } |
| OLD | NEW |