Chromium Code Reviews| Index: ui/app_list/views/app_list_view.h | 
| diff --git a/ui/app_list/views/app_list_view.h b/ui/app_list/views/app_list_view.h | 
| index cbdb1d895728135ba6ba8995b4aa480b4bcfaabb..12d1cab3e76b8ae97ab34aa6619fd9637bec7cc6 100644 | 
| --- a/ui/app_list/views/app_list_view.h | 
| +++ b/ui/app_list/views/app_list_view.h | 
| @@ -9,9 +9,12 @@ | 
| #include "base/callback.h" | 
| #include "base/macros.h" | 
| +#include "base/scoped_observer.h" | 
| #include "build/build_config.h" | 
| #include "ui/app_list/app_list_export.h" | 
| #include "ui/app_list/speech_ui_model_observer.h" | 
| +#include "ui/display/display_observer.h" | 
| +#include "ui/display/screen.h" | 
| #include "ui/views/bubble/bubble_dialog_delegate.h" | 
| #include "ui/views/widget/widget.h" | 
| @@ -32,7 +35,8 @@ class AppListViewTestApi; | 
| // AppListView is the top-level view and controller of app list UI. It creates | 
| // and hosts a AppsGridView and passes AppListModel to it for display. | 
| class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, | 
| - public SpeechUIModelObserver { | 
| + public SpeechUIModelObserver, | 
| + public display::DisplayObserver { | 
| public: | 
| // Does not take ownership of |delegate|. | 
| explicit AppListView(AppListViewDelegate* delegate); | 
| @@ -89,6 +93,14 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, | 
| void Layout() override; | 
| void SchedulePaintInRect(const gfx::Rect& rect) override; | 
| + void UpdateDimensions(); | 
| 
 
vadimt
2017/05/26 01:27:57
Group with the rest non-overrides; sort same way i
 
newcomer
2017/05/26 17:11:28
Done.
 
 | 
| + | 
| + // Changes the view to the peeking state or to the fullscreen state. | 
| + void ToFullscreen(); | 
| + void ToPeeking(); | 
| + | 
| + bool IsFullscreen() const; | 
| + | 
| private: | 
| friend class test::AppListViewTestApi; | 
| @@ -102,6 +114,11 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, | 
| // Initializes the widget as a bubble. | 
| void InitializeBubble(gfx::NativeView parent, int initial_apps_page); | 
| + // Handles all drag logic for the app list view. Touch and Click events are | 
| + // filtered through OnMouseEvent and OnGestureEvent before being passed to | 
| + // HandleDrag. | 
| + void HandleDrag(gfx::Point location, ui::EventType type); | 
| + | 
| // Overridden from views::BubbleDialogDelegateView: | 
| void OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, | 
| views::Widget* widget) const override; | 
| @@ -112,6 +129,10 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, | 
| bool WidgetHasHitTestMask() const override; | 
| void GetWidgetHitTestMask(gfx::Path* mask) const override; | 
| + // Overridden from ui::EventHandler | 
| + void OnMouseEvent(ui::MouseEvent* event) override; | 
| + void OnGestureEvent(ui::GestureEvent* event) override; | 
| + | 
| // Overridden from views::WidgetObserver: | 
| void OnWidgetDestroying(views::Widget* widget) override; | 
| void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; | 
| @@ -120,14 +141,39 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, | 
| void OnSpeechRecognitionStateChanged( | 
| SpeechRecognitionState new_state) override; | 
| + // Overridden from DisplayObserver: | 
| + void OnDisplayMetricsChanged(const display::Display& display, | 
| + uint32_t changed_metrics) override; | 
| + | 
| AppListViewDelegate* delegate_; // Weak. Owned by AppListService. | 
| AppListMainView* app_list_main_view_; | 
| SpeechView* speech_view_; | 
| + views::Widget* fullscreen_widget_; | 
| 
 
vadimt
2017/05/26 01:27:57
Unowned?
And a comment.
= nullptr
 
newcomer
2017/05/26 17:11:28
Done.
 
 | 
| views::View* search_box_focus_host_; // Owned by the views hierarchy. | 
| views::Widget* search_box_widget_; // Owned by the app list's widget. | 
| SearchBoxView* search_box_view_; // Owned by |search_box_widget_|. | 
| + // Owned by the app list's widget. | 
| + views::View* launcher_background_shield_ = nullptr; | 
| + // The gap between the initial gesture event and the top of the window. | 
| + int initial_drag_separation_ = 0; | 
| + // The velocity of the gesture event. | 
| + float last_fling_velocity_ = 0; | 
| + // The height of the peeking launcher, which changes based on screen | 
| + // orientation. | 
| + int default_peeking_launcher_y_ = 0; | 
| + // The DIP delta that must be exceeded for the launcher to snap to the next | 
| + // state. | 
| + int launcher_threshold_; | 
| 
 
vadimt
2017/05/26 01:27:57
Initialize.
 
newcomer
2017/05/26 17:11:28
Done.
 
 | 
| + bool is_fullscreen_launcher_ = false; | 
| + // The desktop area, not including the shelf. | 
| + gfx::Rect display_work_area_bounds_; | 
| + // The bounds of the launcher. The size should never change, only the | 
| + // position. | 
| + gfx::Rect fullscreen_widget_bounds_; | 
| + | 
| + ScopedObserver<display::Screen, display::DisplayObserver> display_observer_; | 
| // A semi-transparent white overlay that covers the app list while dialogs are | 
| // open. |