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

Side by Side Diff: ui/app_list/presenter/app_list.cc

Issue 2647833003: Adds AppListDelegate to AppList that is notified on visibility changes (Closed)
Patch Set: move Created 3 years, 11 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
« no previous file with comments | « ui/app_list/presenter/app_list.h ('k') | ui/app_list/presenter/app_list_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/app_list/presenter/app_list.h" 5 #include "ui/app_list/presenter/app_list.h"
6 6
7 #include "ui/app_list/presenter/app_list_delegate.h"
8
7 namespace app_list { 9 namespace app_list {
8 10
9 AppList::AppList() {} 11 AppList::AppList() {}
10 12
11 AppList::~AppList() {} 13 AppList::~AppList() {}
12 14
13 void AppList::BindRequest(mojom::AppListRequest request) { 15 void AppList::BindRequest(mojom::AppListRequest request) {
14 bindings_.AddBinding(this, std::move(request)); 16 bindings_.AddBinding(this, std::move(request));
15 } 17 }
16 18
(...skipping 25 matching lines...) Expand all
42 } 44 }
43 45
44 void AppList::SetAppListPresenter(mojom::AppListPresenterPtr presenter) { 46 void AppList::SetAppListPresenter(mojom::AppListPresenterPtr presenter) {
45 presenter_ = std::move(presenter); 47 presenter_ = std::move(presenter);
46 } 48 }
47 49
48 void AppList::OnTargetVisibilityChanged(bool visible) { 50 void AppList::OnTargetVisibilityChanged(bool visible) {
49 target_visible_ = visible; 51 target_visible_ = visible;
50 } 52 }
51 53
52 void AppList::OnVisibilityChanged(bool visible) { 54 void AppList::OnVisibilityChanged(bool visible, int64_t display_id) {
55 if (visible_ == visible)
56 return;
57
53 visible_ = visible; 58 visible_ = visible;
59 if (delegate_)
60 delegate_->OnAppListVisibilityChanged(visible, display_id);
54 } 61 }
55 62
56 } // namespace app_list 63 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/presenter/app_list.h ('k') | ui/app_list/presenter/app_list_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698