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

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

Issue 2802903003: Implementation of a full screen app list and re-alphabetized switches (Closed)
Patch Set: Addressed the issues that were brought up. Created 3 years, 8 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 #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 17 matching lines...) Expand all
28 namespace test { 28 namespace test {
29 class AppListViewTestApi; 29 class AppListViewTestApi;
30 } 30 }
31 31
32 // AppListView is the top-level view and controller of app list UI. It creates 32 // AppListView is the top-level view and controller of app list UI. It creates
33 // and hosts a AppsGridView and passes AppListModel to it for display. 33 // and hosts a AppsGridView and passes AppListModel to it for display.
34 class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, 34 class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView,
35 public SpeechUIModelObserver { 35 public SpeechUIModelObserver {
36 public: 36 public:
37 // Does not take ownership of |delegate|. 37 // Does not take ownership of |delegate|.
38 explicit AppListView(AppListViewDelegate* delegate); 38 explicit AppListView(AppListViewDelegate *delegate);
39 ~AppListView() override; 39 ~AppListView() override;
40 40
41 // Initializes the widget. 41 // Initializes the widget with a frame or a frameless view depending on
42 // command line switches
43 void Initialize(gfx::NativeView parent, int initial_apps_page,
44 const gfx::Point &center_of_display_window,
vadimt 2017/04/13 21:48:34 Please fix indentation... actually, here and every
newcomer 2017/04/18 21:12:34 Done. Thanks for showing me git cl format !!
45 const gfx::Rect display_work_area_bounds);
46
47 // Initializes the widget as a bubble. Integrated into InitializeWindow but
48 // kept around for its usage in app_list_presenter_delegate_mus.cc
42 void InitAsBubble(gfx::NativeView parent, int initial_apps_page); 49 void InitAsBubble(gfx::NativeView parent, int initial_apps_page);
43 50
44 void SetBubbleArrow(views::BubbleBorder::Arrow arrow); 51 void SetBubbleArrow(views::BubbleBorder::Arrow arrow);
45 52
46 void SetAnchorPoint(const gfx::Point& anchor_point); 53 void SetAnchorPoint(const gfx::Point& anchor_point);
47 54
48 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop 55 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop
49 // operations outside the application list. This has to be called after 56 // operations outside the application list. This has to be called after
50 // InitAsBubble was called since the app list object needs to exist so that 57 // InitAsBubble was called since the app list object needs to exist so that
51 // it can set the host. 58 // it can set the host.
(...skipping 10 matching lines...) Expand all
62 69
63 // Enables/disables a semi-transparent overlay over the app list (good for 70 // Enables/disables a semi-transparent overlay over the app list (good for
64 // hiding the app list when a modal dialog is being shown). 71 // hiding the app list when a modal dialog is being shown).
65 void SetAppListOverlayVisible(bool visible); 72 void SetAppListOverlayVisible(bool visible);
66 73
67 views::Widget* search_box_widget() const { return search_box_widget_; } 74 views::Widget* search_box_widget() const { return search_box_widget_; }
68 75
69 // Overridden from views::View: 76 // Overridden from views::View:
70 gfx::Size GetPreferredSize() const override; 77 gfx::Size GetPreferredSize() const override;
71 void OnPaint(gfx::Canvas* canvas) override; 78 void OnPaint(gfx::Canvas* canvas) override;
79 const char* GetClassName() const override;
72 80
73 // WidgetDelegate overrides: 81 // WidgetDelegate overrides:
74 bool ShouldHandleSystemCommands() const override; 82 bool ShouldHandleSystemCommands() const override;
75 bool ShouldDescendIntoChildForEventHandling( 83 bool ShouldDescendIntoChildForEventHandling(
76 gfx::NativeView child, 84 gfx::NativeView child,
77 const gfx::Point& location) override; 85 const gfx::Point& location) override;
78 86
79 AppListMainView* app_list_main_view() { return app_list_main_view_; } 87 AppListMainView* app_list_main_view() { return app_list_main_view_; }
80 88
81 // Gets the PaginationModel owned by this view's apps grid. 89 // Gets the PaginationModel owned by this view's apps grid.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 136
129 // For UMA and testing. If non-null, triggered when the app list is painted. 137 // For UMA and testing. If non-null, triggered when the app list is painted.
130 base::Closure next_paint_callback_; 138 base::Closure next_paint_callback_;
131 139
132 DISALLOW_COPY_AND_ASSIGN(AppListView); 140 DISALLOW_COPY_AND_ASSIGN(AppListView);
133 }; 141 };
134 142
135 } // namespace app_list 143 } // namespace app_list
136 144
137 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 145 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698