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

Side by Side Diff: ui/app_list/views/contents_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/app_list/views/contents_view.h" 5 #include "ui/app_list/views/contents_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 if (!start_page_view_) 523 if (!start_page_view_)
524 return; 524 return;
525 525
526 if (new_selected == GetPageIndexForState(AppListModel::STATE_START)) { 526 if (new_selected == GetPageIndexForState(AppListModel::STATE_START)) {
527 start_page_view_->OnShow(); 527 start_page_view_->OnShow();
528 // Show or hide the custom page view, based on whether it is enabled. 528 // Show or hide the custom page view, based on whether it is enabled.
529 if (custom_page_view_) { 529 if (custom_page_view_) {
530 custom_page_view_->SetVisible( 530 custom_page_view_->SetVisible(
531 app_list_main_view_->model()->custom_launcher_page_enabled()); 531 app_list_main_view_->model()->custom_launcher_page_enabled());
532 } 532 }
533 } else {
534 start_page_view_->OnHide();
535 } 533 }
536 } 534 }
537 535
538 void ContentsView::TransitionStarted() { 536 void ContentsView::TransitionStarted() {
539 } 537 }
540 538
541 void ContentsView::TransitionChanged() { 539 void ContentsView::TransitionChanged() {
542 UpdatePageBounds(); 540 UpdatePageBounds();
543 } 541 }
544 542
545 } // namespace app_list 543 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698