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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 void SetAppListOverlayVisible(bool visible); | 96 void SetAppListOverlayVisible(bool visible); |
97 | 97 |
98 // Returns true if the app list should be centered and in landscape mode. | 98 // Returns true if the app list should be centered and in landscape mode. |
99 bool ShouldCenterWindow() const; | 99 bool ShouldCenterWindow() const; |
100 | 100 |
101 views::Widget* search_box_widget() const { return search_box_widget_; } | 101 views::Widget* search_box_widget() const { return search_box_widget_; } |
102 | 102 |
103 // Overridden from views::View: | 103 // Overridden from views::View: |
104 gfx::Size GetPreferredSize() const override; | 104 gfx::Size GetPreferredSize() const override; |
105 void OnPaint(gfx::Canvas* canvas) override; | 105 void OnPaint(gfx::Canvas* canvas) override; |
106 void OnThemeChanged() override; | |
107 | 106 |
108 // WidgetDelegate overrides: | 107 // WidgetDelegate overrides: |
109 bool ShouldHandleSystemCommands() const override; | 108 bool ShouldHandleSystemCommands() const override; |
110 bool ShouldDescendIntoChildForEventHandling( | 109 bool ShouldDescendIntoChildForEventHandling( |
111 gfx::NativeView child, | 110 gfx::NativeView child, |
112 const gfx::Point& location) override; | 111 const gfx::Point& location) override; |
113 | 112 |
114 // Overridden from AppListViewDelegateObserver: | 113 // Overridden from AppListViewDelegateObserver: |
115 void OnProfilesChanged() override; | 114 void OnProfilesChanged() override; |
116 void OnShutdown() override; | 115 void OnShutdown() override; |
117 | 116 |
118 void Prerender(); | |
119 | |
120 void SetProfileByPath(const base::FilePath& profile_path); | 117 void SetProfileByPath(const base::FilePath& profile_path); |
121 | 118 |
122 void AddObserver(AppListViewObserver* observer); | 119 void AddObserver(AppListViewObserver* observer); |
123 void RemoveObserver(AppListViewObserver* observer); | 120 void RemoveObserver(AppListViewObserver* observer); |
124 | 121 |
125 // Set a callback to be called the next time any app list paints. | |
126 void SetNextPaintCallback(const base::Closure& callback); | |
127 | |
128 #if defined(OS_WIN) | |
129 HWND GetHWND() const; | |
130 #endif | |
131 | |
132 AppListMainView* app_list_main_view() { return app_list_main_view_; } | 122 AppListMainView* app_list_main_view() { return app_list_main_view_; } |
133 | 123 |
134 // Gets the PaginationModel owned by this view's apps grid. | 124 // Gets the PaginationModel owned by this view's apps grid. |
135 PaginationModel* GetAppsPaginationModel(); | 125 PaginationModel* GetAppsPaginationModel(); |
136 | 126 |
137 // Overridden from views::View: | 127 // Overridden from views::View: |
138 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 128 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
139 void Layout() override; | 129 void Layout() override; |
140 void SchedulePaintInRect(const gfx::Rect& rect) override; | 130 void SchedulePaintInRect(const gfx::Rect& rect) override; |
141 | 131 |
142 private: | 132 private: |
143 friend class ::test::AppListViewTestApi; | 133 friend class ::test::AppListViewTestApi; |
144 | 134 |
135 // Set a callback to be called the next time any app list paints. | |
136 void SetNextPaintCallback(const base::Closure& callback); | |
tapted
2016/07/26 01:34:42
(remove - see later comment)
calamity
2016/07/26 08:38:39
Done.
| |
137 | |
145 void InitContents(gfx::NativeView parent, int initial_apps_page); | 138 void InitContents(gfx::NativeView parent, int initial_apps_page); |
146 | 139 |
147 void InitChildWidgets(); | 140 void InitChildWidgets(); |
148 | 141 |
149 void InitAsBubbleInternal(gfx::NativeView parent, | 142 void InitAsBubbleInternal(gfx::NativeView parent, |
150 int initial_apps_page, | 143 int initial_apps_page, |
151 views::BubbleBorder::Arrow arrow, | 144 views::BubbleBorder::Arrow arrow, |
152 bool border_accepts_events, | 145 bool border_accepts_events, |
153 const gfx::Vector2d& anchor_offset); | 146 const gfx::Vector2d& anchor_offset); |
154 | 147 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 | 182 |
190 // For UMA and testing. If non-null, triggered when the app list is painted. | 183 // For UMA and testing. If non-null, triggered when the app list is painted. |
191 base::Closure next_paint_callback_; | 184 base::Closure next_paint_callback_; |
192 | 185 |
193 DISALLOW_COPY_AND_ASSIGN(AppListView); | 186 DISALLOW_COPY_AND_ASSIGN(AppListView); |
194 }; | 187 }; |
195 | 188 |
196 } // namespace app_list | 189 } // namespace app_list |
197 | 190 |
198 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 191 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
OLD | NEW |