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

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: Responded to outstanding comments from sadrul@ Created 7 years, 1 month 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 8c09f98eca3ae2e39a0a10d38c2a07ce850bf467..82c9bb5f42e5bcb579b8199058e8bdbe584dd458 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -412,7 +412,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) {
@@ -1872,6 +1872,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, InfoBarContainer::Delegate overrides:
SkColor BrowserView::GetInfoBarSeparatorColor() const {
@@ -2560,7 +2575,9 @@ void BrowserView::ShowPasswordGenerationBubble(
}
void BrowserView::OverscrollUpdate(int delta_y) {
- if (scroll_end_effect_controller_)
+ // TODO(308164): Remove the check for fullscreen & maximized once the
+ // related cases have been fixed in the effect.
+ if (scroll_end_effect_controller_ && !IsFullscreen() && !IsMaximized())
scroll_end_effect_controller_->OverscrollUpdate(delta_y);
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/browser_view_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698