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

Side by Side Diff: ui/app_list/views/app_list_view.cc

Issue 2422873002: Remove usage of FOR_EACH_OBSERVER macro in ui/app_list (Closed)
Patch Set: Created 4 years, 2 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/speech_ui_model.cc ('k') | ui/app_list/views/top_icon_animation_view.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/app_list_view.h" 5 #include "ui/app_list/views/app_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 void AppListView::OnWidgetDestroying(views::Widget* widget) { 614 void AppListView::OnWidgetDestroying(views::Widget* widget) {
615 BubbleDialogDelegateView::OnWidgetDestroying(widget); 615 BubbleDialogDelegateView::OnWidgetDestroying(widget);
616 if (delegate_ && widget == GetWidget()) 616 if (delegate_ && widget == GetWidget())
617 delegate_->ViewClosing(); 617 delegate_->ViewClosing();
618 } 618 }
619 619
620 void AppListView::OnWidgetActivationChanged(views::Widget* widget, 620 void AppListView::OnWidgetActivationChanged(views::Widget* widget,
621 bool active) { 621 bool active) {
622 // Do not called inherited function as the bubble delegate auto close 622 // Do not called inherited function as the bubble delegate auto close
623 // functionality is not used. 623 // functionality is not used.
624 if (widget == GetWidget()) 624 if (widget == GetWidget()) {
625 FOR_EACH_OBSERVER(AppListViewObserver, observers_, 625 for (auto& observer : observers_)
626 OnActivationChanged(widget, active)); 626 observer.OnActivationChanged(widget, active);
627 }
627 } 628 }
628 629
629 void AppListView::OnWidgetVisibilityChanged(views::Widget* widget, 630 void AppListView::OnWidgetVisibilityChanged(views::Widget* widget,
630 bool visible) { 631 bool visible) {
631 BubbleDialogDelegateView::OnWidgetVisibilityChanged(widget, visible); 632 BubbleDialogDelegateView::OnWidgetVisibilityChanged(widget, visible);
632 633
633 if (widget != GetWidget()) 634 if (widget != GetWidget())
634 return; 635 return;
635 636
636 if (!visible) 637 if (!visible)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 app_list_main_view_->SetVisible(true); 700 app_list_main_view_->SetVisible(true);
700 // Refocus the search box. However, if the app list widget does not have 701 // Refocus the search box. However, if the app list widget does not have
701 // focus, it means another window has already taken focus, and we *must not* 702 // focus, it means another window has already taken focus, and we *must not*
702 // focus the search box (or we would steal focus back into the app list). 703 // focus the search box (or we would steal focus back into the app list).
703 if (GetWidget()->IsActive()) 704 if (GetWidget()->IsActive())
704 search_box_view_->search_box()->RequestFocus(); 705 search_box_view_->search_box()->RequestFocus();
705 } 706 }
706 } 707 }
707 708
708 } // namespace app_list 709 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/speech_ui_model.cc ('k') | ui/app_list/views/top_icon_animation_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698