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 2a1be91f97cb2a39c98e458b0cd518b89c0b5d5e..b132a4b8d6bb896d68ec891cec63b2de160143c8 100644 |
--- a/ui/app_list/views/app_list_view.cc |
+++ b/ui/app_list/views/app_list_view.cc |
@@ -84,7 +84,6 @@ class AppListOverlayView : public views::View { |
: corner_radius_(corner_radius) { |
SetPaintToLayer(); |
SetVisible(false); |
- layer()->SetOpacity(0.0f); |
sky
2017/04/07 03:28:18
Why are you removing this?
newcomer
2017/04/10 16:34:53
That was a mistake! Fixed.
|
} |
~AppListOverlayView() override {} |
@@ -169,6 +168,10 @@ class HideViewAnimationObserver : public ui::ImplicitAnimationObserver { |
//////////////////////////////////////////////////////////////////////////////// |
// AppListView: |
+const char* AppListView::GetClassName() const { |
+ return "AppListView"; |
+} |
+ |
AppListView::AppListView(AppListViewDelegate* delegate) |
: delegate_(delegate), |
app_list_main_view_(nullptr), |
@@ -177,7 +180,8 @@ AppListView::AppListView(AppListViewDelegate* delegate) |
search_box_widget_(nullptr), |
search_box_view_(nullptr), |
overlay_view_(nullptr), |
- animation_observer_(new HideViewAnimationObserver()) { |
+ animation_observer_(new HideViewAnimationObserver()), |
+ blurred(false) { |
sky
2017/04/07 03:28:19
Does this compile?
newcomer
2017/04/10 16:34:53
It didn't compile. I added that when doing researc
|
CHECK(delegate); |
delegate_->GetSpeechUI()->AddObserver(this); |
@@ -190,6 +194,27 @@ AppListView::~AppListView() { |
RemoveAllChildViews(true); |
} |
+void AppListView::InitAsFramelessWindow(gfx::NativeView parent, |
sky
2017/04/07 03:28:18
Please refactor this and InitAsBubble to share cod
newcomer
2017/04/10 16:34:53
I refactored it, then noticed there was a function
|
+ int initial_apps_page, |
+ gfx::Rect bounds) { |
+ set_color(kContentsBackgroundColor); |
+ InitContents(parent, initial_apps_page); |
+ |
sky
2017/04/07 03:28:18
Only one newline is fine.
newcomer
2017/04/10 16:34:53
Acknowledged.
|
+ |
+ views::Widget *widget = new views::Widget; |
+ views::Widget::InitParams app_list_overlay_view_params( |
+ views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
+ app_list_overlay_view_params.parent = parent; |
+ app_list_overlay_view_params.delegate = this; |
+ |
+ widget->Init(app_list_overlay_view_params); |
+ widget->SetBounds(bounds); |
+ widget->GetLayer()->SetFillsBoundsOpaquely(false); |
+ widget->GetLayer()->SetBackgroundBlur(20); |
+ InitChildWidgets(); |
+ overlay_view_ = new AppListOverlayView(0 /* no corners */); |
+ AddChildView(overlay_view_); |
+} |
void AppListView::InitAsBubble(gfx::NativeView parent, int initial_apps_page) { |
sky
2017/04/07 03:28:18
newline between 217/218.
|
base::Time start_time = base::Time::Now(); |
@@ -343,7 +368,6 @@ void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) { |
app_list_main_view_->SetPaintToLayer(); |
app_list_main_view_->layer()->SetFillsBoundsOpaquely(false); |
app_list_main_view_->layer()->SetMasksToBounds(true); |
- |
// This will be added to the |search_box_widget_| after the app list widget is |
// initialized. |
search_box_view_ = new SearchBoxView(app_list_main_view_, delegate_); |