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

Side by Side Diff: ash/app_list/app_list_delegate_impl.cc

Issue 2898743002: Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Rebased to fix merge conflicts and addressed comments. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/app_list/app_list_delegate_impl.h" 5 #include "ash/app_list/app_list_delegate_impl.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/app_list_button.h" 8 #include "ash/shelf/app_list_button.h"
9 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
10 #include "ash/shelf/shelf_widget.h" 10 #include "ash/shelf/shelf_widget.h"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "ash/shell_port.h" 12 #include "ash/shell_port.h"
13 #include "ash/wm_window.h" 13 #include "ash/wm_window.h"
14 #include "ui/app_list/app_list_features.h"
14 #include "ui/app_list/presenter/app_list.h" 15 #include "ui/app_list/presenter/app_list.h"
15 16
16 namespace ash { 17 namespace ash {
17 18
18 AppListDelegateImpl::AppListDelegateImpl() { 19 AppListDelegateImpl::AppListDelegateImpl() {
19 Shell::Get()->app_list()->set_delegate(this); 20 Shell::Get()->app_list()->set_delegate(this);
20 } 21 }
21 22
22 AppListDelegateImpl::~AppListDelegateImpl() { 23 AppListDelegateImpl::~AppListDelegateImpl() {
23 Shell::Get()->app_list()->set_delegate(nullptr); 24 Shell::Get()->app_list()->set_delegate(nullptr);
24 } 25 }
25 26
26 void AppListDelegateImpl::OnAppListVisibilityChanged(bool visible, 27 void AppListDelegateImpl::OnAppListVisibilityChanged(bool visible,
27 int64_t display_id) { 28 int64_t display_id) {
28 aura::Window* root_window = 29 aura::Window* root_window =
29 ShellPort::Get()->GetRootWindowForDisplayId(display_id); 30 ShellPort::Get()->GetRootWindowForDisplayId(display_id);
30 AppListButton* app_list_button = 31 AppListButton* app_list_button =
31 Shelf::ForWindow(root_window)->shelf_widget()->GetAppListButton(); 32 Shelf::ForWindow(root_window)->shelf_widget()->GetAppListButton();
32 if (!app_list_button) 33 if (!app_list_button)
33 return; 34 return;
34 35
35 if (visible) 36 if (visible)
36 app_list_button->OnAppListShown(); 37 app_list_button->OnAppListShown();
37 else 38 else
38 app_list_button->OnAppListDismissed(); 39 app_list_button->OnAppListDismissed();
40
41 if (app_list::features::IsFullscreenAppListEnabled()) {
42 Shelf* shelf = Shelf::ForWindow(root_window);
43 shelf->OnAppListIsActive(visible);
xiyuan 2017/05/30 22:18:50 nit: get rid of |shelf| and use Shelf::ForWindow i
newcomer 2017/06/01 01:42:53 Done.
sky 2017/06/01 13:34:05 Thanks for starting down this path! What I'm reall
newcomer 2017/06/05 22:01:44 Discussed Offline, I've created a bug and plan mer
44 }
39 } 45 }
40 46
41 } // namespace ash 47 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/app_list/app_list_presenter_delegate.cc » ('j') | ash/app_list/app_list_presenter_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698