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

Side by Side Diff: ui/app_list/views/start_page_view.h

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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
6 #define UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 18 matching lines...) Expand all
29 void Reset(); 29 void Reset();
30 30
31 void UpdateForTesting(); 31 void UpdateForTesting();
32 32
33 const std::vector<SearchResultTileItemView*>& tile_views() const; 33 const std::vector<SearchResultTileItemView*>& tile_views() const;
34 TileItemView* all_apps_button() const; 34 TileItemView* all_apps_button() const;
35 35
36 // Called when the start page view is displayed. 36 // Called when the start page view is displayed.
37 void OnShow(); 37 void OnShow();
38 38
39 // Called when the start page view is hidden (while the app list is still
40 // open).
41 void OnHide();
42
43 // Overridden from views::View: 39 // Overridden from views::View:
44 void Layout() override; 40 void Layout() override;
45 bool OnKeyPressed(const ui::KeyEvent& event) override; 41 bool OnKeyPressed(const ui::KeyEvent& event) override;
46 42
43 bool OnMousePressed(const ui::MouseEvent& event) override;
44 bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
45 void OnGestureEvent(ui::GestureEvent* event) override;
46 void OnScrollEvent(ui::ScrollEvent* event) override;
47
47 // Returns search box bounds to use when the start page is active. 48 // Returns search box bounds to use when the start page is active.
48 gfx::Rect GetSearchBoxBounds() const; 49 gfx::Rect GetSearchBoxBounds() const;
49 50
50 // Updates whether the custom page clickzone is visible.
51 void UpdateCustomPageClickzoneVisibility();
52
53 private: 51 private:
54 class StartPageTilesContainer; 52 class StartPageTilesContainer;
55 53
56 void InitInstantContainer(); 54 void InitInstantContainer();
55 void MaybeOpenCustomLauncherPage();
57 56
58 TileItemView* GetTileItemView(size_t index); 57 TileItemView* GetTileItemView(size_t index);
59 58
60 // The parent view of ContentsView which is the parent of this view. 59 // The parent view of ContentsView which is the parent of this view.
61 AppListMainView* app_list_main_view_; 60 AppListMainView* app_list_main_view_;
62 61
63 AppListViewDelegate* view_delegate_; // Owned by AppListView. 62 AppListViewDelegate* view_delegate_; // Owned by AppListView.
64 63
65 views::View* search_box_spacer_view_; // Owned by views hierarchy. 64 views::View* search_box_spacer_view_; // Owned by views hierarchy.
66 views::View* instant_container_; // Owned by views hierarchy. 65 views::View* instant_container_; // Owned by views hierarchy.
67 StartPageTilesContainer* tiles_container_; // Owned by views hierarchy. 66 StartPageTilesContainer* tiles_container_; // Owned by views hierarchy.
68 67
69 DISALLOW_COPY_AND_ASSIGN(StartPageView); 68 DISALLOW_COPY_AND_ASSIGN(StartPageView);
70 }; 69 };
71 70
72 } // namespace app_list 71 } // namespace app_list
73 72
74 #endif // UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ 73 #endif // UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698