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.h" | 5 #include "chrome/browser/ui/views/avatar_menu.h" |
6 | 6 |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // deleted while we're running we won't prematurely delete the menu. | 190 // deleted while we're running we won't prematurely delete the menu. |
191 // TODO(sky): fix this, the menu should really take ownership of the menu | 191 // TODO(sky): fix this, the menu should really take ownership of the menu |
192 // (57890). | 192 // (57890). |
193 scoped_refptr<AvatarMenu> dont_delete_while_running(this); | 193 scoped_refptr<AvatarMenu> dont_delete_while_running(this); |
194 gfx::Point screen_loc; | 194 gfx::Point screen_loc; |
195 views::View::ConvertPointToScreen(host, &screen_loc); | 195 views::View::ConvertPointToScreen(host, &screen_loc); |
196 gfx::Rect bounds(screen_loc, host->size()); | 196 gfx::Rect bounds(screen_loc, host->size()); |
197 root_->RunMenuAt(host->GetWidget(), host, bounds, | 197 root_->RunMenuAt(host->GetWidget(), host, bounds, |
198 views::MenuItemView::TOPLEFT, true); | 198 views::MenuItemView::TOPLEFT, true); |
199 } | 199 } |
OLD | NEW |