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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 8356028: Add shortcut to show avatar menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 9 years, 2 months 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 30 matching lines...) Expand all
41 #include "chrome/browser/themes/theme_service.h" 41 #include "chrome/browser/themes/theme_service.h"
42 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" 42 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
43 #include "chrome/browser/ui/browser.h" 43 #include "chrome/browser/ui/browser.h"
44 #include "chrome/browser/ui/browser_dialogs.h" 44 #include "chrome/browser/ui/browser_dialogs.h"
45 #include "chrome/browser/ui/browser_list.h" 45 #include "chrome/browser/ui/browser_list.h"
46 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 46 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
47 #include "chrome/browser/ui/tabs/tab_menu_model.h" 47 #include "chrome/browser/ui/tabs/tab_menu_model.h"
48 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" 48 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
49 #include "chrome/browser/ui/view_ids.h" 49 #include "chrome/browser/ui/view_ids.h"
50 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" 50 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
51 #include "chrome/browser/ui/views/avatar_menu_button.h"
51 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 52 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
52 #include "chrome/browser/ui/views/browser_dialogs.h" 53 #include "chrome/browser/ui/views/browser_dialogs.h"
53 #include "chrome/browser/ui/views/default_search_view.h" 54 #include "chrome/browser/ui/views/default_search_view.h"
54 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h" 55 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
55 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 56 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
56 #include "chrome/browser/ui/views/frame/contents_container.h" 57 #include "chrome/browser/ui/views/frame/contents_container.h"
57 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h" 58 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
58 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" 59 #include "chrome/browser/ui/views/infobars/infobar_container_view.h"
59 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 60 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
60 #include "chrome/browser/ui/views/page_info_window.h" 61 #include "chrome/browser/ui/views/page_info_window.h"
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); 2600 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin);
2600 gfx::Rect bounds; 2601 gfx::Rect bounds;
2601 bounds.set_origin(origin); 2602 bounds.set_origin(origin);
2602 2603
2603 AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_.get()); 2604 AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_.get());
2604 // Bubble::Show() takes ownership of the view. 2605 // Bubble::Show() takes ownership of the view.
2605 Bubble::Show(this->GetWidget(), bounds, 2606 Bubble::Show(this->GetWidget(), bounds,
2606 views::BubbleBorder::TOP_RIGHT, 2607 views::BubbleBorder::TOP_RIGHT,
2607 bubble_view, bubble_view); 2608 bubble_view, bubble_view);
2608 } 2609 }
2610
2611 void BrowserView::ShowAvatarBubbleFromAvatarButton() {
2612 AvatarMenuButton* button = frame_->GetAvatarMenuButton();
2613 if (button)
2614 button->ShowAvatarBubble();
2615 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698