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

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

Issue 645223003: Change overscroll functions to pass floats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
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 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 gfx::Rect bounds(origin, anchor_view->size()); 2431 gfx::Rect bounds(origin, anchor_view->size());
2432 views::BubbleBorder::ArrowPaintType arrow_paint_type = 2432 views::BubbleBorder::ArrowPaintType arrow_paint_type =
2433 ShouldHideUIForFullscreen() ? views::BubbleBorder::PAINT_TRANSPARENT : 2433 ShouldHideUIForFullscreen() ? views::BubbleBorder::PAINT_TRANSPARENT :
2434 views::BubbleBorder::PAINT_NORMAL; 2434 views::BubbleBorder::PAINT_NORMAL;
2435 AvatarMenuBubbleView::ShowBubble(anchor_view, arrow, arrow_paint_type, 2435 AvatarMenuBubbleView::ShowBubble(anchor_view, arrow, arrow_paint_type,
2436 alignment, bounds, browser()); 2436 alignment, bounds, browser());
2437 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); 2437 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE);
2438 } 2438 }
2439 } 2439 }
2440 2440
2441 void BrowserView::OverscrollUpdate(int delta_y) { 2441 void BrowserView::OverscrollUpdate(float delta_y) {
2442 if (scroll_end_effect_controller_) 2442 if (scroll_end_effect_controller_)
2443 scroll_end_effect_controller_->OverscrollUpdate(delta_y); 2443 scroll_end_effect_controller_->OverscrollUpdate(delta_y);
2444 } 2444 }
2445 2445
2446 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { 2446 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() {
2447 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED || 2447 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED ||
2448 !bookmark_bar_view_.get() || !bookmark_bar_view_->IsDetached()) { 2448 !bookmark_bar_view_.get() || !bookmark_bar_view_->IsDetached()) {
2449 return 0; 2449 return 0;
2450 } 2450 }
2451 // Don't use bookmark_bar_view_->height() which won't be the final height if 2451 // Don't use bookmark_bar_view_->height() which won't be the final height if
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2521 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2522 gfx::Point icon_bottom( 2522 gfx::Point icon_bottom(
2523 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2523 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2524 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2524 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2525 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2525 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2526 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2526 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2527 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2527 top_arrow_height = infobar_top.y() - icon_bottom.y();
2528 } 2528 }
2529 return top_arrow_height; 2529 return top_arrow_height;
2530 } 2530 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698