Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: chrome/browser/ui/views/avatar_menu_button.cc

Issue 8604012: move chromeos bubble setup code to window.cc (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update with content settings bubble also. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/views/window.h"
11 #include "ui/gfx/canvas_skia.h" 12 #include "ui/gfx/canvas_skia.h"
12 #include "ui/views/widget/widget.h" 13 #include "ui/views/widget/widget.h"
13 14
14 15
15 #if defined(OS_WIN) 16 #if defined(OS_WIN)
16 #include <shobjidl.h> 17 #include <shobjidl.h>
17 #include "base/win/scoped_comptr.h" 18 #include "base/win/scoped_comptr.h"
18 #include "base/win/windows_version.h" 19 #include "base/win/windows_version.h"
19 #include "skia/ext/image_operations.h" 20 #include "skia/ext/image_operations.h"
20 #include "ui/gfx/icon_util.h" 21 #include "ui/gfx/icon_util.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void AvatarMenuButton::ShowAvatarBubble() { 147 void AvatarMenuButton::ShowAvatarBubble() {
147 if (!has_menu_) 148 if (!has_menu_)
148 return; 149 return;
149 150
150 gfx::Point origin; 151 gfx::Point origin;
151 views::View::ConvertPointToScreen(this, &origin); 152 views::View::ConvertPointToScreen(this, &origin);
152 gfx::Rect bounds(origin, size()); 153 gfx::Rect bounds(origin, size());
153 154
154 AvatarMenuBubbleView* bubble = new AvatarMenuBubbleView(this, 155 AvatarMenuBubbleView* bubble = new AvatarMenuBubbleView(this,
155 views::BubbleBorder::TOP_LEFT, bounds, browser_); 156 views::BubbleBorder::TOP_LEFT, bounds, browser_);
156 views::BubbleDelegateView::CreateBubble(bubble); 157 browser::CreateViewsBubble(bubble);
157 bubble->Show(); 158 bubble->Show();
158 159
159 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); 160 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE);
160 } 161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698