| 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 "base/callback_forward.h" |
| 8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 10 #include "ui/app_list/app_list_export.h" | 11 #include "ui/app_list/app_list_export.h" |
| 11 #include "ui/app_list/app_list_model_observer.h" | 12 #include "ui/app_list/app_list_model_observer.h" |
| 12 #include "ui/views/bubble/bubble_delegate.h" | 13 #include "ui/views/bubble/bubble_delegate.h" |
| 13 | 14 |
| 14 namespace views { | 15 namespace views { |
| 15 class Widget; | 16 class Widget; |
| 16 } | 17 } |
| 17 | 18 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Shows the UI when there are no pending icon loads. Otherwise, starts a | 61 // Shows the UI when there are no pending icon loads. Otherwise, starts a |
| 61 // timer to show the UI when a maximum allowed wait time has expired. | 62 // timer to show the UI when a maximum allowed wait time has expired. |
| 62 void ShowWhenReady(); | 63 void ShowWhenReady(); |
| 63 | 64 |
| 64 void Close(); | 65 void Close(); |
| 65 | 66 |
| 66 void UpdateBounds(); | 67 void UpdateBounds(); |
| 67 | 68 |
| 68 // Overridden from views::View: | 69 // Overridden from views::View: |
| 69 virtual gfx::Size GetPreferredSize() OVERRIDE; | 70 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 71 virtual void Paint(gfx::Canvas* canvas) OVERRIDE; |
| 70 | 72 |
| 71 // WidgetDelegate overrides: | 73 // WidgetDelegate overrides: |
| 72 virtual bool ShouldHandleSystemCommands() const OVERRIDE; | 74 virtual bool ShouldHandleSystemCommands() const OVERRIDE; |
| 73 | 75 |
| 74 void Prerender(); | 76 void Prerender(); |
| 75 | 77 |
| 76 // Invoked when the sign-in status is changed to switch on/off sign-in view. | 78 // Invoked when the sign-in status is changed to switch on/off sign-in view. |
| 77 void OnSigninStatusChanged(); | 79 void OnSigninStatusChanged(); |
| 78 | 80 |
| 79 void AddObserver(Observer* observer); | 81 void AddObserver(Observer* observer); |
| 80 void RemoveObserver(Observer* observer); | 82 void RemoveObserver(Observer* observer); |
| 81 | 83 |
| 84 // Set a callback to be called the next time any app list paints. |
| 85 static void SetNextPaintCallback(const base::Closure& callback); |
| 86 |
| 82 #if defined(OS_WIN) | 87 #if defined(OS_WIN) |
| 83 HWND GetHWND() const; | 88 HWND GetHWND() const; |
| 84 #endif | 89 #endif |
| 85 | 90 |
| 86 private: | 91 private: |
| 87 // Overridden from views::WidgetDelegateView: | 92 // Overridden from views::WidgetDelegateView: |
| 88 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 93 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
| 89 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; | 94 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; |
| 90 virtual bool WidgetHasHitTestMask() const OVERRIDE; | 95 virtual bool WidgetHasHitTestMask() const OVERRIDE; |
| 91 virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE; | 96 virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 114 SigninView* signin_view_; | 119 SigninView* signin_view_; |
| 115 | 120 |
| 116 ObserverList<Observer> observers_; | 121 ObserverList<Observer> observers_; |
| 117 | 122 |
| 118 DISALLOW_COPY_AND_ASSIGN(AppListView); | 123 DISALLOW_COPY_AND_ASSIGN(AppListView); |
| 119 }; | 124 }; |
| 120 | 125 |
| 121 } // namespace app_list | 126 } // namespace app_list |
| 122 | 127 |
| 123 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 128 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| OLD | NEW |