| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MAIN_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 SearchBoxView* search_box_view() const { return search_box_view_; } | 56 SearchBoxView* search_box_view() const { return search_box_view_; } |
| 57 | 57 |
| 58 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop | 58 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop |
| 59 // operations outside the application list. | 59 // operations outside the application list. |
| 60 void SetDragAndDropHostOfCurrentAppList( | 60 void SetDragAndDropHostOfCurrentAppList( |
| 61 ApplicationDragAndDropHost* drag_and_drop_host); | 61 ApplicationDragAndDropHost* drag_and_drop_host); |
| 62 | 62 |
| 63 ContentsView* contents_view() const { return contents_view_; } | 63 ContentsView* contents_view() const { return contents_view_; } |
| 64 | 64 |
| 65 // Returns true if the app list should be centered and in landscape mode. | |
| 66 bool ShouldCenterWindow() const; | |
| 67 | |
| 68 private: | 65 private: |
| 69 class IconLoader; | 66 class IconLoader; |
| 70 | 67 |
| 71 void AddContentsView(); | 68 void AddContentsView(); |
| 72 | 69 |
| 73 // Loads icon image for the apps in the selected page of |pagination_model_|. | 70 // Loads icon image for the apps in the selected page of |pagination_model_|. |
| 74 // |parent| is used to determine the image scale factor to use. | 71 // |parent| is used to determine the image scale factor to use. |
| 75 void PreloadIcons(gfx::NativeView parent); | 72 void PreloadIcons(gfx::NativeView parent); |
| 76 | 73 |
| 77 // Invoked when |icon_loading_wait_timer_| fires. | 74 // Invoked when |icon_loading_wait_timer_| fires. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 ScopedVector<IconLoader> pending_icon_loaders_; | 107 ScopedVector<IconLoader> pending_icon_loaders_; |
| 111 | 108 |
| 112 base::WeakPtrFactory<AppListMainView> weak_ptr_factory_; | 109 base::WeakPtrFactory<AppListMainView> weak_ptr_factory_; |
| 113 | 110 |
| 114 DISALLOW_COPY_AND_ASSIGN(AppListMainView); | 111 DISALLOW_COPY_AND_ASSIGN(AppListMainView); |
| 115 }; | 112 }; |
| 116 | 113 |
| 117 } // namespace app_list | 114 } // namespace app_list |
| 118 | 115 |
| 119 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 116 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |
| OLD | NEW |