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 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2424 manage_accounts_params, anchor_view, arrow, alignment, browser()); | 2424 manage_accounts_params, anchor_view, arrow, alignment, browser()); |
2425 } else { | 2425 } else { |
2426 gfx::Point origin; | 2426 gfx::Point origin; |
2427 views::View::ConvertPointToScreen(anchor_view, &origin); | 2427 views::View::ConvertPointToScreen(anchor_view, &origin); |
2428 gfx::Rect bounds(origin, anchor_view->size()); | 2428 gfx::Rect bounds(origin, anchor_view->size()); |
2429 views::BubbleBorder::ArrowPaintType arrow_paint_type = | 2429 views::BubbleBorder::ArrowPaintType arrow_paint_type = |
2430 ShouldHideUIForFullscreen() ? views::BubbleBorder::PAINT_TRANSPARENT : | 2430 ShouldHideUIForFullscreen() ? views::BubbleBorder::PAINT_TRANSPARENT : |
2431 views::BubbleBorder::PAINT_NORMAL; | 2431 views::BubbleBorder::PAINT_NORMAL; |
2432 AvatarMenuBubbleView::ShowBubble(anchor_view, arrow, arrow_paint_type, | 2432 AvatarMenuBubbleView::ShowBubble(anchor_view, arrow, arrow_paint_type, |
2433 alignment, bounds, browser()); | 2433 alignment, bounds, browser()); |
2434 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); | |
2435 } | 2434 } |
| 2435 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
2436 } | 2436 } |
2437 | 2437 |
2438 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { | 2438 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { |
2439 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED || | 2439 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED || |
2440 !bookmark_bar_view_.get() || !bookmark_bar_view_->IsDetached()) { | 2440 !bookmark_bar_view_.get() || !bookmark_bar_view_->IsDetached()) { |
2441 return 0; | 2441 return 0; |
2442 } | 2442 } |
2443 // Don't use bookmark_bar_view_->height() which won't be the final height if | 2443 // Don't use bookmark_bar_view_->height() which won't be the final height if |
2444 // the bookmark bar is animating. | 2444 // the bookmark bar is animating. |
2445 return chrome::kNTPBookmarkBarHeight - | 2445 return chrome::kNTPBookmarkBarHeight - |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2513 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2513 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2514 gfx::Point icon_bottom( | 2514 gfx::Point icon_bottom( |
2515 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2515 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2516 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2516 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2517 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2517 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2518 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2518 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2519 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2519 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2520 } | 2520 } |
2521 return top_arrow_height; | 2521 return top_arrow_height; |
2522 } | 2522 } |
OLD | NEW |