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

Side by Side Diff: ash/first_run/first_run_helper_impl.cc

Issue 2421853003: Remove usage of FOR_EACH_OBSERVER macro in ash/ (Closed)
Patch Set: shell_observers 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 | « ash/display/window_tree_host_manager.cc ('k') | ash/mus/bridge/wm_shell_mus.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/first_run/first_run_helper_impl.h" 5 #include "ash/first_run/first_run_helper_impl.h"
6 6
7 #include "ash/common/shelf/app_list_button.h" 7 #include "ash/common/shelf/app_list_button.h"
8 #include "ash/common/shelf/shelf_widget.h" 8 #include "ash/common/shelf/shelf_widget.h"
9 #include "ash/common/shelf/wm_shelf.h" 9 #include "ash/common/shelf/wm_shelf.h"
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return widget_; 55 return widget_;
56 } 56 }
57 57
58 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { 58 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() {
59 WmShelf* shelf = WmShelf::ForWindow(WmShell::Get()->GetPrimaryRootWindow()); 59 WmShelf* shelf = WmShelf::ForWindow(WmShell::Get()->GetPrimaryRootWindow());
60 AppListButton* app_button = shelf->shelf_widget()->GetAppListButton(); 60 AppListButton* app_button = shelf->shelf_widget()->GetAppListButton();
61 return app_button->GetBoundsInScreen(); 61 return app_button->GetBoundsInScreen();
62 } 62 }
63 63
64 void FirstRunHelperImpl::Cancel() { 64 void FirstRunHelperImpl::Cancel() {
65 FOR_EACH_OBSERVER(Observer, observers(), OnCancelled()); 65 for (auto& observer : observers())
66 observer.OnCancelled();
66 } 67 }
67 68
68 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) { 69 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) {
69 return event->key_code() == ui::VKEY_ESCAPE; 70 return event->key_code() == ui::VKEY_ESCAPE;
70 } 71 }
71 72
72 aura::Window* FirstRunHelperImpl::GetWindow() { 73 aura::Window* FirstRunHelperImpl::GetWindow() {
73 return widget_->GetNativeWindow(); 74 return widget_->GetNativeWindow();
74 } 75 }
75 76
(...skipping 19 matching lines...) Expand all
95 return bubble->GetBoundsInScreen(); 96 return bubble->GetBoundsInScreen();
96 } 97 }
97 98
98 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { 99 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() {
99 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); 100 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
100 views::View* help_button = tray->GetHelpButtonView(); 101 views::View* help_button = tray->GetHelpButtonView();
101 return help_button->GetBoundsInScreen(); 102 return help_button->GetBoundsInScreen();
102 } 103 }
103 104
104 } // namespace ash 105 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/window_tree_host_manager.cc ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698