Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 105 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 106 void Layout() override; | 106 void Layout() override; |
| 107 void SchedulePaintInRect(const gfx::Rect& rect) override; | 107 void SchedulePaintInRect(const gfx::Rect& rect) override; |
| 108 | 108 |
| 109 // Changes the app list state. | 109 // Changes the app list state. |
| 110 void SetState(AppListState new_state); | 110 void SetState(AppListState new_state); |
| 111 | 111 |
| 112 bool is_fullscreen() const { return app_list_state_ == FULLSCREEN; } | 112 bool is_fullscreen() const { return app_list_state_ == FULLSCREEN; } |
| 113 AppListState app_list_state() const { return app_list_state_; } | 113 AppListState app_list_state() const { return app_list_state_; } |
| 114 | 114 |
| 115 // Sets the switch that is used to check if the fullscreen app list is | |
| 116 // enabled. | |
| 117 void IsFullscreenAppListEnabled(); | |
| 118 | |
| 115 private: | 119 private: |
| 116 friend class test::AppListViewTestApi; | 120 friend class test::AppListViewTestApi; |
| 117 | 121 |
| 118 void InitContents(gfx::NativeView parent, int initial_apps_page); | 122 void InitContents(gfx::NativeView parent, int initial_apps_page); |
| 119 | 123 |
| 120 void InitChildWidgets(); | 124 void InitChildWidgets(); |
| 121 | 125 |
| 122 // Initializes the widget for fullscreen mode. | 126 // Initializes the widget for fullscreen mode. |
| 123 void InitializeFullscreen(gfx::NativeView parent, int initial_apps_page); | 127 void InitializeFullscreen(gfx::NativeView parent, int initial_apps_page); |
| 124 | 128 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 views::View* search_box_focus_host_; // Owned by the views hierarchy. | 175 views::View* search_box_focus_host_; // Owned by the views hierarchy. |
| 172 views::Widget* search_box_widget_; // Owned by the app list's widget. | 176 views::Widget* search_box_widget_; // Owned by the app list's widget. |
| 173 SearchBoxView* search_box_view_; // Owned by |search_box_widget_|. | 177 SearchBoxView* search_box_view_; // Owned by |search_box_widget_|. |
| 174 // Owned by the app list's widget. Null if the fullscreen app list is not | 178 // Owned by the app list's widget. Null if the fullscreen app list is not |
| 175 // enabled. | 179 // enabled. |
| 176 views::View* app_list_background_shield_ = nullptr; | 180 views::View* app_list_background_shield_ = nullptr; |
| 177 // The gap between the initial gesture event and the top of the window. | 181 // The gap between the initial gesture event and the top of the window. |
| 178 gfx::Point initial_drag_point_; | 182 gfx::Point initial_drag_point_; |
| 179 // The velocity of the gesture event. | 183 // The velocity of the gesture event. |
| 180 float last_fling_velocity_ = 0; | 184 float last_fling_velocity_ = 0; |
| 185 // The switch that is checked to determine if the fullscreen app list feature | |
|
vadimt
2017/06/12 23:29:35
// Whether the fullscreen app list feature is enab
newcomer
2017/06/12 23:48:17
Done.
| |
| 186 // is enabled. | |
| 187 bool is_fullscreen_app_list_enabled_ = false; | |
|
vadimt
2017/06/12 23:29:35
const.
newcomer
2017/06/12 23:48:17
Done.
| |
| 181 // The state of the app list, controlled via SetState(). | 188 // The state of the app list, controlled via SetState(). |
| 182 AppListState app_list_state_; | 189 AppListState app_list_state_; |
| 183 | 190 |
| 184 // An observer that notifies AppListView when the display has changed. | 191 // An observer that notifies AppListView when the display has changed. |
| 185 ScopedObserver<display::Screen, display::DisplayObserver> display_observer_; | 192 ScopedObserver<display::Screen, display::DisplayObserver> display_observer_; |
| 186 | 193 |
| 187 // A semi-transparent white overlay that covers the app list while dialogs are | 194 // A semi-transparent white overlay that covers the app list while dialogs are |
| 188 // open. | 195 // open. |
| 189 views::View* overlay_view_; | 196 views::View* overlay_view_; |
| 190 | 197 |
| 191 std::unique_ptr<HideViewAnimationObserver> animation_observer_; | 198 std::unique_ptr<HideViewAnimationObserver> animation_observer_; |
| 192 | 199 |
| 193 // For UMA and testing. If non-null, triggered when the app list is painted. | 200 // For UMA and testing. If non-null, triggered when the app list is painted. |
| 194 base::Closure next_paint_callback_; | 201 base::Closure next_paint_callback_; |
| 195 | 202 |
| 196 DISALLOW_COPY_AND_ASSIGN(AppListView); | 203 DISALLOW_COPY_AND_ASSIGN(AppListView); |
| 197 }; | 204 }; |
| 198 | 205 |
| 199 } // namespace app_list | 206 } // namespace app_list |
| 200 | 207 |
| 201 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 208 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| OLD | NEW |