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

Unified Diff: ui/app_list/views/app_list_view.cc

Issue 913133007: Allow scroll events to open custom launcher pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: host coordinates Created 5 years, 10 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: ui/app_list/views/app_list_view.cc
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index f2083749f9ab8f7652ca6e3123777a8f1a78193e..00f83a911c77f27fd908f933d61606939168209f 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -338,6 +338,19 @@ bool AppListView::ShouldHandleSystemCommands() const {
return true;
}
+bool AppListView::ShouldDescendIntoChildForEventHandling(
+ gfx::NativeView child,
+ const gfx::Point& location) {
+ // While on the start page, don't descend into the custom launcher page. Since
+ // the only valid action is to open it.
+ ContentsView* contents_view = app_list_main_view_->contents_view();
+ if (contents_view->GetActiveState() == AppListModel::STATE_START)
+ return !contents_view->GetCustomPageCollapsedBounds().Contains(location);
+
+ return views::BubbleDelegateView::ShouldDescendIntoChildForEventHandling(
+ child, location);
+}
+
void AppListView::Prerender() {
app_list_main_view_->Prerender();
}
@@ -434,8 +447,6 @@ void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) {
void AppListView::InitChildWidgets() {
DCHECK(search_box_view_);
- app_list_main_view_->InitWidgets();
-
// Create the search box widget.
views::Widget::InitParams search_box_widget_params(
views::Widget::InitParams::TYPE_CONTROL);

Powered by Google App Engine
This is Rietveld 408576698