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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 22265009: Implement initial version of scroll end effect Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed another compile issue :-/ Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index b12feeab8d3c612914e292c03999b541f47f3329..8a7069553c9a83c3fc12010a017feb8d5e6b0a78 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -414,7 +414,7 @@ BrowserView::BrowserView()
force_location_bar_focus_(false),
immersive_mode_controller_(chrome::CreateImmersiveModeController()),
#if defined(OS_CHROMEOS)
- scroll_end_effect_controller_(ScrollEndEffectController::Create()),
+ scroll_end_effect_controller_(ScrollEndEffectController::Create(this)),
#endif
color_change_listener_(this),
activate_modal_dialog_factory_(this) {
@@ -1848,6 +1848,21 @@ void BrowserView::OnOmniboxPopupShownOrHidden() {
}
///////////////////////////////////////////////////////////////////////////////
+// BrowserView, ScrollEndEffectControllerDelegate overrides:
+
+ContentsContainer* BrowserView::GetContentsContainer() {
+ return contents_container_;
+}
+
+gfx::Rect BrowserView::GetFrameBounds() {
+ return frame_->GetWindowBoundsInScreen();
+}
+
+void BrowserView::SetFrameBounds(gfx::Rect bounds) {
+ frame_->SetBounds(bounds);
+}
+
+///////////////////////////////////////////////////////////////////////////////
// BrowserView, ImmersiveModeController::Delegate overrides:
BookmarkBarView* BrowserView::GetBookmarkBar() {
@@ -2576,7 +2591,9 @@ void BrowserView::ShowPasswordGenerationBubble(
}
void BrowserView::OverscrollUpdate(int delta_y) {
- if (scroll_end_effect_controller_)
+ // TODO(rharrison): Remove the check for fullscreen & maximized once the
+ // related cases have been fixed in the effect.
sadrul 2013/10/25 18:28:25 Reference the crbug here.
rharrison 2013/11/18 21:52:26 Done.
+ if (scroll_end_effect_controller_ && !IsFullscreen() && !IsMaximized())
scroll_end_effect_controller_->OverscrollUpdate(delta_y);
}

Powered by Google App Engine
This is Rietveld 408576698