| 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(); | 117 void Prerender(); |
| 119 | 118 |
| 120 void SetProfileByPath(const base::FilePath& profile_path); | 119 void SetProfileByPath(const base::FilePath& profile_path); |
| 121 | 120 |
| 122 void AddObserver(AppListViewObserver* observer); | 121 void AddObserver(AppListViewObserver* observer); |
| 123 void RemoveObserver(AppListViewObserver* observer); | 122 void RemoveObserver(AppListViewObserver* observer); |
| 124 | 123 |
| 125 // Set a callback to be called the next time any app list paints. | 124 // Set a callback to be called the next time any app list paints. |
| 126 void SetNextPaintCallback(const base::Closure& callback); | 125 void SetNextPaintCallback(const base::Closure& callback); |
| 127 | 126 |
| 128 #if defined(OS_WIN) | |
| 129 HWND GetHWND() const; | |
| 130 #endif | |
| 131 | |
| 132 AppListMainView* app_list_main_view() { return app_list_main_view_; } | 127 AppListMainView* app_list_main_view() { return app_list_main_view_; } |
| 133 | 128 |
| 134 // Gets the PaginationModel owned by this view's apps grid. | 129 // Gets the PaginationModel owned by this view's apps grid. |
| 135 PaginationModel* GetAppsPaginationModel(); | 130 PaginationModel* GetAppsPaginationModel(); |
| 136 | 131 |
| 137 // Overridden from views::View: | 132 // Overridden from views::View: |
| 138 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 133 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 139 void Layout() override; | 134 void Layout() override; |
| 140 void SchedulePaintInRect(const gfx::Rect& rect) override; | 135 void SchedulePaintInRect(const gfx::Rect& rect) override; |
| 141 | 136 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 184 |
| 190 // For UMA and testing. If non-null, triggered when the app list is painted. | 185 // For UMA and testing. If non-null, triggered when the app list is painted. |
| 191 base::Closure next_paint_callback_; | 186 base::Closure next_paint_callback_; |
| 192 | 187 |
| 193 DISALLOW_COPY_AND_ASSIGN(AppListView); | 188 DISALLOW_COPY_AND_ASSIGN(AppListView); |
| 194 }; | 189 }; |
| 195 | 190 |
| 196 } // namespace app_list | 191 } // namespace app_list |
| 197 | 192 |
| 198 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 193 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| OLD | NEW |