Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2515 // Do nothing. | 2515 // Do nothing. |
| 2516 break; | 2516 break; |
| 2517 } | 2517 } |
| 2518 #endif | 2518 #endif |
| 2519 } | 2519 } |
| 2520 | 2520 |
| 2521 void BrowserView::ShowAvatarBubbleFromAvatarButton( | 2521 void BrowserView::ShowAvatarBubbleFromAvatarButton( |
| 2522 AvatarBubbleMode mode, | 2522 AvatarBubbleMode mode, |
| 2523 const signin::ManageAccountsParams& manage_accounts_params) { | 2523 const signin::ManageAccountsParams& manage_accounts_params) { |
| 2524 #if defined(FRAME_AVATAR_BUTTON) | 2524 #if defined(FRAME_AVATAR_BUTTON) |
| 2525 // Do not show avatar bubble if there is no avatar menu button. | |
|
msw
2015/09/14 17:12:04
Instead of a no-op, just use the chrome menu butto
| |
| 2526 if (!frame_->GetNewAvatarMenuButton()) | |
| 2527 return; | |
| 2525 profiles::BubbleViewMode bubble_view_mode; | 2528 profiles::BubbleViewMode bubble_view_mode; |
| 2526 profiles::TutorialMode tutorial_mode; | 2529 profiles::TutorialMode tutorial_mode; |
| 2527 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, | 2530 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, |
| 2528 &tutorial_mode); | 2531 &tutorial_mode); |
| 2529 ProfileChooserView::ShowBubble( | 2532 ProfileChooserView::ShowBubble( |
| 2530 bubble_view_mode, tutorial_mode, manage_accounts_params, | 2533 bubble_view_mode, tutorial_mode, manage_accounts_params, |
| 2531 frame_->GetNewAvatarMenuButton(), views::BubbleBorder::TOP_RIGHT, | 2534 frame_->GetNewAvatarMenuButton(), views::BubbleBorder::TOP_RIGHT, |
| 2532 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, browser()); | 2535 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, browser()); |
| 2533 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); | 2536 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
| 2534 #else | 2537 #else |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2635 return immersive_mode_controller()->IsEnabled(); | 2638 return immersive_mode_controller()->IsEnabled(); |
| 2636 } | 2639 } |
| 2637 | 2640 |
| 2638 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2641 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
| 2639 return GetWidget(); | 2642 return GetWidget(); |
| 2640 } | 2643 } |
| 2641 | 2644 |
| 2642 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2645 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
| 2643 return top_container_->GetBoundsInScreen(); | 2646 return top_container_->GetBoundsInScreen(); |
| 2644 } | 2647 } |
| OLD | NEW |