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

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

Issue 68173019: Remove static initializer from AppListView::SetNextPaintCallback(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
« ui/app_list/views/app_list_view.h ('K') | « ui/app_list/views/app_list_view.h ('k') | no next file » | 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 0f6d2df219b6a74b8dfc82da80e82142ea70964b..fdf4f966140d1ba1b87752982f3bd97ef8d19afc 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -38,7 +38,7 @@ namespace app_list {
namespace {
-base::Closure g_next_paint_callback;
+void (*g_next_paint_callback)();
// The distance between the arrow tip and edge of the anchor view.
const int kArrowOffset = 10;
@@ -126,9 +126,9 @@ gfx::Size AppListView::GetPreferredSize() {
void AppListView::Paint(gfx::Canvas* canvas) {
views::BubbleDelegateView::Paint(canvas);
- if (!g_next_paint_callback.is_null()) {
- g_next_paint_callback.Run();
- g_next_paint_callback.Reset();
+ if (!g_next_paint_callback) {
+ g_next_paint_callback();
+ g_next_paint_callback = NULL;
}
}
@@ -159,7 +159,7 @@ void AppListView::RemoveObserver(Observer* observer) {
}
// static
-void AppListView::SetNextPaintCallback(const base::Closure& callback) {
+void AppListView::SetNextPaintCallback(void (*callback)()) {
g_next_paint_callback = callback;
}
« ui/app_list/views/app_list_view.h ('K') | « ui/app_list/views/app_list_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698