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

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

Issue 23315002: Add UMA for first app list paint on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
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 118ab2b3409271a6c4a0a2e67a021d8b95b05c70..71bca1a6812b081f12c3df0bced4075b865f8fdd 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -4,6 +4,7 @@
#include "ui/app_list/views/app_list_view.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/strings/string_util.h"
#include "ui/app_list/app_list_constants.h"
@@ -37,6 +38,8 @@ namespace app_list {
namespace {
+base::Closure g_next_paint_callback;
+
// The distance between the arrow tip and edge of the anchor view.
const int kArrowOffset = 10;
@@ -166,6 +169,14 @@ gfx::Size AppListView::GetPreferredSize() {
return app_list_main_view_->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 = base::Closure();
benwells 2013/08/21 04:54:09 Should this be g_next_paint_callback.Reset()?
koz (OOO until 15th September) 2013/08/21 06:54:32 Done.
+ }
+}
+
bool AppListView::ShouldHandleSystemCommands() const {
return true;
}
@@ -183,6 +194,11 @@ void AppListView::OnSigninStatusChanged() {
app_list_main_view_->search_box_view()->InvalidateMenu();
}
+// static
+void AppListView::SetAppListNextPaintCallback(const base::Closure& callback) {
+ g_next_paint_callback = callback;
+}
+
#if defined(OS_WIN)
HWND AppListView::GetHWND() const {
#if defined(USE_AURA)
« chrome/browser/ui/app_list/app_list_service.cc ('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