#include <algorithm>
#include "base/command_line.h"
+#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "base/win/windows_version.h"
-#include "grit/ui_resources.h"
#include "ui/app_list/app_list_constants.h"
#include "ui/app_list/app_list_model.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/path.h"
#include "ui/gfx/skia_util.h"
+#include "ui/resources/grit/ui_resources.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/textfield/textfield.h"
app_list_main_view_->search_box_view()->InvalidateMenu();
}
+void AppListView::OnShutdown() {
+ // Nothing to do on views - the widget will soon be closed, which will tear
+ // everything down.
+}
+
void AppListView::SetProfileByPath(const base::FilePath& profile_path) {
delegate_->SetProfileByPath(profile_path);
app_list_main_view_->ModelChanged();
views::BubbleBorder::Arrow arrow,
bool border_accepts_events,
const gfx::Vector2d& anchor_offset) {
+ base::Time start_time = base::Time::Now();
+
app_list_main_view_ =
- new AppListMainView(delegate_.get(), initial_apps_page, parent);
+ new AppListMainView(delegate_, initial_apps_page, parent);
AddChildView(app_list_main_view_);
app_list_main_view_->SetPaintToLayer(true);
app_list_main_view_->SetFillsBoundsOpaquely(false);
// Speech recognition is available only when the start page exists.
if (delegate_ && delegate_->IsSpeechRecognitionEnabled()) {
- speech_view_ = new SpeechView(delegate_.get());
+ speech_view_ = new SpeechView(delegate_);
speech_view_->SetVisible(false);
speech_view_->SetPaintToLayer(true);
speech_view_->SetFillsBoundsOpaquely(false);
if (delegate_)
delegate_->ViewInitialized();
+
+ UMA_HISTOGRAM_TIMES("Apps.AppListCreationTime",
+ base::Time::Now() - start_time);
}
void AppListView::OnBeforeBubbleWidgetInit(