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

Unified Diff: ui/app_list/views/app_list_view.cc

Issue 290433003: Revert of Add a whole-app-list unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_view.cc
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index a7f607da5e433d6c42f89ad864613cc947c1310c..0c5c5f705315148f3f60a75e5daf9dd48bb70075 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -53,6 +53,8 @@
namespace {
+void (*g_next_paint_callback)();
+
// The margin from the edge to the speech UI.
const int kSpeechUIMargin = 12;
@@ -204,9 +206,9 @@
void AppListView::Paint(gfx::Canvas* canvas, const views::CullSet& cull_set) {
views::BubbleDelegateView::Paint(canvas, cull_set);
- if (!next_paint_callback_.is_null()) {
- next_paint_callback_.Run();
- next_paint_callback_.Reset();
+ if (g_next_paint_callback) {
+ g_next_paint_callback();
+ g_next_paint_callback = NULL;
}
}
@@ -248,8 +250,8 @@
}
// static
-void AppListView::SetNextPaintCallback(const base::Closure& callback) {
- next_paint_callback_ = callback;
+void AppListView::SetNextPaintCallback(void (*callback)()) {
+ g_next_paint_callback = callback;
}
#if defined(OS_WIN)
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698